From 3475d7857f59be1f61c2e928d425e9a7b2526fae Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 22 四月 2019 11:29:56 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(跨服动态分配线路上线优化,踢出与当前线路分区或功能线路属性不一致的玩家,防止玩家跨服中重新上线后进入到不同功能线路的问题)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py | 17 +++++
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py | 13 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py | 8 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py | 26 +++++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py | 13 +---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py | 12 ---
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py | 12 ---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 7 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 23 +++++++
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 5 -
PySysDB/PySysDBPY.h | 9 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 4 +
13 files changed, 100 insertions(+), 52 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index ba06839..cd78254 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1506,6 +1506,15 @@
list ServerGroupIDList; //赛区服务器组ID列表
};
+//跨服分区表竞技场
+
+struct tagCrossZonePK
+{
+ char _CrossZoneName; //跨服分区名
+ BYTE _ZoneID; //赛区ID
+ list ServerGroupIDList; //赛区服务器组ID列表
+};
+
//跨服Boss蓬莱仙境分区地图表
struct tagCrossPenglaiZoneMap
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
index 24d8716..90b5dac 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
@@ -695,11 +695,12 @@
#跨服分区类型配置, 没配置的默认 CrossZoneComm
Def_CrossZoneTypeName = {0:"CrossZoneComm", # 特殊0,默认常规分区
Def_FBMapID_CrossPenglai:"CrossZoneComm",
+ Def_FBMapID_CrossRealmPK:"CrossZonePK",
Def_FBMapID_CrossDemonKing:"CrossZonePK",
Def_FBMapID_CrossGrasslandLing:"CrossZonePK",
Def_FBMapID_CrossGrasslandXian:"CrossZonePK",
}
-#跨服分区对应地图配置表名
+#跨服分区对应地图配置表名 - 仅适用于固定地图及虚拟分线的跨服玩法
Def_CrossZoneMapTableName = {Def_FBMapID_CrossPenglai:"CrossPenglaiZoneMap",
}
#需要动态分配线路的跨服地图
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py
index c29a919..9150260 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py
@@ -90,19 +90,11 @@
ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition(zoneTypeName, {"CrossZoneName":crossZoneName}, True)
return ipyDataList
-def GetServerCrossZoneMapIpyData(mapID, serverGroupID=0):
- ## 获取本服对应跨服玩法分区地图信息
+def GetServerCrossZoneMapIpyData(zoneID, mapID):
+ ## 获取本服对应跨服玩法分区地图信息 - 仅适用于固定地图及虚拟分线的跨服玩法
if mapID not in ChConfig.Def_CrossZoneMapTableName:
return
tableName = ChConfig.Def_CrossZoneMapTableName[mapID]
- if not serverGroupID:
- if GameWorld.IsCrossServer():
- return
- serverGroupID = GameWorld.GetServerGroupID()
- zoneIpyData = GetCrossZoneIpyDataByServerGroupID(mapID, serverGroupID)
- if not zoneIpyData:
- return
- zoneID = zoneIpyData.GetZoneID()
return IpyGameDataPY.GetIpyGameDataByCondition(tableName, {"ZoneID":zoneID})
def IsCrossServerOpen():
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
index 7b38343..34ceaf6 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
@@ -329,16 +329,25 @@
SyncPlayerCrossMapNPCInfo(curPlayer, mapID, npcIDList, mapNPCInfoDict)
return
+ serverGroupID = GameWorld.GetServerGroupID()
+ zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByServerGroupID(mapID, serverGroupID)
+ if not zoneIpyData:
+ return
+ zoneID = zoneIpyData.GetZoneID()
+
# 本服缓存超时,发送跨服服务器查询
playerID = curPlayer.GetPlayerID()
- CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_QueryNPCInfo, {"PlayerID":playerID, "MapID":mapID, "NPCIDList":npcIDList})
+ dataMsg = {"PlayerID":playerID, "ZoneID":zoneID, "MapID":mapID, "NPCIDList":npcIDList}
+ CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_QueryNPCInfo, dataMsg)
return
def ClientServerMsg_QueryNPCInfo(serverGroupID, msgData):
## 收到子服请求查看跨服地图NPC个数信息
+ zoneID = msgData["ZoneID"]
mapID = msgData["MapID"]
- zoneIpyData = CrossRealmPlayer.GetServerCrossZoneMapIpyData(mapID, serverGroupID)
+
+ zoneIpyData = CrossRealmPlayer.GetServerCrossZoneMapIpyData(zoneID, mapID)
if not zoneIpyData:
return
realMapID = zoneIpyData.GetMapID()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 9582bcb..7d0fbd6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -1784,11 +1784,12 @@
#跨服分区类型配置, 没配置的默认 CrossZoneComm
Def_CrossZoneTypeName = {0:"CrossZoneComm", # 特殊0,默认常规分区
Def_FBMapID_CrossPenglai:"CrossZoneComm",
+ Def_FBMapID_CrossRealmPK:"CrossZonePK",
Def_FBMapID_CrossDemonKing:"CrossZonePK",
Def_FBMapID_CrossGrasslandLing:"CrossZonePK",
Def_FBMapID_CrossGrasslandXian:"CrossZonePK",
}
-#跨服分区对应地图配置表名
+#跨服分区对应地图配置表名 - 仅适用于固定地图及虚拟分线的跨服玩法
Def_CrossZoneMapTableName = {Def_FBMapID_CrossPenglai:"CrossPenglaiZoneMap",
}
#需要动态分配线路的跨服地图
@@ -3337,6 +3338,7 @@
Def_Player_Dict_FBFirstEnterRecord = "FBFEntRec" # 记录副本是否参与过,按位0 1 存储表示
Def_FBStar_MaxKeyCnt = 5 # 暂时每个副本ID支持9*5个lineID记录
Def_Player_Dict_ReqFBFuncLine = "ReqFBFuncLine" # 请求进入的副本功能线路
+Def_Player_Dict_ReqCrossFBZoneID = "ReqCrossFBZoneID" # 请求进入跨服的跨服分区ID
Def_Player_Dict_ReqCrossFBFuncLine = "ReqCrossFBFuncLine" # 请求进入跨服的副本功能线路
Def_Player_Dict_TeamFBAverageLV = "TeamFBAverageLV" # 请求进入的组队副本平均等级, 临时用,进入副本设置完后删除
Def_Player_Dict_TeamFBMaxLV = "TeamFBMaxLV" # 请求进入的组队副本最大等级, 临时用,进入副本设置完后删除
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 8706cdf..e2a5eeb 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -18,6 +18,7 @@
import IPY_GameWorld
import PlayerControl
import GameWorldProcess
+import CrossRealmPlayer
import PlayerSuccess
import ReadChConfig
import ShareDefine
@@ -484,6 +485,22 @@
def DoEnterFBLogic(curPlayer, tick):
curPlayerID = curPlayer.GetID()
+ if GameWorld.IsCrossServer():
+ mapID = GameWorld.GetMap().GetMapID()
+ mapID = FBCommon.GetRecordMapID(mapID)
+ 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)
+ if fbZoneID != playerZoneID or fbFuncLineID != playerFuncLineID:
+ GameWorld.ErrLog("DoEnterFB 玩家与当前副本线路所属分区或功能分线不同,踢出玩家!fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s"
+ % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID)
+ CrossRealmPlayer.PlayerExitCrossServer(curPlayer)
+ return
+ GameWorld.Log("玩家进入跨服副本动态分配的线路: fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s"
+ % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID)
+
# 自伸缩副本根据玩家进入开启,主动调用一次,避免间隔调用时机未触发导致逻辑错乱
GameWorldProcess.EnterOpenFB(tick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 2242b50..227d2f6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -2406,4 +2406,11 @@
fbHelpFunc(curPlayer, tick)
return
+def GetCrossDynamicLineMapZoneID():
+ ## 获取跨服动态线路地图本线路跨服分区
+ return GameWorld.GetGameWorld().GetPropertyID() / 10000
+
+def GetCrossDynamicLineMapFuncLineID():
+ ## 获取跨服动态线路地图本线路功能线路ID
+ return GameWorld.GetGameWorld().GetPropertyID() % 10000 / 10
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py
index be16d05..f92efaa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py
@@ -21,6 +21,7 @@
import IPY_GameWorld
import IpyGameDataPY
import PlayerFairyDomain
+import CrossRealmPlayer
import GameWorldProcess
import PlayerControl
import ShareDefine
@@ -71,13 +72,13 @@
def GetCurFBFuncLineID():
## 获取本线路功能线路ID
if GameWorld.IsCrossServer():
- return GameWorld.GetGameWorld().GetPropertyID() % 10000 / 10
+ return FBCommon.GetCrossDynamicLineMapFuncLineID()
return GameWorld.GetGameWorld().GetPropertyID() - 1
def GetCurFBLineZoneID():
## 获取本线路所属跨服分区
if GameWorld.IsCrossServer():
- return GameWorld.GetGameWorld().GetPropertyID() / 10000
+ return FBCommon.GetCrossDynamicLineMapZoneID()
return 0
## 进副本
@@ -86,8 +87,7 @@
zoneID = GetCurFBLineZoneID()
funcLineID = GetCurFBFuncLineID()
bossID = GetCurFBLineBOSSID(lineID=funcLineID)
- visitCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainVisitCnt)
- GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s,bossID=%s,visitCount=%s" % (zoneID, funcLineID, bossID, visitCount), playerID)
+ GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s,bossID=%s" % (zoneID, funcLineID, bossID), playerID)
PyGameData.g_fbPickUpItemDict.pop(playerID, 0)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
index d8b0101..df5f4ab 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -19,6 +19,7 @@
import GameWorldProcess
import PlayerFairyDomain
import NPCCustomRefresh
+import CrossRealmPlayer
import IpyGameDataPY
import PyGameData
import NPCCommon
@@ -82,19 +83,11 @@
return
-def GetCurFBFuncLineID():
- ## 获取本线路功能线路ID
- return GameWorld.GetGameWorld().GetPropertyID() % 10000 / 10
-
-def GetCurFBLineZoneID():
- ## 获取本线路所属跨服分区
- return GameWorld.GetGameWorld().GetPropertyID() / 10000
-
## 进副本
def DoEnterFB(curPlayer, tick):
playerID = curPlayer.GetPlayerID()
- zoneID = GetCurFBLineZoneID()
- funcLineID = GetCurFBFuncLineID()
+ zoneID = FBCommon.GetCrossDynamicLineMapZoneID()
+ funcLineID = FBCommon.GetCrossDynamicLineMapFuncLineID()
GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s" % (zoneID, funcLineID), playerID)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 3dc6c80..08b3bd9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1178,6 +1178,12 @@
("list", "ServerGroupIDList", 0),
),
+ "CrossZonePK":(
+ ("char", "CrossZoneName", 1),
+ ("BYTE", "ZoneID", 1),
+ ("list", "ServerGroupIDList", 0),
+ ),
+
"CrossPenglaiZoneMap":(
("BYTE", "ZoneID", 0),
("DWORD", "MapID", 1),
@@ -3855,6 +3861,19 @@
def GetZoneID(self): return self.ZoneID # 赛区ID
def GetServerGroupIDList(self): return self.ServerGroupIDList # 赛区服务器组ID列表
+# 跨服分区表竞技场
+class IPY_CrossZonePK():
+
+ def __init__(self):
+ self.CrossZoneName = ""
+ self.ZoneID = 0
+ self.ServerGroupIDList = []
+ return
+
+ def GetCrossZoneName(self): return self.CrossZoneName # 跨服分区名
+ def GetZoneID(self): return self.ZoneID # 赛区ID
+ def GetServerGroupIDList(self): return self.ServerGroupIDList # 赛区服务器组ID列表
+
# 跨服Boss蓬莱仙境分区地图表
class IPY_CrossPenglaiZoneMap():
@@ -4678,6 +4697,8 @@
self.ipyCrossRealmPKOrderAwardLen = len(self.ipyCrossRealmPKOrderAwardCache)
self.ipyCrossZoneCommCache = self.__LoadFileData("CrossZoneComm", IPY_CrossZoneComm)
self.ipyCrossZoneCommLen = len(self.ipyCrossZoneCommCache)
+ self.ipyCrossZonePKCache = self.__LoadFileData("CrossZonePK", IPY_CrossZonePK)
+ self.ipyCrossZonePKLen = len(self.ipyCrossZonePKCache)
self.ipyCrossPenglaiZoneMapCache = self.__LoadFileData("CrossPenglaiZoneMap", IPY_CrossPenglaiZoneMap)
self.ipyCrossPenglaiZoneMapLen = len(self.ipyCrossPenglaiZoneMapCache)
self.ipyGatherSoulCache = self.__LoadFileData("GatherSoul", IPY_GatherSoul)
@@ -5138,6 +5159,8 @@
def GetCrossRealmPKOrderAwardByIndex(self, index): return self.ipyCrossRealmPKOrderAwardCache[index]
def GetCrossZoneCommCount(self): return self.ipyCrossZoneCommLen
def GetCrossZoneCommByIndex(self, index): return self.ipyCrossZoneCommCache[index]
+ def GetCrossZonePKCount(self): return self.ipyCrossZonePKLen
+ def GetCrossZonePKByIndex(self, index): return self.ipyCrossZonePKCache[index]
def GetCrossPenglaiZoneMapCount(self): return self.ipyCrossPenglaiZoneMapLen
def GetCrossPenglaiZoneMapByIndex(self, index): return self.ipyCrossPenglaiZoneMapCache[index]
def GetGatherSoulCount(self): return self.ipyGatherSoulLen
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 18ade5c..558a898 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -50,7 +50,6 @@
import PlayerBossReborn
import PlayerFairyCeremony
import PlayerNewFairyCeremony
-import GameLogic_CrossDemonKing
import GameLogic_CrossGrassland
import PlayerWeekParty
import PlayerActLogin
@@ -2021,8 +2020,8 @@
return
zoneID = zoneIpyData.GetZoneID()
GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_GameWorldBossRebornCross % (zoneID, bossID), 0)
- elif mapID == ChConfig.Def_FBMapID_CrossDemonKing:
- zoneID = GameLogic_CrossDemonKing.GetCurFBLineZoneID()
+ elif mapID in ChConfig.Def_CrossDynamicLineMap:
+ zoneID = FBCommon.GetCrossDynamicLineMapZoneID()
GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_GameWorldBossRebornCross % (zoneID, bossID), 0)
else:
GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_GameWorldBossReborn % bossID, 0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
index 23e5938..878c2c8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
@@ -52,19 +52,11 @@
GameWorld.ErrLog("没有找到跨服玩法对应分区! mapID=%s, serverGroupID=%s, zoneTypeName=%s" % (mapID, serverGroupID, zoneTypeName))
return
-def GetServerCrossZoneMapIpyData(mapID, serverGroupID=0):
- ## 获取本服对应跨服玩法分区地图信息
+def GetServerCrossZoneMapIpyData(zoneID, mapID):
+ ## 获取本服对应跨服玩法分区地图信息 - 仅适用于固定地图及虚拟分线的跨服玩法
if mapID not in ChConfig.Def_CrossZoneMapTableName:
return
tableName = ChConfig.Def_CrossZoneMapTableName[mapID]
- if not serverGroupID:
- if GameWorld.IsCrossServer():
- return
- serverGroupID = GameWorld.GetServerGroupID()
- zoneIpyData = GetCrossZoneIpyDataByServerGroupID(mapID, serverGroupID)
- if not zoneIpyData:
- return
- zoneID = zoneIpyData.GetZoneID()
return IpyGameDataPY.GetIpyGameDataByCondition(tableName, {"ZoneID":zoneID})
def IsCrossServerOpen():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py
index b01ff53..1fabaab 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py
@@ -70,19 +70,22 @@
GameWorld.ErrLog("跨服已经在上传数据,不重复提交!playerRegisterMap=%s,registerMap=%s" % (playerRegisterMap, registerMap), curPlayer.GetPlayerID())
return
- zoneID = 0
+ #跨服前更新自己所属服务器组ID
+ PlayerControl.UpdPlayerServerGroupID(curPlayer)
+ serverGroupID = PlayerControl.GetPlayerServerGroupID(curPlayer)
+ zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByServerGroupID(registerMap, serverGroupID)
+ if not zoneIpyData:
+ return
+ zoneID = zoneIpyData.GetZoneID()
+
if not mapID:
- zoneIpyData = CrossRealmPlayer.GetServerCrossZoneMapIpyData(registerMap)
+ zoneIpyData = CrossRealmPlayer.GetServerCrossZoneMapIpyData(zoneID, registerMap)
if not zoneIpyData:
GameWorld.ErrLog("找不到该服务器对应跨服分区: registerMap=%s" % (registerMap))
return
- zoneID, mapID, dataMapID, copyMapID, posX, posY = zoneIpyData.GetZoneID(), zoneIpyData.GetMapID(), \
- zoneIpyData.GetDataMapID(), zoneIpyData.GetCopyMapID(), zoneIpyData.GetPosX(), zoneIpyData.GetPosY()
-
- if not mapID:
- return
+ mapID, dataMapID, copyMapID, posX, posY = zoneIpyData.GetMapID(), zoneIpyData.GetDataMapID(), zoneIpyData.GetCopyMapID(), zoneIpyData.GetPosX(), zoneIpyData.GetPosY()
- if not posX and not posY:
+ if not posX or not posY:
fbLineIpyData = FBCommon.GetFBLineIpyData(mapID, lineID)
if fbLineIpyData:
tick = GameWorld.GetGameWorld().GetTick()
@@ -92,13 +95,13 @@
GameWorld.ErrLog("未找到进入副本坐标!mapID=%s,lineID=%s" % (mapID, lineID))
return
posX, posY = retPos
+
+ if not mapID or not posX or not posY:
+ return
if not FBLogic.OnRegEnterCrossFB(curPlayer, mapID, lineID):
GameWorld.ErrLog("OnRegEnterCrossFB 进入跨服副本注册失败,进入条件不足!无法注册! mapID=%s,lineID=%s" % (mapID, lineID), playerID)
return
-
- #跨服前更新自己所属服务器组ID
- PlayerControl.UpdPlayerServerGroupID(curPlayer)
if registerMap in ChConfig.RegisterEnter_CrossServerMapIDList:
prepareEnterCrossServer = ChPyNetSendPack.tagMCPrepareEnterCrossServer()
@@ -106,6 +109,7 @@
NetPackCommon.SendFakePack(curPlayer, prepareEnterCrossServer)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_CrossRegisterMap, registerMap)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqCrossFBFuncLine, lineID)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqCrossFBZoneID, zoneID)
CrossPlayerData.OnPlayerCrossReg(curPlayer)
#curPlayer.SendMergeRegisterPlayer(mapID, dataMapID, copyMapID, posX, posY)
curPlayer.SendMergeRegisterPlayerAfterChange(CrossRealmPlayer.GetCrossPlayerName(curPlayer), mapID, dataMapID, copyMapID, posX, posY)
--
Gitblit v1.8.0