From c1c791372b63ff14d0ddd0ef85386e374603d1ff Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 15 七月 2024 19:47:37 +0800 Subject: [PATCH] 10202 【越南】【香港】【主干】【砍树】聚魂(寻宝修改:寻宝设定单独开表;去除免费寻宝x次必出逻辑,免费次数也算常规次数;免费次数去除时间恢复,改为过天重置;每x次必出改为每种类型独立配置;) --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py | 126 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 120 insertions(+), 6 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py index 5114bb5..5bfa98b 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py @@ -17,15 +17,23 @@ import GameWorld import ShareDefine +import PlayerAssist import PlayerControl import CrossLuckyCloudBuy import IPY_GameServer import CrossRealmPlayer import PlayerCompensation +import PlayerActBossTrial import CrossActionControl +import CrossActAllRecharge +import CrossFamilyFlagwar +import CrossChampionship +import CrossBattlefield import CrossBillboard +import CrossYaomoBoss import GameWorldBoss import CrossRealmPK +import GameWorship import PlayerQuery import PlayerTalk import PyGameData @@ -120,6 +128,51 @@ elif msgType == ShareDefine.ClientServerMsg_AddBuff: MapServer_CrossAddBuff(msgData) + elif msgType == ShareDefine.ClientServerMsg_CrossAssist: + PlayerAssist.ClientServerMsg_CrossAssist(serverGroupID, msgData, tick) + + elif msgType == ShareDefine.ClientServerMsg_BattlefieldBuyOpen: + CrossBattlefield.ClientServerMsg_BattlefieldBuyOpen(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_BattlefieldCallJoin: + CrossBattlefield.ClientServerMsg_BattlefieldCallJoin(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_BattlefieldCallKick: + CrossBattlefield.ClientServerMsg_BattlefieldCallKick(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_BattlefieldCallChange: + CrossBattlefield.ClientServerMsg_BattlefieldCallChange(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipOfficialApply: + CrossChampionship.ClientServerMsg_ChampionshipOfficialApply(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipOfficialApplyReply: + CrossChampionship.ClientServerMsg_ChampionshipOfficialApplyReply(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipOfficialKick: + CrossChampionship.ClientServerMsg_ChampionshipOfficialKick(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipOfficialLeave: + CrossChampionship.ClientServerMsg_ChampionshipOfficialLeave(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipOfficialChallenge: + CrossChampionship.ClientServerMsg_ChampionshipOfficialChallenge(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipGuess: + CrossChampionship.ClientServerMsg_ChampionshipGuess(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ChampionshipWorship: + CrossChampionship.ClientServerMsg_ChampionshipWorship(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_ActAllRechargeValue: + CrossActAllRecharge.ClientServerMsg_ActAllRechargeValue(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_CrossYaomoBossHurtAward: + CrossYaomoBoss.ClientServerMsg_CrossYaomoBossHurtAward(serverGroupID, msgData) + + elif msgType == ShareDefine.ClientServerMsg_BossTrialSubmit: + PlayerActBossTrial.ClientServerMsg_BossTrialSubmit(serverGroupID, msgData) + # 需要发送到地图服务器处理的 elif msgType in [ShareDefine.ClientServerMsg_Reborn, ShareDefine.ClientServerMsg_CollectNPC]: MapServer_CrossServerReceiveMsg(msgType, msgData, serverGroupID) @@ -149,10 +202,15 @@ ''' CrossRealmPlayer.Sync_CrossCommInitDataToClientServer(serverGroupID) CrossRealmPK.Sync_CrossPKInitDataToClientServer(tick, serverGroupID) + CrossChampionship.Sync_CrossChampionshipDataToClientServer(serverGroupID) + CrossBattlefield.Sync_CrossBattlefieldDataToClientServer(serverGroupID) CrossBoss.Sync_CrossBossInitDataToClientServer(serverGroupID) - CrossLuckyCloudBuy.Sync_LuckyCloudBuyDataToClientServer(tick, serverGroupID) CrossActionControl.Sync_CrossActInfoToClientServer(serverGroupID) + CrossLuckyCloudBuy.Sync_LuckyCloudBuyDataToClientServer(tick, serverGroupID) + CrossActAllRecharge.Sync_AllRechargeDataToClientServer(serverGroupID) + CrossYaomoBoss.Sync_CrossYaomoBossDataToClientServer(serverGroupID) PlayerCompensation.Sync_CrossMailPlayerIDToClientServer(serverGroupID) + GameWorship.Sync_CrossWorshipToClientServer(serverGroupID) return def MapServer_CrossServerReceiveMsg(msgType, msgData, serverGroupID): @@ -195,16 +253,18 @@ return ## ================================================================================================ -def SendMsgToClientServer(msgType, dataMsg, serverGroupIDList=[]): +def SendMsgToClientServer(msgType, dataMsg, serverGroupIDList=None): ''' 广播信息到子服务器上 @param serverGroupIDList: 发送指定的服务器组ID列表,内部已经针对列表中组ID去重, 所以外部逻辑可直接添加,不用考虑组ID重复问题,没有指定服务器组ID时,默认广播所有子服 ''' if not GameWorld.IsCrossServer(): return - if not dataMsg: - return - + #if not dataMsg: + # return + if serverGroupIDList == None: + serverGroupIDList = [] + srcMsg = {"MsgType":msgType, "Data":dataMsg, "CrossServerTime":GameWorld.GetCurrentDataTimeStr()} sendMsg = cPickle.dumps(srcMsg, 2) if not GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_GameWorldInitOK): @@ -289,6 +349,51 @@ elif msgType == ShareDefine.CrossServerMsg_LuckyCloudBuyNum: CrossLuckyCloudBuy.CrossServerMsg_LuckyCloudBuyNum(msgData) + elif msgType == ShareDefine.CrossServerMsg_BattlefieldState: + CrossBattlefield.CrossServerMsg_BattlefieldState(msgData) + + elif msgType == ShareDefine.CrossServerMsg_BattlefieldBuy: + CrossBattlefield.CrossServerMsg_BattlefieldBuy(msgData) + + elif msgType == ShareDefine.CrossServerMsg_BattlefieldOver: + CrossBattlefield.CrossServerMsg_BattlefieldOver(msgData) + + elif msgType == ShareDefine.CrossServerMsg_FamilyFlagwarOver: + CrossFamilyFlagwar.CrossServerMsg_FamilyFlagwarOver(msgData) + + elif msgType == ShareDefine.CrossServerMsg_CrossBossTrialFamilyAward: + PlayerActBossTrial.CrossServerMsg_CrossBossTrialFamilyAward(msgData) + + elif msgType == ShareDefine.CrossServerMsg_Worship: + GameWorship.CrossServerMsg_Worship(msgData) + + elif msgType == ShareDefine.CrossServerMsg_ChampionshipState: + CrossChampionship.CrossServerMsg_ChampionshipState(msgData) + + elif msgType == ShareDefine.CrossServerMsg_ChampionshipPlayer: + CrossChampionship.CrossServerMsg_ChampionshipPlayer(msgData) + + elif msgType == ShareDefine.CrossServerMsg_ChampionshipGroup: + CrossChampionship.CrossServerMsg_ChampionshipGroup(msgData) + + elif msgType == ShareDefine.CrossServerMsg_ChampionshipGuess: + CrossChampionship.CrossServerMsg_ChampionshipGuess(msgData, tick) + + elif msgType == ShareDefine.CrossServerMsg_ChampionshipOfficial: + CrossChampionship.CrossServerMsg_ChampionshipOfficial(msgData) + + elif msgType == ShareDefine.CrossServerMsg_ChampionshipDailyOfficial: + CrossChampionship.CrossServerMsg_ChampionshipDailyOfficial(msgData) + + elif msgType == ShareDefine.CrossServerMsg_ActAllRechargeInfo: + CrossActAllRecharge.CrossServerMsg_ActAllRechargeInfo(msgData) + + elif msgType == ShareDefine.CrossServerMsg_CrossDailyActionState: + CrossActionControl.CrossServerMsg_CrossDailyActionState(msgData) + + elif msgType == ShareDefine.CrossServerMsg_CrossYaomoBossHurtInfo: + CrossYaomoBoss.CrossServerMsg_CrossYaomoBossHurtInfo(msgData) + elif msgType == ShareDefine.CrossServerMsg_SyncBillboard: CrossBillboard.CrossServerMsg_SyncBillboard(msgData, tick) @@ -297,6 +402,9 @@ elif msgType == ShareDefine.CrossServerMsg_CrossBossState: CrossBoss.CrossServerMsg_CrossBossState(msgData) + + elif msgType == ShareDefine.CrossServerMsg_CrossAssist: + PlayerAssist.CrossServerMsg_CrossAssist(msgData, tick) elif msgType == ShareDefine.CrossServerMsg_CrossActInfo: CrossActionControl.CrossServerMsg_CrossActInfo(msgData) @@ -315,6 +423,9 @@ elif msgType == ShareDefine.CrossServerMsg_EnterFBRet: PlayerFB.CrossServerMsg_EnterFBRet(msgData, tick) + + elif msgType == ShareDefine.CrossServerMsg_EnterVSRoomRet: + PlayerFB.CrossServerMsg_EnterVSRoomRet(msgData, tick) elif msgType == ShareDefine.CrossServerMsg_SendMail: PlayerCompensation.CrossServerMsg_SendMail(msgData) @@ -342,7 +453,10 @@ tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID) if tagPlayer: GameWorld.DebugAnswer(tagPlayer, "跨服服务器时间: %s" % GameWorld.GetCrossServerTimeStr()) - + + elif msgType == ShareDefine.CrossServerMsg_DebugAnswer: + GameWorld.CrossServerMsg_DebugAnswer(msgData) + else: GameWorld.ErrLog("没有该信息类型逻辑处理!") -- Gitblit v1.8.0