hxp
2018-09-11 fce52c87f2c1ea7b87372c2b0e6be72781007cb7
3455 【后端】【1.0.15】【主干】优化GM命令CTG及GM工具CTG;
2个文件已修改
25 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CTG.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTCTG.py 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CTG.py
@@ -25,6 +25,7 @@
import GameWorld
import PlayerCoin
import PlayerControl
import IpyGameDataPY
import ShareDefine
import ChConfig
@@ -40,7 +41,12 @@
        return
    
    ctgValue = str(msgList[0])
    if ctgValue.isdigit():
    orderInfoIpyData = None
    if len(msgList) > 1:
        value2 = str(msgList[1])
        orderInfoIpyData = IpyGameDataPY.GetIpyGameDataNotLog("OrderInfo", ctgValue, value2)
    if not orderInfoIpyData and ctgValue.isdigit():
        orderRMB = int(ctgValue)
        isAddBourseMoney = msgList[1] if len(msgList) > 1 else 1
        PlayerCoin.PlayerCoinToGoldEx(curPlayer, orderRMB, ChConfig.Def_GiveMoney_CTG, isAddBourseMoney)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTCTG.py
@@ -25,6 +25,7 @@
import GMCommon
import ShareDefine
import PlayerControl
import IpyGameDataPY
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -50,7 +51,21 @@
    changeCoinPointBefore = curPlayer.GetChangeCoinPointTotal()
    bourseMoneyBefore = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
    
    if value.isdigit():
    errorMsg = ""
    orderInfoIpyData = None
    if appID:
        orderInfoIpyData = IpyGameDataPY.GetIpyGameDataNotLog("OrderInfo", value, appID)
        if not orderInfoIpyData:
            Result = GMCommon.Def_ParamErr
            errorMsg = "Can not found the orderInfo(%s) and appID(%s)!" % (value, appID)
    if errorMsg:
        GameWorld.Log("GMT_CTG, errorMsg=%s" % errorMsg)
        resultMsg = str([orderId, errorMsg, 'GMT_CTG', Result])
        GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult', resultMsg, len(resultMsg))
        return
    if not orderInfoIpyData and value.isdigit():
        orderRMB = int(value)
        PlayerCoin.PlayerCoinToGoldEx(curPlayer, orderRMB, ChConfig.Def_GiveMoney_GMTCTG, isAddBourseMoney)
    else: