From 8a445fc0209a334d0d5e263d6986328d965c668f Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 30 五月 2025 12:22:14 +0800 Subject: [PATCH] 16 卡牌服务端(GM调试属性修改;) --- 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