From c935e395677066540f106cb06feb2f8134f9ce0d Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 14 十月 2022 19:22:27 +0800 Subject: [PATCH] 9731 【越南】【主干】【BT7】转职业(修改扣除转职业消耗道具记录流向类型) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py index 3e4270a..b857004 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py @@ -24,6 +24,8 @@ import GameWorldArena import ChPyNetSendPack import PlayerFBHelpBattle +import CrossChampionship +import CrossBattlefield import PyGameDataStruct import IpyGameDataPY import PyDataManager @@ -44,6 +46,12 @@ if GameWorldArena.IsArenaBattlePlayer(playerID): return True + if CrossBattlefield.IsBattlefieldCallPlayer(playerID): + return True + + if CrossChampionship.IsChampionshipPlayer(playerID): + return True + SaveDBLimitLV = IpyGameDataPY.GetFuncCfg("PlayerViewCache", 1) #校验玩家等级 if playerLV < SaveDBLimitLV: @@ -58,6 +66,12 @@ return True if GameWorldArena.IsArenaBattlePlayer(playerID): + return True + + if CrossBattlefield.IsBattlefieldCallPlayer(playerID): + return True + + if CrossChampionship.IsChampionshipPlayer(playerID): return True NeedCheckBillBoardType = IpyGameDataPY.GetFuncEvalCfg("PlayerViewCache", 2) @@ -99,8 +113,9 @@ GameWorld.DebugLog("删除查看缓存!", playerID) return -def FindViewCache(playerID, isAddNew=False): +def FindViewCache(playerID, isAddNew=False, newPropData={}): ## 查找玩家缓存 + # @param newPropData: 新数据初始PropData {}, key: LV,RealmLV,Job,VIPLV,Name,FamilyID,FamilyName,FightPower curCache = None pyViewCacheMgr = PyDataManager.GetPlayerViewCachePyManager() playerViewCachePyDict = pyViewCacheMgr.playerViewCachePyDict @@ -109,6 +124,9 @@ elif isAddNew: curCache = PyGameDataStruct.tagPlayerViewCachePy() curCache.PlayerID = playerID + if newPropData: + curCache.PropData = json.dumps(newPropData, ensure_ascii=False).replace(" ", "") + curCache.PropDataSize = len(curCache.PropData) playerViewCachePyDict[playerID] = curCache return curCache @@ -116,7 +134,7 @@ ## 获取缓存基础属性字典信息 if not hasattr(curCache, "PropDataDict"): curCache.PropDataDict = {} - if not curCache.PropDataDict: + if not curCache.PropDataDict and curCache.PropData: curCache.PropDataDict = eval(curCache.PropData) return curCache.PropDataDict -- Gitblit v1.8.0