From ab4d62787cf6958470cecaaaf5758877e0a64c02 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 28 五月 2025 11:57:13 +0800
Subject: [PATCH] 54 【三国主界面】核心主体-服务端(仙树;增加货币41-战锤;42-结晶)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/StructData/DBFamily.py | 14 +++++++++-----
1 files changed, 9 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..582d745 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())
@@ -362,7 +366,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