From b4b72d0c241ffc26dbbbd7a047578f1f4fead2f4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 09 十二月 2021 16:11:53 +0800
Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(Couple命令增加添加喜糖宴会;修复多个喜糖宴会同时存在时吃喜糖同步错误bug)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
index 74471cf..3fbf392 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -591,7 +591,7 @@
             return
 
     #请求记录申请进入家族信息
-    sendMsg = cPickle.dumps([familyID, curPlayer.GetFightPower()], 2)
+    sendMsg = cPickle.dumps([familyID, PlayerControl.GetFightPower(curPlayer)], 2)
     curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_AddFamilyAction, 
                                         ShareDefine.Def_ActionType_FamilyAdd, '', sendMsg, len(sendMsg))
     
@@ -958,6 +958,7 @@
     eatItemIDList = clientData.ItemIDList
     givePoint = 0 #分解得到活跃令
     familyDonateDict = IpyGameDataPY.GetFuncEvalCfg('FamilyDonate', 1, {})
+    familyDonateSpecialDict = IpyGameDataPY.GetFuncEvalCfg('FamilyDonate', 2, {})
     itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
     for i, index in enumerate(eatIndexList):
         eatItem = itemPack.GetAt(index)
@@ -968,22 +969,26 @@
         if eatItemID != eatItemIDList[i]:
             GameWorld.Log('家族兑换活跃令 发的物品ID不对应index=%s eatItemID=%s,ItemIDList[i]=%s' % (index, eatItemID, eatItemIDList[i]), playerID)
             continue
-        if eatItem.GetIsBind():
-            GameWorld.DebugLog("装备已绑定,无法兑换!itemIndex=%s" % index)
-            continue
+        #if eatItem.GetIsBind():
+        #    GameWorld.DebugLog("装备已绑定,无法兑换!itemIndex=%s" % index)
+        #    continue
         if eatItem.GetEndureReduceType():
             GameWorld.DebugLog("有时效耐久物品,无法兑换!itemIndex=%s" % index)
             continue
-        if not ItemCommon.CheckItemIsEquip(eatItem):
-            GameWorld.DebugLog("非装备,无法兑换!itemIndex=%s" % index)
-            continue
-        itemColor = eatItem.GetItemColor()
-        if str(itemColor) not in familyDonateDict:
-            continue
-        isSuite = eatItem.GetSuiteID()
-        addPoint = familyDonateDict[str(itemColor)][1 if isSuite else 0]
-        givePoint += addPoint
-        ItemCommon.DelItem(curPlayer, eatItem, 1, True, ChConfig.ItemDel_ZhuXianDecompose, {'addPoint':addPoint}, True)
+        if eatItemID in familyDonateSpecialDict:
+            addPoint = familyDonateSpecialDict[eatItemID]
+        else:
+            if not ItemCommon.CheckItemIsEquip(eatItem):
+                GameWorld.DebugLog("非装备,无法兑换!itemIndex=%s" % index)
+                continue
+            itemColor = eatItem.GetItemColor()
+            if str(itemColor) not in familyDonateDict:
+                continue
+            isSuite = eatItem.GetSuiteID()
+            addPoint = familyDonateDict[str(itemColor)][1 if isSuite else 0]
+        itemCnt = eatItem.GetCount()
+        givePoint += addPoint * itemCnt
+        ItemCommon.DelItem(curPlayer, eatItem, itemCnt, True, ChConfig.ItemDel_FamilyStore, {'addPoint':addPoint}, True)
     
     if not givePoint:
         GameWorld.DebugLog("家族兑换活跃令,没有装备可兑换!")

--
Gitblit v1.8.0