| | |
| | | import NetPackCommon
|
| | | import Operate_EquipStone
|
| | | import PlayerFairyCeremony
|
| | | import PlayerActBossTrial
|
| | | import PlayerMagicWeapon
|
| | | import IpyGameDataPY
|
| | | import DataRecordPack
|
| | |
| | | #GameWorld.DebugLog("增加副本次数默认使用! mapID=%s" % mapID)
|
| | | tagItem.Clear()
|
| | | return True
|
| | | |
| | | #活动道具自动转化
|
| | | if PlayerActBossTrial.CheckActItemAutoTransform(curPlayer, tagItem, itemID, tagItemCount):
|
| | | tagItem.Clear()
|
| | | return True
|
| | | |
| | | if itemID in ChConfig.Def_TransformItemIDList or tagItem.GetType() == ChConfig.Def_ItemType_AutoUseMoney:
|
| | | # 直接转化为对应货币的物品仅在放入背包时直接转化,否则还是以真实物品的形式存在,但堆叠上限需要做特殊处理
|
| | | if packIndex == IPY_GameWorld.rptItem:
|
| | |
| | | curItem.Clear()
|
| | | return
|
| | |
|
| | | def ClearItemID(curPlayer, clearItemIDList, packTypeList=[IPY_GameWorld.rptItem, IPY_GameWorld.rptWarehouse]):
|
| | | ## 清除指定的物品ID列表
|
| | | clearCountDict = {}
|
| | | for packType in packTypeList:
|
| | | pack = curPlayer.GetItemManager().GetPack(packType)
|
| | | for i in xrange(pack.GetCount()):
|
| | | curItem = pack.GetAt(i)
|
| | | if not curItem or curItem.IsEmpty():
|
| | | continue
|
| | | itemID = curItem.GetItemTypeID()
|
| | | if itemID not in clearItemIDList:
|
| | | continue
|
| | | itemCount = curItem.GetCount()
|
| | | curItem.Clear()
|
| | | clearCountDict[itemID] = clearCountDict.get(itemID, 0) + itemCount
|
| | | return clearCountDict
|
| | |
|
| | | def PutItemInTempSwap(curPlayer, itemID, isAuctionItem=0):
|
| | | ## 临时背包放入物品
|
| | | # 临时交换背包目前只开放1个格子,每次放入前先清空再放入
|