| | |
| | | # @return True or False
|
| | | # @remarks 函数详细说明.
|
| | | def CheckItemByEffectID(curPlayer, curItem, effectList):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | return False
|
| | |
|
| | | if not ItemControler.CheckItemUseLV(curPlayer, curItem, False):
|
| | |
| | | for i in range(backPack.GetCount()):
|
| | | curItem = backPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(curItemPack.GetCount()):
|
| | | findItem = curItemPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(findItem) or ItemControler.GetIsAuctionItem(findItem):
|
| | | if not CheckItemCanUse(findItem):
|
| | | continue
|
| | |
|
| | | #不使用绑定的材料
|
| | |
| | | for i in range(curItemPack.GetCount()):
|
| | | curItem = curItemPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | #不使用绑定的材料
|
| | |
| | | for i in range(curItemPack.GetCount()):
|
| | | curItem = curItemPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | curPack = curPlayer.GetItemManager().GetPack(packType)
|
| | | for i in range(0, curPack.GetCount()):
|
| | | curItem = curPack.GetAt(i)
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != itemID:
|
| | |
| | | for i in xrange(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | | curItemID = curItem.GetItemTypeID()
|
| | | if curItemID not in costItemDict:
|
| | |
| | | for index in range(0, itemPack.GetCount()):
|
| | | item = itemPack.GetAt(index)
|
| | |
|
| | | if not CheckItemCanUse(item) or ItemControler.GetIsAuctionItem(item):
|
| | | if not CheckItemCanUse(item):
|
| | | continue
|
| | |
|
| | | itemTypeID = item.GetItemTypeID()
|
| | |
| | | if putInPackIndex in [IPY_GameWorld.rptHorseEquip]:
|
| | | DoLogic_ItemBindType(curPlayer, curItem, ChConfig.Def_BindType_DoEquipBind)
|
| | |
|
| | | if putInPackIndex not in [IPY_GameWorld.rptItem, IPY_GameWorld.rptWarehouse]:
|
| | | if ItemControler.GetIsAuctionItem(curItem):
|
| | | ItemControler.SetIsAuctionItem(curItem, False, curPlayer)
|
| | | GameWorld.DebugLog("SwitchItem 拍品设置为非拍品!curItemID=%s" % curItem.GetItemTypeID())
|
| | | if ItemControler.GetIsAuctionItem(switchItem):
|
| | | ItemControler.SetIsAuctionItem(switchItem, False, curPlayer)
|
| | | GameWorld.DebugLog("SwitchItem 拍品设置为非拍品!switchItemID=%s" % switchItem.GetItemTypeID())
|
| | | |
| | | #交换装备
|
| | | curItem.Switch(switchItem)
|
| | | return True
|
| | |
| | | # 装备技能书、坐骑装备绑定
|
| | | if putInPackIndex in [IPY_GameWorld.rptHorseEquip]:
|
| | | DoLogic_ItemBindType(curPlayer, emptyItem, ChConfig.Def_BindType_DoEquipBind)
|
| | | |
| | | if putInPackIndex not in [IPY_GameWorld.rptItem, IPY_GameWorld.rptWarehouse]:
|
| | | if ItemControler.GetIsAuctionItem(switchItem):
|
| | | ItemControler.SetIsAuctionItem(switchItem, False, curPlayer)
|
| | | GameWorld.DebugLog("PutIn 拍品设置为非拍品!switchItemID=%s" % switchItem.GetItemTypeID())
|
| | |
|
| | | if switchItem.GetGameWorldItemType() == IPY_GameWorld.gwitRoleItem:
|
| | | emptyItem.PutIn(switchItem)
|
| | |
| | | curItem = curItemPack.GetAt(i)
|
| | |
|
| | | #检查物品
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | if not CheckItemCanUse(curItem):
|
| | | continue
|
| | |
|
| | | effect = curItem.GetEffectByIndex(0)
|