1111 【后台】 扣除玩家物品、扣除玩家货币命令支持;
| File was renamed from ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTDelPlayerItem.py |
| | |
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package Player.RemoteQuery.GY_Query_GMTDelPlayerItem
|
| | | ##@package PyMongoDB.GMToolLogicProcess.Commands.GMT_DelPlayerItem
|
| | | #
|
| | | # @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 ItemCommon
|
| | | import ShareDefine
|
| | | import GameWorld
|
| | | import DataRecordPack
|
| | | import ShareDefine
|
| | | import ItemCommon
|
| | | 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 ''
|
| | | orderId, gmCmdDict = packCMDList
|
| | | GameWorld.Log("GY_Query_GMTDelPlayerItem: %s" % gmCmdDict, query_ID)
|
| | | errorMsg = ""
|
| | | from GMToolLogicProcess import ProjSpecialProcess
|
| | | Result, curPlayer = ProjSpecialProcess.GMCmdPlayerValidation(gmCmdDict, False)
|
| | | if Result != GMCommon.Def_Success:
|
| | | return Result, errorMsg
|
| | | if not curPlayer:
|
| | | return Result, "玩家不在线"
|
| | | |
| | | # 玩家在线,直接处理
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | Result = GMCommon.Def_Unknow
|
| | | GMT_Name = gmCmdDict.get(GMCommon.Def_GMKey_Type, '') |
| | | |
| | | itemID = GameWorld.ToIntDef(gmCmdDict.get("itemID", 0))
|
| | | delItemCount = GameWorld.ToIntDef(gmCmdDict.get("delItemCount", 0))
|
| | |
|
| | | Result = GMCommon.Def_Success
|
| | | retMsg = {"itemID":itemID, "delItemCount":delItemCount, "accID":curPlayer.GetAccID()}
|
| | | resultDict = {"itemID":itemID, "delItemCount":delItemCount, "accID":curPlayer.GetAccID()}
|
| | |
|
| | | # 删除物品
|
| | | _DoGMDelItem(curPlayer, gmCmdDict, itemID, delItemCount, retMsg)
|
| | | _DoGMDelItem(curPlayer, gmCmdDict, itemID, delItemCount, resultDict)
|
| | |
|
| | | # 查询剩余物品明细
|
| | | findItemDict = {}
|
| | |
| | | itemList.append(_GetItemInfo(curItem))
|
| | | if itemList:
|
| | | findItemDict[str(packIndex)] = itemList
|
| | | retMsg["findItemDict"] = findItemDict
|
| | | resultDict["findItemDict"] = findItemDict
|
| | |
|
| | | resultMsg = str([orderId, retMsg, 'GMT_DelPlayerItem', Result])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'GMToolResult', resultMsg, len(resultMsg))
|
| | | return ''
|
| | | |
| | | Result = GMCommon.Def_Success
|
| | | #流向 增加金额记录
|
| | | DataRecordPack.DR_ToolGMOperate(playerID, curPlayer.GetPlayerName(), curPlayer.GetAccID(), GMT_Name, resultDict)
|
| | | return Result, resultDict
|
| | |
|
| | | def _DoGMDelItem(curPlayer, gmCmdDict, itemID, delItemCount, retMsg):
|
| | |
|
| | | delRemark = gmCmdDict.get("delRemark", "")
|
| | |
| | | "ItemPlaceIndex":curItem.GetItemPlaceIndex()
|
| | | }
|
| | | return curItemInfo
|
| | |
|
| | | |
| | | |
| | | |
| | | |
| File was renamed from ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTDelPlayerMoney.py |
| | |
| | | # -*- 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", "")
|
| | |
| | | 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 ''
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | resultDict = {"retMsg":retMsg}
|
| | | Result = GMCommon.Def_Success
|
| | | #流向 增加金额记录
|
| | | DataRecordPack.DR_ToolGMOperate(playerID, curPlayer.GetPlayerName(), curPlayer.GetAccID(), GMT_Name, resultDict)
|
| | | return Result, resultDict
|