From 8a103d9814ff9a59ecdf5eaa051a39d6d1941f53 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 17:00:05 +0800
Subject: [PATCH] 9415 【BT】【后端】古神战场(增加周榜个人数据同步)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py |   12 ++++++++----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py               |   16 ++++++++++++++--
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py                                    |   16 ++++++++++++++--
 3 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 6a91da3..0389a55 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -41257,6 +41257,9 @@
                   ("SubCmd", c_ubyte),
                   ("BuyOpenCountToday", c_ubyte),    # 今日已购买开启战场次数
                   ("HighScoreToday", c_int),    # 今日最高积分
+                  ("EnterCountWeek", c_int),    # 本周总参与次数
+                  ("BuyOpenCountWeek", c_int),    # 本周总购买召集次数
+                  ("HighScoreTotalWeek", c_int),    # 本周每日最高分累加总分
                   ]
 
     def __init__(self):
@@ -41275,6 +41278,9 @@
         self.SubCmd = 0x07
         self.BuyOpenCountToday = 0
         self.HighScoreToday = 0
+        self.EnterCountWeek = 0
+        self.BuyOpenCountWeek = 0
+        self.HighScoreTotalWeek = 0
         return
 
     def GetLength(self):
@@ -41288,13 +41294,19 @@
                                 Cmd:%s,
                                 SubCmd:%s,
                                 BuyOpenCountToday:%d,
-                                HighScoreToday:%d
+                                HighScoreToday:%d,
+                                EnterCountWeek:%d,
+                                BuyOpenCountWeek:%d,
+                                HighScoreTotalWeek:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.BuyOpenCountToday,
-                                self.HighScoreToday
+                                self.HighScoreToday,
+                                self.EnterCountWeek,
+                                self.BuyOpenCountWeek,
+                                self.HighScoreTotalWeek
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 6a91da3..0389a55 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -41257,6 +41257,9 @@
                   ("SubCmd", c_ubyte),
                   ("BuyOpenCountToday", c_ubyte),    # 今日已购买开启战场次数
                   ("HighScoreToday", c_int),    # 今日最高积分
+                  ("EnterCountWeek", c_int),    # 本周总参与次数
+                  ("BuyOpenCountWeek", c_int),    # 本周总购买召集次数
+                  ("HighScoreTotalWeek", c_int),    # 本周每日最高分累加总分
                   ]
 
     def __init__(self):
@@ -41275,6 +41278,9 @@
         self.SubCmd = 0x07
         self.BuyOpenCountToday = 0
         self.HighScoreToday = 0
+        self.EnterCountWeek = 0
+        self.BuyOpenCountWeek = 0
+        self.HighScoreTotalWeek = 0
         return
 
     def GetLength(self):
@@ -41288,13 +41294,19 @@
                                 Cmd:%s,
                                 SubCmd:%s,
                                 BuyOpenCountToday:%d,
-                                HighScoreToday:%d
+                                HighScoreToday:%d,
+                                EnterCountWeek:%d,
+                                BuyOpenCountWeek:%d,
+                                HighScoreTotalWeek:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.BuyOpenCountToday,
-                                self.HighScoreToday
+                                self.HighScoreToday,
+                                self.EnterCountWeek,
+                                self.BuyOpenCountWeek,
+                                self.HighScoreTotalWeek
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
index f076dba..0f4320d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossBattlefield.py
@@ -53,6 +53,7 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_EnterCountWeek, 0)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek, 0)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_HighScoreTotalWeek, 0)
+    SyncCrossBattlefieldPlayerInfo(curPlayer)
     return
 
 #// C1 09 跨服战场购买开启场次 #tagCMCrossBattlefieldBuyOpen
@@ -159,14 +160,14 @@
         todayBuyOpenCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
         updTodayBuyOpenCount = todayBuyOpenCount + 1
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountToday, updTodayBuyOpenCount)
-        SyncCrossBattlefieldPlayerInfo(curPlayer)
         
     isSameWeek = GameWorld.CheckTimeIsSameWeek(buyTime)
     if isSameWeek:
         weekBuyOpenCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek)
         updWeekBuyOpenCount = weekBuyOpenCount + 1
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek, updWeekBuyOpenCount)
-        
+    SyncCrossBattlefieldPlayerInfo(curPlayer)
+    
     GameWorld.Log("购买召集跨服战场结果: openHour=%s,openMinute=%s,faction=%s,updTodayBuyOpenCount=%s,updWeekBuyOpenCount=%s,buyTime=%s,isToday=%s,isSameWeek=%s" 
                   % (openHour, openMinute, faction, updTodayBuyOpenCount, updWeekBuyOpenCount, GameWorld.ChangeTimeNumToStr(buyTime), isToday, isSameWeek), playerID)
     
@@ -226,12 +227,12 @@
             PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossBattlefield, addCnt)
             
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_HighScoreToday, highScoreToday)
-        SyncCrossBattlefieldPlayerInfo(curPlayer)
         
     if isSameWeek:
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_EnterCountWeek, enterCountWeek)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_HighScoreTotalWeek, highScoreWeekTotal)
-        
+    SyncCrossBattlefieldPlayerInfo(curPlayer)
+    
     # 成就
     PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_Battlefield_Join, 1)
     if isCalled:
@@ -272,6 +273,9 @@
     clientPack = ChPyNetSendPack.tagMCCrossBattlefieldPlayerInfo()
     clientPack.BuyOpenCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
     clientPack.HighScoreToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_HighScoreToday)
+    clientPack.EnterCountWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_EnterCountWeek)
+    clientPack.BuyOpenCountWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek)
+    clientPack.HighScoreTotalWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_HighScoreTotalWeek)
     NetPackCommon.SendFakePack(curPlayer, clientPack)
     return
 

--
Gitblit v1.8.0