From 17a6cf93c19a3a74bc38c06d85f7655c0266105a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 04 七月 2024 19:06:30 +0800
Subject: [PATCH] 10198 【香港】【越南】【主干】【砍树】【后端】BOSS凭证优化

---
 ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py |   48 +++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py b/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py
index 70fb00a..67c88dd 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/PyDataManager.py
@@ -26,6 +26,8 @@
 import CrossRealmPK
 import AuctionHouse
 import PlayerAssist
+import PlayerRecData
+import GameWorldMineArea
 import PyGameDataStruct
 import IpyGameDataPY
 import PlayerCharm
@@ -60,6 +62,7 @@
     
     # 保存数据 存数据库和realtimebackup
     def GetSaveData(self):
+        PlayerAssist.RemoveOutofdateAssistThanks()
         savaData = ""
         cntData = ""
         cnt = 0
@@ -90,9 +93,8 @@
     
     def __init__(self):
         self.allAssistDict = {} # 所有协助 {GUID:tagDBAssist, ...}
-        self.familyAssistDict = {} # 仙盟协助缓存 {familyID:[tagDBAssist, ...], ...}
         
-        self.playerNoSaveDBAssistDict = {} # 玩家发布的不存库协助 {playerID:[tagDBAssist, ...], ...}
+        self.playerAssistDict = {} # 玩家发布的协助 {playerID:[tagDBAssist, ...], ...}
         self.playerAssistingDict = {} # 玩家正在协助中的协助,只能存在一条 {playerID:tagDBAssist, ...}
         return
     
@@ -124,11 +126,11 @@
             PlayerAssist.OnInitAssistData(dbData, 1)
             
             self.allAssistDict[dbData.GUID] = dbData
-            familyID = dbData.FamilyID
-            if familyID not in self.familyAssistDict:
-                self.familyAssistDict[familyID] = []
-            familyAssistList = self.familyAssistDict[familyID]
-            familyAssistList.append(dbData)
+            PlayerID = dbData.PlayerID
+            if PlayerID not in self.playerAssistDict:
+                self.playerAssistDict[PlayerID] = []
+            playerAssistList = self.playerAssistDict[PlayerID]
+            playerAssistList.append(dbData)
             
         return pos
     
@@ -309,6 +311,10 @@
 
 class PyGameDataManager(object):
     def __init__(self):
+        self.DBPlayerRecDataManager = PlayerRecData.DBPlayerRecDataManager()
+        self.DBPyMineAreaAwardManager = GameWorldMineArea.DBPyMineAreaAwardManager()
+        self.DBPyMineAreaRecordManager = GameWorldMineArea.DBPyMineAreaRecordManager()
+        self.DBPyMineAreaItemManager = GameWorldMineArea.DBPyMineAreaItemManager()
         self.DBPyCoupleManager = PlayerLove.DBPyCoupleManager()
         self.DBPyUnNotifyLoveGiftRecManager = PlayerLove.DBPyUnNotifyLoveGiftRecManager()
         self.DBPyCharmValueRecManager = PlayerCharm.DBPyCharmValueRecManager()
@@ -338,6 +344,10 @@
 
     def GetSaveData(self):
         buff = ""
+        buff += self.DBPlayerRecDataManager.GetSaveData()
+        buff += self.DBPyMineAreaAwardManager.GetSaveData()
+        buff += self.DBPyMineAreaRecordManager.GetSaveData()
+        buff += self.DBPyMineAreaItemManager.GetSaveData()
         buff += self.DBPyCoupleManager.GetSaveData()
         buff += self.DBPyUnNotifyLoveGiftRecManager.GetSaveData()
         buff += self.DBPyCharmValueRecManager.GetSaveData()
@@ -366,6 +376,10 @@
         return buff
     
     def LoadGameData(self, gameBuffer, pos):
+        pos = self.DBPlayerRecDataManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
+        pos = self.DBPyMineAreaAwardManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
+        pos = self.DBPyMineAreaRecordManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
+        pos = self.DBPyMineAreaItemManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
         pos = self.DBPyCoupleManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
         pos = self.DBPyUnNotifyLoveGiftRecManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
         pos = self.DBPyCharmValueRecManager.LoadPyGameData(gameBuffer, pos, len(gameBuffer))
@@ -481,6 +495,26 @@
     pyGameDataMgr = GetPyGameDataManager()
     return pyGameDataMgr.familyStoreItemManager
 
+def GetDBPlayerRecDataManager():
+    # 玩家记录管理
+    pyGameDataMgr = GetPyGameDataManager()
+    return pyGameDataMgr.DBPlayerRecDataManager
+
+def GetDBPyMineAreaAwardManager():
+    # 福地奖励结算管理
+    pyGameDataMgr = GetPyGameDataManager()
+    return pyGameDataMgr.DBPyMineAreaAwardManager
+
+def GetDBPyMineAreaRecordManager():
+    # 福地矿物记录管理
+    pyGameDataMgr = GetPyGameDataManager()
+    return pyGameDataMgr.DBPyMineAreaRecordManager
+
+def GetDBPyMineAreaItemManager():
+    # 福地矿物管理
+    pyGameDataMgr = GetPyGameDataManager()
+    return pyGameDataMgr.DBPyMineAreaItemManager
+
 def GetDBPyCoupleManager():
     # 伴侣管理
     pyGameDataMgr = GetPyGameDataManager()

--
Gitblit v1.8.0