| | |
| | | GameWorld.DebugLog(" 物品无法使用!")
|
| | | return
|
| | |
|
| | | # 使用拍品
|
| | | if not curItem.GetIsBind():
|
| | | __DoLogic_PlayerUseAuctionItem(curPlayer, curItem, itemIndex, exData)
|
| | | return
|
| | | |
| | | if useCnt <= 0:
|
| | | useCnt = curItem.GetCount()
|
| | | GameWorld.DebugLog(" 没指定使用个数,默认使用全部=%s" % useCnt)
|
| | |
|
| | | __DoLogic_PlayerUseItemSelf(curPlayer, itemIndex, tick, useCnt, exData)
|
| | |
|
| | | return
|
| | |
|
| | | def __DoLogic_PlayerUseAuctionItem(curPlayer, curItem, itemIndex, exData):
|
| | | ## 玩家使用拍品
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | itemID = curItem.GetItemTypeID()
|
| | | |
| | | curItem.SetIsBind(1) # 设置为非拍品
|
| | | GameWorld.DebugLog("玩家使用拍品: itemIndex=%s,itemID=%s,exData=%s" % (itemID, itemIndex, exData), 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
|
| | |
|
| | |
| | | ItemControler.GivePlayerItem(curPlayer, changeItemID, 1, 0, [IPY_GameWorld.rptItem])
|
| | | PlayerControl.NotifyCode(curPlayer, 'Guardian_ContinuePay')
|
| | | return |
| | |
|
| | | #// A3 08 物品过期 #tagCMItemTimeout
|
| | | #
|
| | | #struct tagCMItemTimeout
|
| | | #
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE PackType; //背包类型
|
| | | # BYTE ItemIndex; //物品在背包中索引
|
| | | #};
|
| | | def OnItemTimeout(index, clientData, tick):
|
| | | return
|