| | |
| | | elif itemID == ChConfig.Def_ItemID_BossReborn:
|
| | | msgStr = str(itemCount)
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'AddBossRebornPoint', msgStr, len(msgStr))
|
| | | elif itemID == ChConfig.Def_ItemID_Ysog:
|
| | | PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_Ysog, itemCount)
|
| | |
|
| | | return True
|
| | |
|
| | |
| | | def PutInItem(self, packIndex, tagItem, defaultPile=True, event=["", False, {}]):
|
| | | curPlayer = self.__Player
|
| | |
|
| | | if self.__DoTransformItem(curPlayer, tagItem):
|
| | | tagItem.Clear() # 需清除,不然会导致内存泄露
|
| | | if packIndex != ShareDefine.rptTreasure and self.__DoTransformItem(curPlayer, tagItem):
|
| | | tagItem.Clear() # 需清除,不然会导致内存泄露 寻宝仓库可暂存直接转化数值的物品
|
| | | return True
|
| | |
|
| | | isEquip = ItemCommon.CheckItemIsEquip(tagItem)
|
| | |
| | | DropItemToOtherPack(curPlayer, clientData.SrcBackpack, clientData.DesBackPack, clientData.SrcIndex, clientData.IsAll)
|
| | | return
|
| | |
|
| | | def DropItemToOtherPack(curPlayer, fromPackIndex, toPackIndex, index, isAll=False):
|
| | | def DropItemToOtherPack(curPlayer, fromPackIndex, desPackIndex, index, isAll=False):
|
| | | '''拖动某个背包物品到玩家物品背包
|
| | | '''
|
| | | movePack = curPlayer.GetItemManager().GetPack(fromPackIndex)
|
| | |
| | |
|
| | | #整个背包转移
|
| | | if isAll:
|
| | | fullPackList = []
|
| | | for itemIndex in xrange(movePack.GetCount()):
|
| | | curItem = movePack.GetAt(itemIndex)
|
| | | if not curItem or curItem.IsEmpty():
|
| | | continue
|
| | | toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), desPackIndex)
|
| | | if toPackIndex in fullPackList:
|
| | | continue
|
| | | if not __DoDropItemToOtherPack(curPlayer, itemControl, fromPackIndex, toPackIndex, itemIndex, curItem):
|
| | | return
|
| | | if toPackIndex not in fullPackList:
|
| | | fullPackList.append(toPackIndex)
|
| | | |
| | | for fullPackIndex in fullPackList:
|
| | | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_676165", [fullPackIndex])
|
| | |
|
| | | #单个物品转移
|
| | | else:
|
| | | curItem = movePack.GetAt(index)
|
| | | if not curItem or curItem.IsEmpty():
|
| | | return
|
| | | toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), desPackIndex)
|
| | | __DoDropItemToOtherPack(curPlayer, itemControl, fromPackIndex, toPackIndex, index, curItem)
|
| | | return
|
| | |
|
| | |
| | | #curItemGUID = curItem.GetGUID()
|
| | | curItemCount = curItem.GetCount()
|
| | | curItemIsBind = curItem.GetIsBind()
|
| | | toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
|
| | | #toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
|
| | |
|
| | | # 常规物品转移到虚拟符印背包
|
| | | if toPackIndex == ShareDefine.rptRune:
|