ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/ProjSpecialProcess.py
@@ -45,6 +45,7 @@
import PyGameData
import GameWorld
import DBDataMgr
import time
      
################################################################## 
                ####### python逻辑入口 ####### 
@@ -238,7 +239,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 +251,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
@@ -319,6 +321,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
@@ -438,7 +447,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