From 3afcfad8a40b4638ff069c63a83af90640fa6559 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 11 二月 2026 17:32:52 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(优化公会互通后某个游戏服在没有公会没有玩家加入跨服公会时下次维护无法成功显示加入跨服分区;优化分区配置检查,异常时不应用配置且发送qq邮件;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 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 ee3afd2..79723ec 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
@@ -45,6 +45,7 @@
 import PyGameData
 import GameWorld
 import DBDataMgr
+import time
       
 ################################################################## 
                 ####### python逻辑入口 ####### 
@@ -101,6 +102,8 @@
     mylog.info('GM Tool Cmd->%s,orderId->%s'%(cmd, orderId))
     funcName = ''
     try:
+        GameWorld.GetGameWorld().SetCurGameWorldIndex(0) # 需要设置,不然获取不到 GetMap 等虚拟分线相关接口
+        
         # 获得gm命令信息
         gmCmdDict = eval(cmd)          
         funcName = gmCmdDict.get(GMCommon.Def_GMKey_Type, '')  
@@ -320,6 +323,13 @@
         execType = GMCommon.Def_Unknow
         execInfo = ''
         if callFunc != None:
+            if GameWorld.IsBattleServer():
+                lastTime = PyGameData.g_batServerGMTTimeDict.get(self.funcName, 0)
+                curTime = int(time.time())
+                if lastTime and curTime - lastTime <= 60:
+                    GameWorld.Log("战斗服务器1分钟内不重复处理GMT命令! %s, lastTime=%s" % (self.funcName, GameWorld.ChangeTimeNumToStr(lastTime)))
+                    return
+                PyGameData.g_batServerGMTTimeDict[self.funcName] = curTime
             ret = callFunc(self.gmCmdDict)
             if isinstance(ret, int):
                 execType = ret
@@ -439,7 +449,10 @@
     resultMsg = json.dumps(resultDcit, ensure_ascii=False)
     
     mylog.info("gm result:%s"%resultMsg)
-    SendToGMToolCommandResult(orderId, resultMsg)
+    if GameWorld.IsBattleServer():
+        mylog.info("战斗服务器暂时不回复GM命令处理结果")
+    else:
+        SendToGMToolCommandResult(orderId, resultMsg)
     return
 
 

--
Gitblit v1.8.0