From f6a81cd4102012a3d8425d42ef1acab76c71147e Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 15 十月 2024 17:03:10 +0800 Subject: [PATCH] 5328 【越南】【英文】【砍树】神兽装备格子拓展(扩展为125格) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 38 ++++++++++++++++++++++---------------- 1 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py index 6c146c4..a60bc5a 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py @@ -205,22 +205,23 @@ "LV":cacheDict["LV"], "RealmLV":cacheDict["RealmLV"], } - 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", []), - }) + for attrName in exAttrs: + if attrName == "PlayerID": + shotCacheDict["PlayerID"] = playerID + elif attrName == "ServerID": + shotCacheDict["ServerID"] = GameWorld.GetAccIDServerID(cacheDict["AccID"]) + elif attrName == "OfflineValue": + olMgr = ChPlayer.GetOnlinePlayerMgr() + shotCacheDict["OfflineValue"] = olMgr.GetOfflineValue(playerID, viewCache) + # 附带外观模型展示相关 + elif attrName == "Model": + shotCacheDict.update({ + "TitleID":cacheDict.get("TitleID", 0), + "EquipShowSwitch":cacheDict.get("EquipShowSwitch", 0), + "EquipShowID":cacheDict.get("EquipShowID", []), + }) + elif attrName in cacheDict: + shotCacheDict[attrName] = cacheDict[attrName] return shotCacheDict def GetSyncCrossCacheBase(curPlayer): @@ -234,6 +235,8 @@ "Job":curPlayer.GetJob(), "VIPLV":curPlayer.GetVIPLv(), "Name":CrossRealmPlayer.GetCrossPlayerName(curPlayer), + "Face":curPlayer.GetFace(), + "FacePic":curPlayer.GetFacePic(), "FamilyID":curPlayer.GetFamilyID(), "FamilyName":cacheDict.get("FamilyName", ""), "TitleID":cacheDict.get("TitleID", 0), @@ -429,6 +432,7 @@ answerPack.OnlineType = ChConfig.Def_Offline answerPack.ServerGroupID = 0 answerPack.Face = 0 + answerPack.FacePic = 0 else: cacheDict = GetCachePropDataDict(curCache) answerPack.PlayerID = clientPack.PlayerID @@ -438,6 +442,7 @@ answerPack.RealmLV = cacheDict["RealmLV"] answerPack.OnlineType = ChConfig.Def_Offline answerPack.Face = cacheDict.get("Face", 0) + answerPack.FacePic = cacheDict.get("FacePic", 0) if GameWorld.IsCrossServer(): answerPack.ServerGroupID = cacheDict.get("ServerGroupID", 0) @@ -453,6 +458,7 @@ answerPack.IsInTeam = tagPlayer.GetTeamID() > 0 answerPack.ServerGroupID = PlayerControl.GetPlayerServerGroupID(tagPlayer) answerPack.Face = tagPlayer.GetFace() + answerPack.FacePic = tagPlayer.GetFacePic() curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) NetPackCommon.SendFakePack(curPlayer, answerPack) -- Gitblit v1.8.0