From 53d605f793fda7a8d53aa7c8dad4d353b2e742a7 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 25 七月 2019 22:03:41 +0800 Subject: [PATCH] 4562 【主干】【2.0.300】拍卖行关注拍品数量过多导致报错 --- ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py | 4 +++- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py index fec6691..c3ae103 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/AuctionHouse.py @@ -218,7 +218,9 @@ def __InitAuctionAttentionAttrEx(attentionData): ## 初始化拍卖关注实例附加属性 - setattr(attentionData, "AttentionItemIDList", [] if not attentionData.AttentionInfo else json.loads(attentionData.AttentionInfo)) + setattr(attentionData, "AttentionItemIDList", []) + if attentionData.AttentionInfo.startswith("[") and attentionData.AttentionInfo.endswith("]"): + attentionData.AttentionItemIDList = json.loads(attentionData.AttentionInfo) return ##------------------------------------------------------------------------------------------------- diff --git a/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py b/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py index 0772738..1d073dc 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py @@ -151,7 +151,9 @@ def __InitAuctionAttentionAttrEx(self, attentionData): ## 初始化拍卖关注实例附加属性 - setattr(attentionData, "AttentionItemIDList", [] if not attentionData.AttentionInfo else eval(attentionData.AttentionInfo)) + setattr(attentionData, "AttentionItemIDList", []) + if attentionData.AttentionInfo.startswith("[") and attentionData.AttentionInfo.endswith("]"): + attentionData.AttentionItemIDList = eval(attentionData.AttentionInfo) return #拍卖物品数据缓存,该类只做数据缓存存取,不写功能逻辑,防止重读脚本时功能逻辑脚本不生效 -- Gitblit v1.8.0