| | |
| | | callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "OnGetMergeParam"))
|
| | | if callFunc != None:
|
| | | extendParamList = callFunc(curPlayer)
|
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_GMCMD, alist + extendParamList)
|
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_GMCMD, {"cmdMsgList":alist + extendParamList})
|
| | |
|
| | | callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "OnExec"))
|
| | | if callFunc == None:
|
| | |
| | | GameWorld.DebugAnswer(curPlayer, 'no cmd !!!')
|
| | | return
|
| | |
|
| | | callFunc(curPlayer, alist[1:])
|
| | | |
| | | isSendToDB = callFunc(curPlayer, alist[1:])
|
| | | if isSendToDB:
|
| | | msg = str(alist)
|
| | | GameWorld.GetGameWorld().SendDBLogic(ChConfig.gstDBLogic_GMCmd, 0, msg, len(msg))
|
| | | |
| | | except BaseException:
|
| | | GameWorld.DebugAnswer(curPlayer, "执行GM命令错误, 请查看GameServer日志!")
|
| | | errorMsg = str(traceback.format_exc())
|
| | |
| | | callFunc(orderId, cmdDict)
|
| | |
|
| | | except BaseException:
|
| | | GameWorld.Log('GM命令错误 - > %s'%(traceback.format_exc()))
|
| | |
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_GMGSEntranceFail)
|
| | | if GameWorld.GetGameWorld().GetDebugLevel():
|
| | | raise BaseException(str(traceback.format_exc()))
|
| | | GameWorld.RaiseException('GM命令错误\r\n%s'%(traceback.format_exc()))
|
| | | return
|
| | |
|
| | | return
|
| | |
| | | return cmdDict
|
| | |
|
| | | ## 收到子服务器发送的GM命令
|
| | | def ClientServerMsg_GMCMD(cmdMsgList, tick):
|
| | | def ClientServerMsg_GMCMD(msgData, tick):
|
| | | cmdMsgList = msgData["cmdMsgList"]
|
| | | dbAnswerList = msgData.get("dbAnswerList", [])
|
| | | for dbAnswer in dbAnswerList:
|
| | | GameWorld.DebugAnswer(None, dbAnswer)
|
| | | |
| | | if len(cmdMsgList) == 0:
|
| | | return
|
| | |
|
| | |
| | | ctgInfoList.append(gmCmdDict)
|
| | | PyGameData.g_gmtOfflinePlayerInfo[key] = ctgInfoList
|
| | | GameWorld.Log("离线玩家添加GMT: g_gmtOfflinePlayerInfo=%s" % str(PyGameData.g_gmtOfflinePlayerInfo))
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, "Player is off line.")
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, "玩家不在线,将在上线后自动处理")
|
| | | return
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | |
| | | if not pack_type:
|
| | | continue
|
| | |
|
| | | callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(pack_type, "OnOfflineCTGInfo"))
|
| | | callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(pack_type, "OnOfflineGMTInfo"))
|
| | | if callFunc:
|
| | | GameWorld.Log("玩家上线执行GMT: %s, tagMapID=%s, %s" % (pack_type, tagMapID, gmCmdDict), curPlayer.GetPlayerID())
|
| | | callFunc(curPlayer, tagMapID, gmCmdDict)
|