| | |
| | | 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)
|
| | |
| | | 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("家族兑换活跃令,没有装备可兑换!")
|