From db6559bba9fef7a33f6f6e68863ca30eb428df68 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 16 四月 2025 14:50:43 +0800 Subject: [PATCH] 10367 【越南】【英语】【BT】【砍树】仙盟攻城战-服务端(奖励增加支持仙官;优化称号、仙官、膜拜关联逻辑及配置;支持物品激活仙盟徽章;C026C028增加Job信息;) --- ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py index 0ce3070..7690f01 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/ChPlayer.py @@ -57,7 +57,6 @@ import GameWorldFamilyWar import PlayerFBHelpBattle import GameWorldSkyTower -import GMT_CTG import PyGameData import GMShell import IPY_PlayerDefine @@ -79,9 +78,11 @@ import PlayerFuncTeam import PyDataManager import GameWorldMineArea +import PlayerPackData import PlayerRecData import GameWorship import GameXiangong +import CrossFamilyGCZ #--------------------------------------------------------------------- #--------------------------------------------------------------------- @@ -96,6 +97,8 @@ return def IsOnline(self, playerID): return playerID in self.onlinePlayerDict + + def GetOLPlayerServerGroupID(self, playerID): return self.onlinePlayerDict.get(playerID, 0) def __SetOnline(self, playerID, serverGroupID): self.onlinePlayerDict[playerID] = serverGroupID @@ -179,8 +182,6 @@ ''' 玩家登录需要处理的内容,本服及跨服服务器分开 ''' if GameWorld.IsCrossServer(): - #跨服PK - CrossRealmPK.OnPlayerLoginCrossServer(curPlayer) #协助 PlayerAssist.OnPlayerLoginCrossServer(curPlayer) return @@ -259,7 +260,6 @@ GameWorldSkyTower.OnPlayerLogin(curPlayer) #福地 GameWorldMineArea.OnPlayerLogin(curPlayer) - GMT_CTG.OnPlayerLogin(curPlayer) else: pass @@ -292,13 +292,15 @@ CrossBattlefield.OnPlayerLogin(curPlayer) #跨服排位 CrossChampionship.OnPlayerLogin(curPlayer, tick) + #仙盟攻城战 + CrossFamilyGCZ.OnPlayerLogin(curPlayer) #跨服全民充值 CrossActAllRecharge.OnPlayerLogin(curPlayer) #跨服妖魔boss CrossYaomoBoss.OnPlayerLogin(curPlayer) #玩家记录 PlayerRecData.OnPlayerLogin(curPlayer) - + PlayerPackData.OnPlayerLogin(curPlayer) #在线状态变更,放最后 __OnPlayerOnlineStateChange(curPlayer, True) @@ -642,9 +644,6 @@ PlayerFB.OnPlayerDisconnectCrossServer(curPlayer) return - #跨服匹配PK - CrossRealmPK.OnLeaveServer(curPlayer) - #组队玩家离线 PlayerTeam.DoPlayerLogOffTeamLogic(curPlayer, tick) #家族玩家离线 @@ -686,9 +685,9 @@ #offlineValue = olMgr.GetOfflineValue(playerID, PlayerViewCache.FindViewCache(playerID)) #SyncRelatedPlayerOnlineState(playerID, offlineValue, relatedPlayerIDList) - if not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_CrossRealmPK) \ - and not PlayerControl.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_CrossBattlefield): - GameWorld.DebugLog("跨服相关功能未开启,不同步在线状态到跨服服务器! LV=%s" % curPlayer.GetLV(), curPlayer.GetPlayerID()) + syncLV = IpyGameDataPY.GetFuncCfg("CrossSyncSet", 1) + if curPlayer.GetLV() < syncLV: + #GameWorld.DebugLog("跨服相关功能未开启,不同步在线状态到跨服服务器! LV=%s < %s" % (curPlayer.GetLV(), syncLV), curPlayer.GetPlayerID()) return cacheBase = PlayerViewCache.GetSyncCrossCacheBase(curPlayer) @@ -704,12 +703,21 @@ cacheBase = msgData["cacheBase"] isLogout = not isOnline + olMgr = GetOnlinePlayerMgr() + olMgr.SetOnlineState(playerID, isOnline, cacheBase.get("ServerGroupID", 0)) + PlayerViewCache.UpdCrossCacheBase(playerID, cacheBase, isLogout) serverID = GameWorld.GetAccIDServerID(cacheBase["AccID"]) # 上线 if isOnline: + # 需要管理跨服在线状态时,默认需要同步缓存信息、打包数据信息 + syncStateInfo = {"playerID":playerID, "ViewCacheCross":1, "PackDataCross":1} + CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_PlayerPackDataState, syncStateInfo, [serverGroupID]) + GameXiangong.OnPlayerLogin_CrossLogic(serverGroupID, serverID, playerID) + #仙盟攻城战 + CrossFamilyGCZ.OnPlayerLogin_CrossLogic(serverGroupID, serverID, playerID) # 下线 else: @@ -835,6 +843,7 @@ packValue = playerStatePack.GetValue() packValueEx = playerStatePack.GetValueEx() packType = playerStatePack.GetType() + #packValueTotal = packValue + packValueEx * ChConfig.Def_PerPointValue #---特殊逻辑处理--- if packType == ShareDefine.CDBPlayerRefresh_ForbidenTalk: @@ -844,7 +853,11 @@ if packType == ShareDefine.CDBPlayerRefresh_ExAttr17: PlayerControl.SetPlayerAccState(curPlayer, packValue) return - + + if packType == ShareDefine.CDBPlayerRefresh_ExAttr19: + PlayerControl.SetLeaveFamilyTimeEx(curPlayer, packValue) + return + if packType == IPY_GameServer.CDBPlayerRefresh_State: # 脱机在线 PlayerControl.SetIsTJG(curPlayer, packValue) -- Gitblit v1.8.0