From 83ea442cfaceaf76648c6ec948e4494a10e228db Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 12 九月 2024 17:01:40 +0800 Subject: [PATCH] 10261 【越南】【砍树】仙盟徽章,头像框,头像(动态),聊天气泡,聊天表情(增加仙盟徽章) --- ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py | 42 +++++++++++++++++++----------------------- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py index 943407b..858d160 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py @@ -19,10 +19,11 @@ import GameWorld import Commands import IPY_GameServer -import MergeChildMsg +import CrossRealmMsg import PyGameData import traceback import GMCommon +import ShareDefine import os #--------------------------------------------------------------------- g_broadCastList = [] @@ -86,15 +87,23 @@ GameWorld.Log("###使用GM命令 = %s错误,玩家不是GM"%(callFunName), curPlayer.GetPlayerID()) return - #非跨服服务器下使用跨服专属GM命令,则发送到跨服 - if not GameWorld.IsMergeServer(): + #把剩余参数转换为整型 + for i in range(0, len(alist)): + if i == 0: + continue + value = GameWorld.ToIntDef(alist[i], None) + if value == None: + #GameWorld.DebugAnswer(curPlayer, "参数错误, 参数%s必须为纯数字!" % (i + 1)) + continue + alist[i] = value + + #非跨服服务器下使用跨服GM命令,则发送到跨服 + if not GameWorld.IsCrossServer(): callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "OnGetMergeParam")) if callFunc != None: extendParamList = callFunc(curPlayer) - alist.extend(extendParamList) - MergeChildMsg.SendMergerChildToCenterStringData(ChConfig.Def_SendGMCMD, alist) - return - + CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_GMCMD, alist + extendParamList) + callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "OnExec")) if callFunc == None: #没有此命令 @@ -102,17 +111,7 @@ GameWorld.DebugAnswer(curPlayer, 'no cmd !!!') return - #删除命令,只将参数传入 - del alist[0] - #把剩余参数转换为整型 - for i in range(0, len(alist)): - value = GameWorld.ToIntDef(alist[i], None) - if value == None: - #GameWorld.DebugAnswer(curPlayer, "参数错误, 参数%s必须为纯数字!" % (i + 1)) - continue - alist[i] = value - - callFunc(curPlayer,alist) + callFunc(curPlayer, alist[1:]) except BaseException: GameWorld.DebugAnswer(curPlayer, "执行GM命令错误, 请查看GameServer日志!") @@ -206,11 +205,8 @@ 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 @@ -245,7 +241,7 @@ return cmdDict ## 收到子服务器发送的GM命令 -def ClientServer_SendGMCMD(cmdMsgList, tick): +def ClientServerMsg_GMCMD(cmdMsgList, tick): if len(cmdMsgList) == 0: return -- Gitblit v1.8.0