From 246314fa109ae32ef92918bf5dcde701fee98837 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 25 七月 2024 14:50:43 +0800
Subject: [PATCH] 10216 【越南】【港台】【主干】【砍树】古神战场修改(信息提示CrossBattlefieldSysCallBuy增加阵营参数)
---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
index b857004..ce034af 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerViewCache.py
@@ -19,16 +19,19 @@
 #---------------------------------------------------------------------
 
 import GameWorld
+import GameWorship
 import PlayerControl
 import NetPackCommon
 import GameWorldArena
 import ChPyNetSendPack
 import PlayerFBHelpBattle
+import GameWorldSkyTower
 import CrossChampionship
 import CrossBattlefield
 import PyGameDataStruct
 import IpyGameDataPY
 import PyDataManager
+import ShareDefine
 import ChConfig
 
 import json
@@ -50,6 +53,12 @@
         return True
     
     if CrossChampionship.IsChampionshipPlayer(playerID):
+        return True
+    
+    if GameWorship.IsWorshipPlayer(playerID):
+        return True
+    
+    if GameWorldSkyTower.IsSkyTowerPassPlayer(playerID):
         return True
     
     SaveDBLimitLV = IpyGameDataPY.GetFuncCfg("PlayerViewCache", 1)
@@ -84,6 +93,16 @@
         if curBillboard.FindByID(playerID):
             return True
         
+    #跨服榜单上的默认保留
+    if GameWorld.IsCrossServer():
+        billboardMgr = PyDataManager.GetCrossBillboardManager()
+        for billboardType in ShareDefine.CrossBillboardTypeList:
+            groupList = billboardMgr.GetBillboardGroupList(billboardType)
+            for billboardType, groupValue1, groupValue2 in groupList:
+                billboardObj = billboardMgr.GetCrossBillboard(billboardType, groupValue1, groupValue2)
+                if billboardObj.FindByID(playerID):
+                    return True
+                
     return False
 
 def DelOutofTimeViewCacheData():
@@ -132,6 +151,8 @@
 
 def GetCachePropDataDict(curCache):
     ## 获取缓存基础属性字典信息
+    if not curCache:
+        return {}
     if not hasattr(curCache, "PropDataDict"):
         curCache.PropDataDict = {}
     if not curCache.PropDataDict and curCache.PropData:
@@ -154,8 +175,8 @@
 #    WORD        ItemDataSize1;
 #    char        ItemData1[ItemDataSize1];    //1阶装备数据
 #    ...         ...
-#    WORD        ItemDataSize15;
-#    char        ItemData15[ItemDataSize15];
+#    WORD        ItemDataSize20;
+#    char        ItemData20[ItemDataSize20];
 #};
 def OnMGUpdatePlayerCache(routeIndex, mapID, curPackData, tick):
     playerID = curPackData.PlayerID
@@ -192,7 +213,7 @@
     #GameWorld.DebugLog("    更新Plus数据: size=%s, %s" % (curCache.PlusDataSize, curCache.PlusData), playerID)
     
     # 装备数据存储,不保存装备数据的话则清空
-    for classLV in xrange(1, 15 + 1):
+    for classLV in xrange(1, 20 + 1):
         if not isSaveAll:
             itemDataSize = 0
             itemData = ""
--
Gitblit v1.8.0