From e4db2ba641edc50c65e7e4b9f52f7b4e261a9c33 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 13 六月 2024 16:13:16 +0800 Subject: [PATCH] 10178 【越南】【香港】【主干】挂机奖励 砍树冲突 --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py index 4c596ad..d4ead59 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py @@ -148,6 +148,8 @@ def GetCachePropDataDict(curCache): ## 获取缓存基础属性字典信息 + if not curCache: + return {} if not hasattr(curCache, "PropDataDict"): curCache.PropDataDict = {} if not curCache.PropDataDict and curCache.PropData: @@ -192,12 +194,7 @@ return curCache.LV = curPackData.PlayerLV curCache.OffTime = curPackData.OffTime - if isLogout: - curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID) - if curPlayer: - curCache.GeTuiID = curPlayer.GetGeTuiClientID() - curCache.GeTuiIDSize = len(curCache.GeTuiID) - + curCache.PropDataDict = {} # 每次更新数据时,重置字典缓存,下次获取时重新eval缓存 curCache.PropData = curPackData.PropData curCache.PropDataSize = curPackData.PropDataSize @@ -319,6 +316,7 @@ answerPack.RealmLV = 1 answerPack.OnlineType = ChConfig.Def_Offline answerPack.ServerGroupID = 0 + answerPack.Face = 0 else: cacheDict = GetCachePropDataDict(curCache) answerPack.PlayerID = clientPack.PlayerID @@ -327,6 +325,7 @@ answerPack.LV = cacheDict["LV"] answerPack.RealmLV = cacheDict["RealmLV"] answerPack.OnlineType = ChConfig.Def_Offline + answerPack.Face = cacheDict.get("Face", 0) if GameWorld.IsCrossServer(): answerPack.ServerGroupID = cacheDict.get("ServerGroupID", 0) @@ -341,6 +340,7 @@ answerPack.OnlineType = ChConfig.Def_Online answerPack.IsInTeam = tagPlayer.GetTeamID() > 0 answerPack.ServerGroupID = PlayerControl.GetPlayerServerGroupID(tagPlayer) + answerPack.Face = tagPlayer.GetFace() curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) NetPackCommon.SendFakePack(curPlayer, answerPack) -- Gitblit v1.8.0