From c9c2da4ffb90fbe66d885125fdf948f064ffe0ab Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期二, 21 八月 2018 15:36:27 +0800 Subject: [PATCH] fix:离线挂时间没有正常运作或者维护期间程序未运行,则在上线时不是在离线死亡的情况下,弥补以当前经验倍率错过的离线收益,扣除对应离线时间,不扣除经验BUFF时间 --- ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py index 8378604..c734e31 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/GMShell.py @@ -69,13 +69,13 @@ try: gmCmd = IPY_GameServer.IPY_GGMCmd() inputStr = gmCmd.GetMsg() - list = inputStr.split() - if len(list) == 0: + alist = inputStr.split() + if len(alist) == 0: return curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) - callFunName = list[0] + callFunName = alist[0] # 特殊的命令不验证GM等级,在MapServer已验证账号 if callFunName.startswith("@"): callFunName = "GMS_%s" % (callFunName[1:].capitalize()) @@ -90,8 +90,8 @@ callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "OnGetMergeParam")) if callFunc != None: extendParamList = callFunc(curPlayer) - list.extend(extendParamList) - MergeChildMsg.SendMergerChildToCenterStringData(ChConfig.Def_SendGMCMD, list) + alist.extend(extendParamList) + MergeChildMsg.SendMergerChildToCenterStringData(ChConfig.Def_SendGMCMD, alist) return callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "OnExec")) @@ -102,25 +102,27 @@ return #删除命令,只将参数传入 - del list[0] + del alist[0] #把剩余参数转换为整型 - for i in range(0, len(list)): - if i == 0 and callFunName in ["testMail", "SetPlayerDBGSEvent"]: + for i in range(0, len(alist)): + if not alist[i].isdigit(): continue - value = GameWorld.ToIntDef(list[i], None) + value = GameWorld.ToIntDef(alist[i], None) if value == None: GameWorld.DebugAnswer(curPlayer, "参数错误, 参数%s必须为纯数字!" % (i + 1)) return - list[i] = value + alist[i] = value - callFunc(curPlayer,list) + callFunc(curPlayer,alist) except BaseException: GameWorld.DebugAnswer(curPlayer, "执行GM命令错误, 请查看GameServer日志!") errorMsg = str(traceback.format_exc()) GameWorld.ErrLog('GM命令错误 - > %s'%(errorMsg) , curPlayer.GetPlayerID()) - if GameWorld.GetGameWorld().GetDebugLevel(): - raise BaseException(errorMsg) + #======================================================================= + # if GameWorld.GetGameWorld().GetDebugLevel(): + # raise BaseException(errorMsg) + #======================================================================= return #--------------------------------------------------------------------- #=============================================================================== -- Gitblit v1.8.0