From 5f3b500dd8efc188323d6e6ec2a74857e82142c8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 10 二月 2026 19:50:38 +0800
Subject: [PATCH] 1111 【后台】 扣除玩家物品、扣除玩家货币命令支持;
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_DelPlayerMoney.py | 56 +++++++++++++++++++++++++++++---------------------------
1 files changed, 29 insertions(+), 27 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTDelPlayerMoney.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_DelPlayerMoney.py
similarity index 63%
rename from ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTDelPlayerMoney.py
rename to ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_DelPlayerMoney.py
index 5369aae..55f363f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTDelPlayerMoney.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_DelPlayerMoney.py
@@ -2,39 +2,44 @@
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
-##@package Player.RemoteQuery.GY_Query_GMTDelPlayerMoney
+##@package PyMongoDB.GMToolLogicProcess.Commands.GMT_DelPlayerMoney
#
-# @todo:GM工具扣除玩家货币
+# @todo:GM工具命令 - 扣除玩家货币
# @author hxp
-# @date 2021-03-18
+# @date 2026-02-10
# @version 1.0
#
-# 详细描述: GM工具扣除玩家货币
+# 详细描述: GM工具命令 - 扣除玩家货币
#
#-------------------------------------------------------------------------------
-#"""Version = 2021-03-18 19:00"""
+#"""Version = 2026-02-10 20:00"""
#-------------------------------------------------------------------------------
import GMCommon
-import ShareDefine
-import PlayerControl
import GameWorld
+import DataRecordPack
+import PlayerControl
+import ShareDefine
import ChConfig
-## 请求逻辑
-# @param query_Type 请求类型
-# @param query_ID 请求的玩家ID
-# @param packCMDList 发包命令 [ ]
-# @param tick 当前时间
-# @return resultDisc
-# @remarks 函数详细说明.
-def DoLogic(query_Type, query_ID, packCMDList, tick):
- curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)
+## 收到gm命令执行
+# @param gmCmdDict:gm命令字典
+# @return None
+def OnExec(gmCmdDict):
- if not curPlayer or curPlayer.IsEmpty():
- return ''
+ errorMsg = ""
+ from GMToolLogicProcess import ProjSpecialProcess
+ Result, curPlayer = ProjSpecialProcess.GMCmdPlayerValidation(gmCmdDict, False)
+ if Result != GMCommon.Def_Success:
+ return Result, errorMsg
+ if not curPlayer:
+ return Result, "玩家不在线"
- orderId, gmCmdDict = packCMDList
+ # 玩家在线,直接处理
+ playerID = curPlayer.GetPlayerID()
+ Result = GMCommon.Def_Unknow
+ GMT_Name = gmCmdDict.get(GMCommon.Def_GMKey_Type, '')
+
moneyType = GameWorld.ToIntDef(gmCmdDict.get("moneyType"))
moneyValue = GameWorld.ToIntDef(gmCmdDict.get("moneyValue"))
delRemark = gmCmdDict.get("delRemark", "")
@@ -59,11 +64,8 @@
else:
retMsg = "remaining money %s" % PlayerControl.GetMoneyReal(curPlayer, moneyType)
- resultMsg = str([orderId, retMsg, 'GMT_DelPlayerMoney', Result])
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult', resultMsg, len(resultMsg))
- return ''
-
-
-
-
-
\ No newline at end of file
+ resultDict = {"retMsg":retMsg}
+ Result = GMCommon.Def_Success
+ #流向 增加金额记录
+ DataRecordPack.DR_ToolGMOperate(playerID, curPlayer.GetPlayerName(), curPlayer.GetAccID(), GMT_Name, resultDict)
+ return Result, resultDict
--
Gitblit v1.8.0