From 7d1895023c1a5263f5997979fc583a06f5e7e786 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 04 九月 2024 16:16:46 +0800 Subject: [PATCH] 10249 【越南】【砍树】仙宫(新增仙宫系统;跨服boss历练、跨服仙匣秘境、跨服骑宠养成;跨服古宝养成、跨服排位赛个人排行榜结算支持晋升仙宫;) --- 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