From 766ab5d48e5ae032bbdcea7113abf5ac126cf8ac Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 04 九月 2024 19:04:15 +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 ed28575..9581a1b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -2986,6 +2986,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 玩家实例
@@ -3230,6 +3255,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