From ad158391ff62df48198a5411e5950e578dc3c43c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 11 四月 2019 14:42:21 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(可进入跨服妖王地图支持分区,增加竞争归属逻辑)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 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 faa901d..d122e9c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -74,6 +74,7 @@
 import PlayerMagicWeapon
 import GameLogic_SealDemon
 import GameLogic_ZhuXianBoss
+import GameLogic_CrossDemonKing
 import PlayerTJG
 import PlayerVip
 import PlayerRefineStove
@@ -1586,9 +1587,12 @@
 
 #---------------------------------------------------------------------
 
-def PlayerEnterCrossServer(curPlayer, mapID):
+def PlayerEnterCrossServer(curPlayer, mapID, lineID):
     playerID = curPlayer.GetPlayerID()
-    GameWorld.Log("玩家请求进入跨服地图: mapID=%s" % (mapID), playerID)
+    GameWorld.Log("玩家请求进入跨服地图: mapID=%s,lineID=%s" % (mapID, lineID), playerID)
+    if mapID not in ChConfig.Def_CrossMapIDList:
+        return
+    
     if GameWorld.IsCrossServer():
         GameWorld.DebugLog("跨服服务器不允许该操作!")
         return
@@ -1613,6 +1617,21 @@
         NotifyCode(curPlayer, "SingleEnterPK", [mapID])
         return
     
+    # 需要动态分布线路的地图,发送到跨服服务器进行分配
+    if mapID in ChConfig.Def_CrossDynamicLineMap:
+        extendInfo = {}
+        if mapID == ChConfig.Def_FBMapID_CrossDemonKing:
+            bossID = GameLogic_CrossDemonKing.GetCurFBLineBOSSID(lineID)
+            if not bossID:
+                return
+            extendInfo["BossID"] = bossID
+            
+        msgDict = {"PlayerID":curPlayer.GetPlayerID(), "DataMapID":mapID, "FuncLineID":lineID}
+        if extendInfo:
+            msgDict.update(extendInfo)
+        GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_EnterFB, msgDict)
+        return
+    
     GY_Query_CrossRealmReg.RegisterEnterCrossServer(curPlayer, mapID)
     return
 

--
Gitblit v1.8.0