From ef5751c8eb642ca7371d48c9a50be89212a4d722 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 03 六月 2019 19:48:28 +0800 Subject: [PATCH] 7064 【后端】【2.0】后端给绑玉防范处理(扣绑玉默认扣仙玉,屏蔽给绑玉并输出流向) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py index 016aee6..790f9ea 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py @@ -52,11 +52,16 @@ #0文不处理 if moneyCount < 0: return + isOK = False playerMoney = PlayerControl.GetMoney(curPlayer, moneyType) if playerMoney > moneyCount: - PlayerControl.PayMoney(curPlayer, moneyType, playerMoney - moneyCount, ChConfig.Def_Cost_GM, {ChConfig.Def_Cost_Reason_SonKey:"SetMoney"}) + isOK = PlayerControl.PayMoney(curPlayer, moneyType, playerMoney - moneyCount, ChConfig.Def_Cost_GM, {ChConfig.Def_Cost_Reason_SonKey:"SetMoney"}) elif playerMoney < moneyCount: - PlayerControl.GiveMoney(curPlayer, moneyType, moneyCount - playerMoney, ChConfig.Def_GiveMoney_GM, {ChConfig.Def_Give_Reason_SonKey:"SetMoney"}) + isOK = PlayerControl.GiveMoney(curPlayer, moneyType, moneyCount - playerMoney, ChConfig.Def_GiveMoney_GM, {ChConfig.Def_Give_Reason_SonKey:"SetMoney"}) + else: + isOK = True + if not isOK: + GameWorld.DebugAnswer(curPlayer, "设置玩家货币失败,详见日志或流向") return -- Gitblit v1.8.0