From 93a031366b3d30fd19c36afad29e8e9e260b65eb Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 23 五月 2022 17:00:28 +0800 Subject: [PATCH] 9415 【BT】【后端】古神战场(修复分流到非32060地图时准备时间进场无法在地图中间坐标范围bug;增加跨服分流地图请求、进入、退出流向) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py index 6951c7d..c4dcefd 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py @@ -19,6 +19,7 @@ import PlayerControl import GameWorldProcess import CrossRealmPlayer +import DataRecordPack import PlayerSuccess import ReadChConfig import PlayerAssist @@ -508,6 +509,10 @@ if GameWorld.IsCrossServer(): mapID = GameWorld.GetMap().GetMapID() mapID = FBCommon.GetRecordMapID(mapID) + gameWorld = GameWorld.GetGameWorld() + copyMapID = gameWorld.GetCopyMapID() + dataDict = {"PlayerID":curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), "AccID":curPlayer.GetAccID(), + "recordMapID":mapID, "mapID":GameWorld.GetMap().GetMapID(), "realMapID":gameWorld.GetRealMapID(), "copyMapID":copyMapID} if mapID in ChConfig.Def_CrossDynamicLineMap: fbZoneID = FBCommon.GetCrossDynamicLineMapZoneID() fbFuncLineID = FBCommon.GetCrossDynamicLineMapFuncLineID() @@ -517,16 +522,18 @@ GameWorld.ErrLog("DoEnterFB 玩家与当前副本线路所属分区或功能分线不同,踢出玩家!fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s" % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID) CrossRealmPlayer.PlayerExitCrossServer(curPlayer) + dataDict.update({"Error":"zoneLineIDError"}) + DataRecordPack.SendEventPack("CrossFBEnter", dataDict, curPlayer) return GameWorld.Log("玩家进入跨服副本动态分配的线路: fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s" % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID) + dataDict.update({"fbZoneID":fbZoneID, "fbFuncLineID":fbFuncLineID, "playerZoneID":playerZoneID, "playerFuncLineID":playerFuncLineID}) - gameWorld = GameWorld.GetGameWorld() - copyMapID = gameWorld.GetCopyMapID() if copyMapID not in PyGameData.g_crossPlayerServerGroupIDInfo: PyGameData.g_crossPlayerServerGroupIDInfo[copyMapID] = {} playerServerGroupIDDict = PyGameData.g_crossPlayerServerGroupIDInfo[copyMapID] playerServerGroupIDDict[curPlayerID] = PlayerControl.GetPlayerServerGroupID(curPlayer) + DataRecordPack.SendEventPack("CrossFBEnter", dataDict, curPlayer) # 自伸缩副本根据玩家进入开启,主动调用一次,避免间隔调用时机未触发导致逻辑错乱 GameWorldProcess.EnterOpenFB(tick) @@ -742,6 +749,23 @@ # @return None # @remarks 函数详细说明. def DoExitFBLogic(curPlayer, tick): + if GameWorld.IsCrossServer(): + mapID = GameWorld.GetMap().GetMapID() + mapID = FBCommon.GetRecordMapID(mapID) + gameWorld = GameWorld.GetGameWorld() + copyMapID = gameWorld.GetCopyMapID() + dataDict = {"PlayerID":curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), "AccID":curPlayer.GetAccID(), + "recordMapID":mapID, "mapID":GameWorld.GetMap().GetMapID(), "realMapID":gameWorld.GetRealMapID(), "copyMapID":copyMapID} + if mapID in ChConfig.Def_CrossDynamicLineMap: + fbZoneID = FBCommon.GetCrossDynamicLineMapZoneID() + fbFuncLineID = FBCommon.GetCrossDynamicLineMapFuncLineID() + playerZoneID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBZoneID) + playerFuncLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBFuncLine) + dataDict.update({"fbZoneID":fbZoneID, "fbFuncLineID":fbFuncLineID, "playerZoneID":playerZoneID, "playerFuncLineID":playerFuncLineID}) + if curPlayer.GetFaction(): + dataDict["Faction"] = curPlayer.GetFaction() + DataRecordPack.SendEventPack("CrossFBExit", dataDict, curPlayer) + do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID()) callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoExitFB")) -- Gitblit v1.8.0