| | |
| | | # @remarks 函数详细说明.
|
| | | def CanPackItemByItemType(srcItemID, srcItemIsBind, destItemID, destItemIsBind):
|
| | | ## 拍品项目,只有非拍品可堆叠,即绑定物品
|
| | | if srcItemID == destItemID and srcItemIsBind == destItemIsBind and srcItemIsBind:
|
| | | if srcItemID == destItemID and srcItemIsBind == destItemIsBind and not srcItemIsBind:
|
| | | return True
|
| | | return False
|
| | |
|
| | |
| | | packIndex = ChConfig.GetItemPackType(curItemData.GetType(), packIndex)
|
| | |
|
| | | tagItemCount = GetItemCount(tagItem)
|
| | | isBind = tagItem.GetIsBind()
|
| | | isAuctionItem = not isBind
|
| | | isAuctionItem = tagItem.GetIsBind()
|
| | | if not self.CanPutInItem(packIndex, tagItem.GetItemTypeID(), tagItemCount, isAuctionItem, defaultPile):
|
| | | GameWorld.DebugLog("背包满,不能放入物品 count = %d"%GetItemCount(tagItem))
|
| | | tagItem.Clear()
|
| | |
| | | GameWorld.Log("找不到ItemID = %d" % curItemID)
|
| | | return False, 0
|
| | |
|
| | | isBind = True
|
| | | if curItemID in ChConfig.Def_TransformItemIDList:
|
| | | # 货币直接转换的物品如果是放入背包的则直接转化,无需暂用格子
|
| | | if packIndex == IPY_GameWorld.rptItem:
|
| | |
| | | elif isAuctionItem:
|
| | | maxPackCount = curItemCount
|
| | | defaultPile = False # 新放入的拍品只能放空位置,所以不判断堆叠
|
| | | isBind = False
|
| | | else:
|
| | | maxPackCount = curItemData.GetPackCount()
|
| | |
|
| | |
| | | if item.GetIsLocked():
|
| | | continue
|
| | |
|
| | | if (CanPackItemByItemType(item.GetItemTypeID(), item.GetIsBind(), curItemID, isBind) and
|
| | | if (CanPackItemByItemType(item.GetItemTypeID(), item.GetIsBind(), curItemID, isAuctionItem) and
|
| | | maxPackCount > GetItemCount(item)):
|
| | | #该物品锁定不执行==============================================
|
| | | #可堆叠
|
| | |
| | | #curItemGUID = curItem.GetGUID()
|
| | | curItemCount = curItem.GetCount()
|
| | | #curItemIsBind = curItem.GetIsBind()
|
| | | isAuctionItem = 0 if curItem.GetIsBind() else 1
|
| | | isAuctionItem = curItem.GetIsBind()
|
| | | #toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
|
| | |
|
| | | # 常规物品转移到虚拟符印背包
|
| | |
| | | #tmpEquipData.starLV = int(itemData.get('StarLV', '0'))
|
| | | #tmpEquipData.holeCnt = int(itemData.get('HoleCount', '0'))
|
| | | #tmpEquipData.stoneData = eval(itemData.get('StoneData', '[]'))
|
| | | tmpEquipData.isBind = 1 if not isAuctionItem else 0
|
| | | tmpEquipData.isBind = isAuctionItem
|
| | | #tmpEquipData.isSuite = int(itemData.get('IsSuit', '0'))
|
| | | #tmpEquipData.suiteLV = int(itemData.get('SuiteLV', '0'))
|
| | | #if tmpEquipData.suiteLV:
|
| | |
| | | '''获取生成到装备上的传奇属性
|
| | | @return: None 或者 [[传奇属性效果ID列表], [属性值列表]]
|
| | | '''
|
| | | if not curItem.GetIsBind():
|
| | | if curItem.GetIsBind():
|
| | | #GameWorld.DebugLog("拍品无法生成传奇属性!")
|
| | | return
|
| | | itemID = curItem.GetItemTypeID()
|