| | |
| | | import random
|
| | | import GameObj
|
| | |
|
| | | # 可吞噬的装备位
|
| | | Def_EatItem_EquipPlace = [
|
| | | ShareDefine.retWeapon, #1 主手
|
| | | ShareDefine.retWeapon2, #2 副手
|
| | | ShareDefine.retHat, #3 帽子
|
| | | ShareDefine.retClothes, #4 衣服
|
| | | ShareDefine.retBelt, #5 腰带
|
| | | ShareDefine.retTrousers, #6 裤子
|
| | | ShareDefine.retShoes, #7 鞋子
|
| | | ShareDefine.retNeck, #8 项链
|
| | |
|
| | | ]
|
| | |
|
| | | Def_EatSpace = 5 # 低于X格自动吞噬
|
| | |
|
| | |
|
| | |
| | | # 满了不再给物品
|
| | | return
|
| | |
|
| | | dropIDCountDict, dropIDBindDict, money = {}, {}, 0
|
| | | dropIDCountDict, auctionIDList, money = {}, [], 0
|
| | | dropRet = NPCCommon.GetNPCDropInfoTJG(curPlayer, curPlayer.GetMapID(), npcID, killCnt)
|
| | | if dropRet:
|
| | | dropIDCountDict, dropIDBindDict, money = dropRet
|
| | | dropIDCountDict, auctionIDList, money = dropRet
|
| | | # 1. 出售为铜钱 2.放入背包 3.满则不继续给物品
|
| | | for itemID, dropCount in dropIDCountDict.items():
|
| | | if not ItemCommon.CheckPackHasSpace(curPlayer, IPY_GameWorld.rptItem):
|
| | |
| | | if not curItemData:
|
| | | continue
|
| | |
|
| | | # 掉落绑定, 默认绑定
|
| | | isDropBind = dropIDBindDict.get(itemID, 1)
|
| | | isAuctionItem = itemID in auctionIDList
|
| | | itemControl = ItemControler.PlayerItemControler(curPlayer)
|
| | |
|
| | | ## 装备物品 白蓝直接换算铜钱
|
| | |
| | | ## 装备一件件给
|
| | | if ItemCommon.GetIsEquip(curItemData):
|
| | | for _ in xrange(dropCount):
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, 1, isDropBind)
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, 1, isAuctionItem)
|
| | | if not curItem:
|
| | | continue
|
| | | if not itemControl.PutInItem(IPY_GameWorld.rptItem, curItem, event=[ChConfig.ItemGive_TJGDropItem, False, {}]):
|
| | |
| | | #记录紫橙装数量用于通知
|
| | | NoteEquip(curPlayer, curItemData.GetItemColor())
|
| | | else:
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, dropCount, isDropBind)
|
| | | curItem = ItemControler.GetOutPutItemObj(itemID, dropCount, isAuctionItem)
|
| | | if not curItem:
|
| | | continue
|
| | |
|
| | |
| | |
|
| | | equipScores = {}
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for i in Def_EatItem_EquipPlace:
|
| | | for i in ChConfig.EquipPlace_Base:
|
| | | equipItem = equipPack.GetAt(i)
|
| | | if not equipItem or equipItem.IsEmpty():
|
| | | continue
|