From c7be7cd97a32658b8629f8c67fbd4973b642de46 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 04 九月 2024 18:20:54 +0800 Subject: [PATCH] 10241 【越南】【砍树】 古宝养成(增加商店支持;) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py index 104a736..9e35962 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py @@ -20,6 +20,7 @@ import GameWorld import GameWorship +import GameXiangong import PlayerControl import NetPackCommon import GameWorldArena @@ -67,6 +68,9 @@ return True if PyDataManager.GetDBPyFuncTeamManager().IsTeamPlayer(playerID): + return True + + if GameXiangong.IsXiangongPlayer(playerID): return True if GameWorldSkyTower.IsSkyTowerPassPlayer(playerID): @@ -188,28 +192,33 @@ curCache.PropDataDict = eval(curCache.PropData) return curCache.PropDataDict -def GetShotCahceDict(playerID, withEquip=False): +def GetShotCacheDict(playerID, *exAttrs): ## 获取玩家简短的缓存信息字典 viewCache = FindViewCache(playerID) cacheDict = GetCachePropDataDict(viewCache) if not cacheDict: return {} - olMgr = ChPlayer.GetOnlinePlayerMgr() shotCacheDict = { - "PlayerID":playerID, "Name":cacheDict["Name"], "Job":cacheDict["Job"], "LV":cacheDict["LV"], "RealmLV":cacheDict["RealmLV"], - "FightPower":cacheDict["FightPower"], - "ServerID":GameWorld.GetAccIDServerID(cacheDict["AccID"]), - "OfflineValue":olMgr.GetOfflineValue(playerID, viewCache) } - if withEquip: + if "PlayerID" in exAttrs: + shotCacheDict["PlayerID"] = playerID + if "FightPower" in exAttrs: + shotCacheDict["FightPower"] = cacheDict["FightPower"] + if "ServerID" in exAttrs: + shotCacheDict["ServerID"] = GameWorld.GetAccIDServerID(cacheDict["AccID"]) + if "OfflineValue" in exAttrs: + olMgr = ChPlayer.GetOnlinePlayerMgr() + shotCacheDict["OfflineValue"] = olMgr.GetOfflineValue(playerID, viewCache) + # 附带外观模型展示相关 + if "Model" in exAttrs: shotCacheDict.update({ "TitleID":cacheDict.get("TitleID", 0), "EquipShowSwitch":cacheDict.get("EquipShowSwitch", 0), - "EquipShowID":cacheDict.get("EquipShowID", 0), + "EquipShowID":cacheDict.get("EquipShowID", []), }) return shotCacheDict @@ -229,7 +238,7 @@ "TitleID":cacheDict.get("TitleID", 0), "FightPower":PlayerControl.GetFightPower(curPlayer), "EquipShowSwitch":cacheDict.get("EquipShowSwitch", 0), - "EquipShowID":cacheDict.get("EquipShowID", 0), + "EquipShowID":cacheDict.get("EquipShowID", []), "ServerGroupID":PlayerControl.GetPlayerServerGroupID(curPlayer), } return cacheBase -- Gitblit v1.8.0