| | |
| | | return -1
|
| | | curItemID = curItem.GetItemTypeID()
|
| | | useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % curItemID)
|
| | | for itemIDList in IpyGameDataPY.GetFuncEvalCfg('ShareUseCntItem'):
|
| | | if curItemID not in itemIDList:
|
| | | continue
|
| | | for itemID in itemIDList:
|
| | | if itemID == curItemID:
|
| | | continue
|
| | | useCnt += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
|
| | | #for itemIDList in IpyGameDataPY.GetFuncEvalCfg('ShareUseCntItem'):
|
| | | # if curItemID not in itemIDList:
|
| | | # continue
|
| | | # for itemID in itemIDList:
|
| | | # if itemID == curItemID:
|
| | | # continue
|
| | | # useCnt += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
|
| | |
|
| | | canUseCnt = max(0, maxCnt - useCnt)
|
| | |
|
| | |
| | | ChConfig.Def_Effect_AddRealmExpRate:"Item_AddRealmExpRate", # 增加聚灵效率
|
| | | ChConfig.Def_Effect_TouchMission:"Item_TouchMission", # 触发任务接口
|
| | | ChConfig.Def_Effect_HeroSkin:"Item_HeroSkin", # 武将皮肤
|
| | | ChConfig.Def_Effect_FamilyTaofaCnt:"Item_FamilyTaofaCnt", # 增加公会讨伐次数
|
| | | #ChConfig.Def_Effect_AddArenaBattleCount:"Item_AddArenaBattleCount", # 增加竞技场挑战次数
|
| | | #ChConfig.Def_Effect_FamilyImpeach:"Item_FamilyImpeach", # 弹劾符
|
| | | #ChConfig.Def_Effect_ClothesCoatSkin:"Item_ClothesCoatSkin", #激活时装皮肤
|
| | |
| | | else:
|
| | | curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitUseFuDai, ChConfig.Def_UseFuDai_Fail)
|
| | |
|
| | | return
|
| | |
|
| | | def SendUseItemGetItemResult(curPlayer, useItemID, useCount, getItemInfo, moneyType=0, moneyCount=0):
|
| | | # 通知客户端使用物品结果包
|
| | | # @param getItemInfo: [{"ItemID":物品ID, "Count":个数, "IsBind":是否绑定, "IsSuite":是否套装化, "UserData":"自定义属性字符串"}, ...]
|
| | | |
| | | getItemInfo = json.dumps(getItemInfo, ensure_ascii=False)
|
| | | getItemInfo = getItemInfo.replace(" ", "")
|
| | | getItemPack = ChPyNetSendPack.tagMCNotifyUseItemGetItem()
|
| | | getItemPack.Clear()
|
| | | getItemPack.UseItemID = useItemID
|
| | | getItemPack.UseCount = useCount
|
| | | getItemPack.GetItemData = str(getItemInfo)
|
| | | getItemPack.GetItemLen = len(getItemPack.GetItemData)
|
| | | getItemPack.MoneyType = moneyType
|
| | | getItemPack.MoneyCount = moneyCount
|
| | | NetPackCommon.SendFakePack(curPlayer, getItemPack)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|