|  |  | 
 |  |  |     maxCnt = ItemCommon.GetCanUseCountDaily(curItem)
 | 
 |  |  |     if maxCnt <= 0:
 | 
 |  |  |         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)
 | 
 |  |  |     
 | 
 |  |  |     itemID = curItem.GetItemTypeID()
 | 
 |  |  |     useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
 | 
 |  |  |     canUseCnt = max(0, maxCnt - useCnt)
 | 
 |  |  |     
 | 
 |  |  |     if canUseCnt <= 0:
 | 
 |  |  |         GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (itemID, useCnt, maxCnt))
 | 
 |  |  |         GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (curItemID, useCnt, maxCnt))
 | 
 |  |  |         #PlayerControl.NotifyCode(curPlayer, notifyMark, [itemID])
 | 
 |  |  |         
 | 
 |  |  |     #GameWorld.DebugLog("物品ID(%s)今日已使用次数(%s), maxCnt=%s" % (itemID, useCnt, maxCnt))
 | 
 |  |  | 
 |  |  |                            ChConfig.Def_ItemType_GiveMoney:"Item_GiveMoney",         # 给人物金钱
 | 
 |  |  |                            ChConfig.Def_ItemType_AddLimitBuff:"Item_Add_LimitingBuff",         # 给限时buff物品
 | 
 |  |  |                            ChConfig.Def_ItemType_AddExpBuff:"Item_Add_LimitingBuff",         # 给限时buff物品
 | 
 |  |  |                            ChConfig.Def_ItemType_ResetAttrPoint:"Item_ResetAttrPoint"    #单个属性点重置
 | 
 |  |  |                            ChConfig.Def_ItemType_ResetAttrPoint:"Item_ResetAttrPoint",    #单个属性点重置
 | 
 |  |  |                            ChConfig.Def_ItemType_AddCrossRealmPKCnt:"Item_AddCrossRealmPKCnt"    #增加跨服PK次数
 | 
 |  |  |                            } 
 | 
 |  |  |     
 | 
 |  |  |     #根据物品效果使用{物品效果ID:call的py名}
 | 
 |  |  | 
 |  |  |                             ChConfig.Def_Effect_AddKillBossCnt:"Item_AddKillBossCnt", # 增加BOSS可击杀次数
 | 
 |  |  |                             ChConfig.Def_Effect_AddMagicWeaponUpExp:"Item_AddMagicWeaponUpExp", # 增加法宝升星经验
 | 
 |  |  |                             ChConfig.Def_Effect_ChatBubbleBox:"Item_ChatBubbleBox", # 激活聊天气泡框
 | 
 |  |  |                             #ChConfig.Def_PhoneVip_EffID:"Item_AddPhoneVip", # 手机VIP物品卡
 | 
 |  |  |                             ChConfig.Def_Effect_ItemGiveWeekPartyPoint:"Item_WeekPartyPoint", # 增加活动巡礼积分
 | 
 |  |  |                             ChConfig.Def_Effect_ItemGiveWeekPartyPoint1:"Item_WeekPartyPoint", # 增加活动巡礼积分
 | 
 |  |  |                             #ChConfig.Def_Effect_AddZhenQiByTimes:"Item_AddZhenQiByTimes", # 增加真气按一天使用次数减少
 | 
 |  |  |                             #ChConfig.Def_Effect_AddPrestige:"Item_AddPrestige",  # 给人物威望
 | 
 |  |  |                             #ChConfig.Def_Effect_FamilyImpeach:"Item_FamilyImpeach",  # 弹劾符
 | 
 |  |  | 
 |  |  |         GameWorld.DebugLog("    物品无法使用!")
 | 
 |  |  |         return
 | 
 |  |  |     
 | 
 |  |  |     # 使用拍品
 | 
 |  |  |     if curItem.GetIsBind():
 | 
 |  |  |         DoLogic_PlayerUseAuctionItem(curPlayer, curItem)
 | 
 |  |  |         return
 | 
 |  |  |      | 
 |  |  |     if useCnt <= 0:
 | 
 |  |  |         useCnt = curItem.GetCount()
 | 
 |  |  |         GameWorld.DebugLog("    没指定使用个数,默认使用全部=%s" % useCnt)
 | 
 |  |  |         
 | 
 |  |  |     __DoLogic_PlayerUseItemSelf(curPlayer, itemIndex, tick, useCnt, exData)
 | 
 |  |  | 
 | 
 |  |  |     return
 | 
 |  |  | 
 | 
 |  |  | def DoLogic_PlayerUseAuctionItem(curPlayer, curItem):
 | 
 |  |  |     ## 玩家使用拍品
 | 
 |  |  |     playerID = curPlayer.GetPlayerID()
 | 
 |  |  |     itemID = curItem.GetItemTypeID()
 | 
 |  |  |          | 
 |  |  |     curItem.SetIsBind(0) # 设置为非拍品
 | 
 |  |  |     curItem.ClearUserAttr(ShareDefine.Def_IudetAuctionItemCreateTime)
 | 
 |  |  |     GameWorld.DebugLog("玩家使用拍品: itemID=%s" % (itemID), playerID)
 | 
 |  |  |      | 
 |  |  |     if ItemCommon.GetIsEquip(curItem):
 | 
 |  |  |         # 生成传奇属性
 | 
 |  |  |         legendAttrInfo = ItemControler.GetAddEquipLegendAttr(curItem, curPlayer)
 | 
 |  |  |         if not legendAttrInfo:
 | 
 |  |  |             GameWorld.ErrLog("使用装备拍品没有传奇属性!itemID=%s" % (itemID), playerID)
 | 
 |  |  |             return
 | 
 |  |  |         attrIDList, attrValueList = legendAttrInfo
 | 
 |  |  |         # 传奇属性
 | 
 |  |  |         if attrIDList and attrValueList and len(attrIDList) == len(attrValueList):
 | 
 |  |  |             curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrID)
 | 
 |  |  |             curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrValue)
 | 
 |  |  |             for i, attrID in enumerate(attrIDList):
 | 
 |  |  |                 value = attrValueList[i]
 | 
 |  |  |                 curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrID, attrID)
 | 
 |  |  |                 curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrValue, value)
 | 
 |  |  |         ItemCommon.MakeEquipGS(curItem)
 | 
 |  |  |          | 
 |  |  |     return
 | 
 |  |  | 
 | 
 |  |  | #---------------------------------------------------------------------
 | 
 |  |  | 
 |  |  |     #===========================================================================
 | 
 |  |  |            
 | 
 |  |  |     # 套装
 | 
 |  |  |     if equipData.isSuite:
 | 
 |  |  |         curItem.SetIsSuite(equipData.isSuite)
 | 
 |  |  |     if equipData.suiteLV:
 | 
 |  |  |         curItem.SetUserAttr(ShareDefine.Def_IudetSuiteLV, equipData.suiteLV)
 | 
 |  |  |     #if equipData.isSuite:
 | 
 |  |  |     #    curItem.SetIsSuite(equipData.isSuite)
 | 
 |  |  |     #if equipData.suiteLV:
 | 
 |  |  |     #    curItem.SetUserAttr(ShareDefine.Def_IudetSuiteLV, equipData.suiteLV)
 | 
 |  |  |     # 物品来源
 | 
 |  |  |     if equipData.source:
 | 
 |  |  |         curItem.SetUserAttr(ShareDefine.Def_IudetSource, equipData.source)
 | 
 |  |  | 
 |  |  | #            makeItemID = int(itemDictData['ItemID'])
 | 
 |  |  | #            itemCount = 1
 | 
 |  |  | #            itemDictData['IsBind'] = isBind
 | 
 |  |  | #            if not ItemControler.GivePlayerEquip(curPlayer, itemDictData, False,  | 
 |  |  | #                                                 [IPY_GameWorld.rptItem]):
 | 
 |  |  | #            if not ItemControler.GivePlayerEquip(curPlayer, itemDictData):
 | 
 |  |  | #                GameWorld.ErrLog("使用特殊运营物品 给予定制物品失败")
 | 
 |  |  | #                return
 | 
 |  |  | #        else:
 | 
 |  |  | #            #给予物品
 | 
 |  |  | #            if not ItemControler.GivePlayerItem(curPlayer, newItemId, itemCount, isBind,  | 
 |  |  | #                                         [IPY_GameWorld.rptItem], False):
 | 
 |  |  | #            if not ItemControler.GivePlayerItem(curPlayer, newItemId, itemCount, 0, [IPY_GameWorld.rptItem]):
 | 
 |  |  | #                GameWorld.ErrLog("使用特殊运营物品 给予普通物品失败")
 | 
 |  |  | #                return
 | 
 |  |  | #        #PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [makeItemID, itemCount])
 | 
 |  |  | 
 |  |  |         return
 | 
 |  |  |     #先删原物品再给新物品
 | 
 |  |  |     ItemCommon.DelItem(curPlayer, timeOutItem, 1, False, "RenewItem")
 | 
 |  |  |     ItemControler.GivePlayerItem(curPlayer, changeItemID, 1, True, [IPY_GameWorld.rptItem])
 | 
 |  |  |     ItemControler.GivePlayerItem(curPlayer, changeItemID, 1, 0, [IPY_GameWorld.rptItem])
 | 
 |  |  |     PlayerControl.NotifyCode(curPlayer, 'Guardian_ContinuePay')
 | 
 |  |  |     return | 
 |  |  |     return
 | 
 |  |  | 
 | 
 |  |  | #// A3 08 物品过期 #tagCMItemTimeout
 | 
 |  |  | #
 | 
 |  |  | #struct    tagCMItemTimeout
 | 
 |  |  | #
 | 
 |  |  | #{
 | 
 |  |  | #    tagHead        Head;
 | 
 |  |  | #    BYTE        PackType;        //背包类型
 | 
 |  |  | #    BYTE        ItemIndex;        //物品在背包中索引
 | 
 |  |  | #};
 | 
 |  |  | def OnItemTimeout(index, clientData, tick):
 | 
 |  |  |     return
 |