From af9f6c691fdab8d94d78266d4e62785cce07ade0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 31 八月 2022 17:19:46 +0800
Subject: [PATCH] 9704 【后端】【越南】【BT7】【主干】跨服聊天支持全服不根据分区划分
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
index 87ef793..322b1a8 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
@@ -21,8 +21,10 @@
import GameWorld
import PlayerControl
import NetPackCommon
+import GameWorldArena
import ChPyNetSendPack
import PlayerFBHelpBattle
+import CrossBattlefield
import PyGameDataStruct
import IpyGameDataPY
import PyDataManager
@@ -40,6 +42,12 @@
if PlayerFBHelpBattle.IsInHelpBattleCheckInList(playerID):
return True
+ if GameWorldArena.IsArenaBattlePlayer(playerID):
+ return True
+
+ if CrossBattlefield.IsBattlefieldCallPlayer(playerID):
+ return True
+
SaveDBLimitLV = IpyGameDataPY.GetFuncCfg("PlayerViewCache", 1)
#校验玩家等级
if playerLV < SaveDBLimitLV:
@@ -49,6 +57,15 @@
def IsSaveAllViewCache(playerID):
## 是否保存所有缓存数据
+
+ if PlayerFBHelpBattle.IsInHelpBattleCheckInList(playerID):
+ return True
+
+ if GameWorldArena.IsArenaBattlePlayer(playerID):
+ return True
+
+ if CrossBattlefield.IsBattlefieldCallPlayer(playerID):
+ return True
NeedCheckBillBoardType = IpyGameDataPY.GetFuncEvalCfg("PlayerViewCache", 2)
#校验玩家是否上排行榜
@@ -66,7 +83,7 @@
## 删除过期的查看缓存数据
curTime = int(time.time())
- MaxTime = 30 * 3600 * 24 # 30天
+ MaxTime = IpyGameDataPY.GetFuncCfg("PlayerViewCache", 3) * 3600 * 24
pyViewCacheMgr = PyDataManager.GetPlayerViewCachePyManager()
playerViewCachePyDict = pyViewCacheMgr.playerViewCachePyDict
@@ -106,7 +123,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