From 532b9f45735b9a1b04667afb83b3fe3203d74ffb Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 08 六月 2021 11:49:58 +0800 Subject: [PATCH] 8972 【主干】【BT】【BT2】 GM工具增加激活删除称号命令 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTAddTitle.py | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTAddTitle.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTAddTitle.py index 7d8b132..636d4ea 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTAddTitle.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTAddTitle.py @@ -39,17 +39,22 @@ return Result = GMCommon.Def_Success - orderId, isOnlineGMT, titleID, expireTime = packCMDList + orderId, isOnlineGMT, titleID, expireTime, opType = packCMDList - isOK = PlayerDienstgrad.PlayerAddDienstgrad(curPlayer, titleID, expireTime=expireTime) + isOK = False + if opType == "add": + isOK = PlayerDienstgrad.PlayerAddDienstgrad(curPlayer, titleID, expireTime=expireTime) + elif opType == "del": + isOK = PlayerDienstgrad.PlayerDelDienstgrad(curPlayer, titleID) + if not isOK: - errorMsg = "Add fail! Please check that the ID(%s) is correct." % titleID + errorMsg = "%s fail! Please check that the ID(%s) is correct." % (opType, titleID) GameWorld.Log("GMT_AddTitle, errorMsg=%s" % errorMsg, curPlayer.GetPlayerID()) resultMsg = str([orderId, errorMsg, 'GMT_AddTitle', GMCommon.Def_Unknow]) GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult', resultMsg, len(resultMsg)) return - resultDict = {"titleID":titleID, "expireTime":expireTime, "isOnlineGMT":isOnlineGMT} + resultDict = {"titleID":titleID, "expireTime":expireTime, "isOnlineGMT":isOnlineGMT, "opType":opType} GameWorld.Log("GMT_AddTitle, isOnlineGMT=%s,resultDict=%s" % (isOnlineGMT, resultDict), curPlayer.GetPlayerID()) #流向 记录 DataRecordPack.DR_ToolGMOperate(query_ID, curPlayer.GetPlayerName(), curPlayer.GetAccID(), 'GMT_AddTitle', resultDict) -- Gitblit v1.8.0