From c7de89ae0c2999d9d2585dc63df28eac36a443e1 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 04 九月 2024 19:09:09 +0800 Subject: [PATCH] 10249 【越南】【砍树】仙宫(增加累计消耗货币值同步;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py index b8ac1de..dcd68df 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py @@ -2979,6 +2979,31 @@ NetPackCommon.SendFakePack(curPlayer, sendPack) return +def NotifyUseMoneyTotal(curPlayer, moneyTypeList=None): + if moneyTypeList: + notifyMoneyTypeList = moneyTypeList + else: + notifyMoneyTypeList = ShareDefine.UseTotalPriceTypeList + + infoList = [] + for moneyType in notifyMoneyTypeList: + useTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UseMoneyTotal % moneyType) + if not useTotal and moneyTypeList == None: + continue + info = ChPyNetSendPack.tagMCUseMoneyTotal() + info.MoneyType = moneyType + info.UseTotal = useTotal + infoList.append(info) + + if not infoList: + return + + clientPack = ChPyNetSendPack.tagMCUseMoneyTotalInfo() + clientPack.Clear() + clientPack.InfoList = infoList + clientPack.Count = len(clientPack.InfoList) + NetPackCommon.SendFakePack(curPlayer, clientPack) + return ##玩家是否有钱款 # @param curPlayer 玩家实例 @@ -3223,6 +3248,12 @@ # @param quantity 消费数量 # @return None def __PayMoneyAfter(curPlayer, type_Price, price, costType, infoDict, quantity, costVIPGold): + if type_Price in ShareDefine.UseTotalPriceTypeList: + useTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UseMoneyTotal % type_Price) + useTotal = min(useTotal + price, ChConfig.Def_UpperLimit_DWord) + NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UseMoneyTotal % type_Price, useTotal) + NotifyUseMoneyTotal(curPlayer, [type_Price]) + #金子支付 if type_Price == IPY_GameWorld.TYPE_Price_Gold_Money: __PayMoneyAfterByGoldMoney(curPlayer, type_Price, price, costType, infoDict, costVIPGold) -- Gitblit v1.8.0