From 8a132929e7184bc274b742d3e25b93782c65e9ef Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 12 十二月 2025 14:32:56 +0800
Subject: [PATCH] 16 卡牌服务端(后台查看玩家、物品)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py
index f915c20..ee3afd2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py
@@ -238,7 +238,8 @@
     @param offlineSupport: 离线玩家是否支持该命令,默认支持,当玩家离线时,会在上线后执行该命令
     @return: GMCommon.Def_xxx, curPlayer
                                 非 Def_Success 的错误类型        -    代表错误,可直接返回给后台
-            Def_Success, curPlayer    -    curPlayer为空时代表玩家离线状态
+            Def_Success, curPlayer    -    curPlayer为空时代表玩家离线状态,注:离线状态且需要支持离线处理的才返回 (Def_Success, None)
+            GMCommon.Def_PlayerOfLine, dbPlayer    -    不需要支持离线处理时,返回离线跟 dbPlayer
     '''
     
     queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
@@ -249,24 +250,24 @@
     
     # 玩家姓名
     if queryType == GMCommon.Def_GMKey_PlayerName:
-        rec = PyGameData.g_usrCtrlDB.findDBPlayerByName(playerFind)
+        dbPlayer = PyGameData.g_usrCtrlDB.findDBPlayerByName(playerFind, True)
     elif queryType == GMCommon.Def_GMKey_PlayerAccID:
-        rec = PyGameData.g_usrCtrlDB.findDBPlayerByAccID(playerFind)
+        dbPlayer = PyGameData.g_usrCtrlDB.findDBPlayerByAccID(playerFind, True)
     else:
         return GMCommon.Def_ParamErr, None
     
-    if not rec:
+    if not dbPlayer:
         # db找不到就是不存在该玩家
         return GMCommon.Def_NoTag, None
     
-    playerID = rec.get(u'PlayerID', 0)
+    playerID = dbPlayer.PlayerID
     curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
     if not curPlayer or curPlayer.IsEmpty():
         # 离线处理
         if offlineSupport:
             PlayerOfflineSupport.AddOfflineUnprocessed(playerID, "GMToolCMD", gmCmdDict)
             return GMCommon.Def_Success, None
-        return GMCommon.Def_PlayerOfLine, None
+        return GMCommon.Def_PlayerOfLine, dbPlayer
     
     return GMCommon.Def_Success, curPlayer
 

--
Gitblit v1.8.0