From 17a6cf93c19a3a74bc38c06d85f7655c0266105a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 04 七月 2024 19:06:30 +0800 Subject: [PATCH] 10198 【香港】【越南】【主干】【砍树】【后端】BOSS凭证优化 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py index 58bc0eb..5a9e24c 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py @@ -32,6 +32,7 @@ import NetPackCommon import Operate_EquipStone import PlayerFairyCeremony +import PlayerActBossTrial import PlayerMagicWeapon import IpyGameDataPY import DataRecordPack @@ -1152,7 +1153,11 @@ #GameWorld.DebugLog("增加副本次数默认使用! mapID=%s" % mapID) tagItem.Clear() return True - + #活动道具自动转化 + if PlayerActBossTrial.CheckActItemAutoTransform(curPlayer, tagItem, itemID, tagItemCount): + tagItem.Clear() + return True + #增加竞技场次数 if itemEff.GetEffectID() == ChConfig.Def_Effect_AddArenaBattleCount: PlayerArena.AddArenaBattleCount(curPlayer, itemEff.GetEffectValue(0)) @@ -2333,6 +2338,23 @@ 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个格子,每次放入前先清空再放入 -- Gitblit v1.8.0