From a9a7475c8b637b04843a5553a182a8fac9416bbb Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 16 一月 2019 11:50:09 +0800 Subject: [PATCH] 5722 【后端】【1.5】跨服BOSS开发(PK击杀全服广播、仙盟广播支援支持) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py index dbfe3f7..ecdfbf6 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py @@ -233,15 +233,22 @@ # @param mergeMapInfo 该提示所属的跨服活动地图信息, 主要用于不同子服对应所跨的活动地图ID # @return 无返回值 def WorldNotify(country, msgMark, msgParamList=[], lineID=0, mergeMinOSD=-1, mergeMaxOSD=-1, mergeMapInfo=[]): - # 如果是跨服服务器,则广播子服 - if GameWorld.IsCrossServer(): - sendMsg = str([country, msgMark, msgParamList, lineID, mergeMinOSD, mergeMaxOSD, mergeMapInfo]) - GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'MergeWorldNotify', - sendMsg, len(sendMsg)) - FBNotify(msgMark, msgParamList) # 跨服中的全服广播只在地图中做广播即可,防止不同跨服分区的地图会相互看到广播,体验不好 - else: - GameWorld.GetPlayerManager().BroadcastCountry_NotifyCode(country, 0, msgMark, - __GetNotifyCodeList(msgParamList), lineID) + GameWorld.GetPlayerManager().BroadcastCountry_NotifyCode(country, 0, msgMark, __GetNotifyCodeList(msgParamList), lineID) + return + +def GetCrossWorldNotifyInfo(country, msgMark, msgParamList=[]): + return {"Type":ShareDefine.CrossNotify_World, "Params":[country, msgMark, msgParamList]} + +def GetCrossFamilyNotifyInfo(familyID, msgMark, msgParamList=[]): + return {"Type":ShareDefine.CrossNotify_Family, "Params":[familyID, msgMark, msgParamList]} + +def CrossNotify(serverGroupIDList, crossNotifyList): + ''' 跨服广播信息提示,支持同步多条,同时也建议多条一起同步 + @param serverGroupIDList: 需要同步到的目标服务器组ID列表 + @param crossNotifyList: 信息提示列表,通过 GetCrossWorldNotifyInfo GetCrossFamilyNotifyInfo 函数获得返回值添加到列表 + ''' + sendMsg = str([serverGroupIDList, crossNotifyList]) + GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "CrossNotify", sendMsg, len(sendMsg)) return #--------------------------------------------------------------------- -- Gitblit v1.8.0