From e74b2fdd8a052d7c40adfeab9b881d7cb2cc8369 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 18 十二月 2024 15:41:47 +0800
Subject: [PATCH] 10297 【越南】【英语】【砍树】【tqxbqy】轮回殿-服务端(增加GM命令: Lunhui)

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py |   41 ++++++++++++++++-------------------------
 1 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
index eee9715..1f8ca38 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
@@ -499,34 +499,25 @@
     return
 
 def Sync_PlayerShortInfo(curPlayer, curCache):
+    if not curCache:
+        PlayerControl.NotifyCode(curPlayer, "ViewPlayer_OffLine")
+        return
     answerPack = ChPyNetSendPack.tagGCAnswerPlayerShortInfo()
     answerPack.Clear()
-    if not curCache:
-        # 实在找不到设置为初始化数据
-        answerPack.PlayerID = curCache.PlayerID
-        answerPack.PlayerName = ""
-        answerPack.Job = 1
-        answerPack.LV = 1
-        answerPack.RealmLV = 1
-        answerPack.OnlineType = ChConfig.Def_Offline
-        answerPack.ServerGroupID = 0
-        answerPack.Face = 0
-        answerPack.FacePic = 0
+    cacheDict = GetCachePropDataDict(curCache)
+    answerPack.PlayerID = curCache.PlayerID
+    answerPack.PlayerName = cacheDict["Name"]
+    answerPack.Job = cacheDict["Job"]
+    answerPack.LV = cacheDict["LV"]
+    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)
     else:
-        cacheDict = GetCachePropDataDict(curCache)
-        answerPack.PlayerID = curCache.PlayerID
-        answerPack.PlayerName = cacheDict["Name"]
-        answerPack.Job = cacheDict["Job"]
-        answerPack.LV = cacheDict["LV"]
-        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)
-        else:
-            answerPack.ServerGroupID = GameWorld.GetServerGroupID()
+        answerPack.ServerGroupID = GameWorld.GetServerGroupID()
     NetPackCommon.SendFakePack(curPlayer, answerPack)
     return
 

--
Gitblit v1.8.0