| | |
| | | # @return True or False
|
| | | # @remarks 函数详细说明.
|
| | | def CheckItemByEffectID(curPlayer, curItem, effectList):
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | return False
|
| | |
|
| | | if not ItemControler.CheckItemUseLV(curPlayer, curItem, False):
|
| | |
| | | for i in range(backPack.GetCount()):
|
| | | curItem = backPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | |
|
| | | return isExpireItem, remainingTime
|
| | |
|
| | | ##检查该物品是否合法,类型验证
|
| | | # @param curItem 物品实例
|
| | | # @param checkType 物品类型 |
| | | # @return 布尔值(物品是否合法)
|
| | | # @remarks 检查该物品是否合法,类型验证
|
| | | def CheckItemByType(curItem, checkType):
|
| | | #验证材料
|
| | | if not CheckItemCanUse(curItem):
|
| | | return False
|
| | | |
| | | #类型不符合
|
| | | if curItem.GetType() != checkType:
|
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | | ## 检查装备是否有镶嵌宝石
|
| | | # @param curItem 装备对象
|
| | | # @return True-有
|
| | |
| | | for i in range(curItemPack.GetCount()):
|
| | | findItem = curItemPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(findItem):
|
| | | if not CheckItemCanUse(findItem) or ItemControler.GetIsAuctionItem(findItem):
|
| | | continue
|
| | |
|
| | | #不使用绑定的材料
|
| | |
| | | for i in range(curItemPack.GetCount()):
|
| | | curItem = curItemPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | #不使用绑定的材料
|
| | |
| | | for i in range(curItemPack.GetCount()):
|
| | | curItem = curItemPack.GetAt(i)
|
| | |
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in range(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | if curItem.GetItemTypeID() != findItemID:
|
| | |
| | | for i in xrange(itemPack.GetCount()):
|
| | | curItem = itemPack.GetAt(i)
|
| | | #过滤不符合其他条件的物品
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(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):
|
| | | if not CheckItemCanUse(item) or ItemControler.GetIsAuctionItem(item):
|
| | | continue
|
| | |
|
| | | itemTypeID = item.GetItemTypeID()
|
| | |
| | | curItem = curItemPack.GetAt(i)
|
| | |
|
| | | #检查物品
|
| | | if not CheckItemCanUse(curItem):
|
| | | if not CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
|
| | | continue
|
| | |
|
| | | effect = curItem.GetEffectByIndex(0)
|