8972 【主干】【BT】【BT2】 GM工具增加激活删除称号命令
| | |
| | | playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
|
| | | titleID = GameWorld.ToIntDef(gmCmdDict.get('titleID', ''), 0)
|
| | | expireTime = GameWorld.ToIntDef(gmCmdDict.get('expireTime', ''), 0)
|
| | | opType = gmCmdDict.get('opType', '')
|
| | |
|
| | | if titleID <= 0:
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
|
| | |
| | | return
|
| | |
|
| | | isOnlineGMT = True # 是否是在线接收的GM工具命令
|
| | | GMCommon.GMTool_MapServer_Query(queryType, orderId, playerFind, gmCmdDict, "GMTAddTitle", [orderId, isOnlineGMT, titleID, expireTime], False)
|
| | | GMCommon.GMTool_MapServer_Query(queryType, orderId, playerFind, gmCmdDict, "GMTAddTitle", [orderId, isOnlineGMT, titleID, expireTime, opType], False)
|
| | | return
|
| | |
|
| | | #def OnOfflineGMTInfo(curPlayer, tagMapID, gmCmdDict):
|
| | |
| | | return
|
| | |
|
| | | Result = GMCommon.Def_Success
|
| | | orderId, isOnlineGMT, titleID, expireTime = packCMDList
|
| | | orderId, isOnlineGMT, titleID, expireTime, opType = packCMDList
|
| | |
|
| | | 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)
|