From 4087d18ce7cbd1578a6e287962bd902386984048 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 14 七月 2025 10:55:57 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_ServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
index 9ef6384..fee72a3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py
@@ -20,6 +20,7 @@
 import GameWorld
 import ShareDefine
 import PlayerControl
+import PlayerViewCache
 import PyMongoMain
 import DBDataMgr
 import ChConfig
@@ -82,12 +83,15 @@
         self.__actionDataList.append(actionData)
         return actionData
     
-    def AddAction(self, fullClear=True):
+    def AddAction(self, maxCount=None):
         ## 添加仙盟Action数据
-        # @param fullClear: 数据条数超过最大数时是否清除最早一条,并创建一条新记录
+        # @param maxCount: 可传入由配置决定的最大条数,如果为None则进一步取程序默认设定的最大条数,都没配置的话默认不限条数
         
+        fullClear = True
+        if maxCount == None:
+            maxCount = ShareDefine.ActionTypeSaveCnt.get(self.actionType, 0)
         actionData = None
-        if self.Count() >= ChConfig.ActionTypeSaveCnt.get(self.actionType, 0):
+        if maxCount and self.Count() >= maxCount:
             if not fullClear:
                 #超过记录记录不了了
                 return actionData
@@ -207,7 +211,7 @@
         ## 根据玩家ID更新成员数据,一般用于离线功能,如添加离线成员,直接使用查看缓存更新
         if playerID != self.GetPlayerID():
             return
-        viewCache = DBDataMgr.GetPlayerViewCacheMgr().FindViewCache(playerID)
+        viewCache = PlayerViewCache.FindViewCache(playerID)
         if not viewCache:
             return
         self.SetPlayerName(viewCache.GetPlayerName())
@@ -298,6 +302,8 @@
         self.__memberList.append(member)
         return member
     
+    def GetMemberIDList(self): return self.__memberDict.keys()
+    
     def AddMember(self, playerID):
         member = None
         if playerID in self.__memberDict:
@@ -362,7 +368,7 @@
                 continue
             familyFightPowerTotal += member.GetFightPowerTotal()
         self.SetFightPowerTotal(familyFightPowerTotal)
-        GameWorld.DebugLog("刷新仙盟总战力! familyID=%s" % self.GetID())
+        #GameWorld.DebugLog("刷新仙盟总战力! familyID=%s" % self.GetID())
         self.__memFightPowerChange = False
         return familyFightPowerTotal
     

--
Gitblit v1.8.0