From 4f2f03dba59e59672a0eb5333ca53eb0b84b3aa9 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 08 十月 2018 15:05:51 +0800 Subject: [PATCH] 2091 【后端】优化拾取导致的报错; 去除国庆时部分玩家装备传奇属性bug的临时处理代码; --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 2 -- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py | 5 +++-- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py index 825f0f3..b48749c 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py @@ -364,8 +364,8 @@ def GetItemPackType(itemType, defaultPack=IPY_GameWorld.rptItem): ## 获取物品类型对应存放的默认背包类型 - if defaultPack == ShareDefine.rptTreasure: - #寻宝背包不做处理 + if defaultPack in [ShareDefine.rptTreasure, ShareDefine.rptTempItem]: + #寻宝背包、临时背包不做处理 return defaultPack for pack, itemTypeList in Def_PackItemTypeList_Dict.items(): if itemType in itemTypeList: diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py index 0154b23..53626ee 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py @@ -244,6 +244,7 @@ isPutInTemp = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PickupItemPutInTemp) packIndex = ShareDefine.rptTempItem if isPutInTemp else IPY_GameWorld.rptItem + packIndex = ChConfig.GetItemPackType(singItem.GetType(), packIndex) # 是否可放入 if not itemControl.CanPutInItem(packIndex, curItemID, curItemCount, curItemIsBind): @@ -260,8 +261,8 @@ if not itemControl.PutInItem(packIndex, singItem, event=[ChConfig.ItemGive_Pickup, False, {"NPCID":dropItemNPCID}]): #物品不能放入 #PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_676165", [packIndex]) - GameWorld.Log("拾取物品放入背包失败!mapItemID=%s,dropItemNPCID=%s,curItemID=%s,packIndex=%s" - % (mapItemID, dropItemNPCID, curItemID, packIndex), curPlayer.GetPlayerID()) + GameWorld.ErrLog("拾取物品放入背包失败!mapItemID=%s,dropItemNPCID=%s,curItemID=%s,packIndex=%s" + % (mapItemID, dropItemNPCID, curItemID, packIndex), curPlayer.GetPlayerID()) return if dropItemNPCID: diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py index 281504c..fb1a30c 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py @@ -548,8 +548,6 @@ # 上线查询一次充值订单 curPlayer.SendDBQueryRecharge() - # 上线检查一次装备属性 - ItemControler.PlayerItemControler(curPlayer).CheckRolePackEquipAttr() curPlayer.SetState(0) # 脱机挂恢复为正常上线 curPlayer.SetFacePic(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线 -- Gitblit v1.8.0