From 8f9ba65c87a5f8cc0d59398638245ac1c788071e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 29 三月 2019 15:44:34 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py | 34 +++++++++++++++++++++-------------
1 files changed, 21 insertions(+), 13 deletions(-)
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 e3a2c70..ec3f786 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
@@ -36,20 +36,13 @@
return opName.decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
-def GetServerCrossZoneIpyData(mapID, serverGroupID=0):
- ## 获取本服对应跨服玩法分区地图信息
- if mapID not in ChConfig.Def_CrossZoneTableName:
+def GetCrossCommZoneIpyDataByServerGroupID(serverGroupID):
+ ## 获取跨服常规分区
+ crossZoneName = GameWorld.GetCrossZoneName()
+ ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("CrossZoneComm", {"CrossZoneName":crossZoneName}, True)
+ if not ipyDataList:
return
- if not serverGroupID:
- serverGroupID = GameWorld.GetServerGroupID()
-
- tableName = ChConfig.Def_CrossZoneTableName[mapID]
- ipyDataMgr = IpyGameDataPY.IPY_Data()
- if not hasattr(ipyDataMgr, "Get%sCount" % tableName):
- return
-
- for i in xrange(getattr(ipyDataMgr, "Get%sCount" % tableName)()):
- ipyData = getattr(ipyDataMgr, "Get%sByIndex" % tableName)(i)
+ for ipyData in ipyDataList:
serverGroupIDList = ipyData.GetServerGroupIDList()
for serverGroupIDInfo in serverGroupIDList:
if (isinstance(serverGroupIDInfo, tuple) and serverGroupIDInfo[0] <= serverGroupID <= serverGroupIDInfo[1]) \
@@ -57,6 +50,21 @@
return ipyData
return
+def GetServerCrossZoneMapIpyData(mapID, serverGroupID=0):
+ ## 获取本服对应跨服玩法分区地图信息
+ if mapID not in ChConfig.Def_CrossZoneMapTableName:
+ return
+ tableName = ChConfig.Def_CrossZoneMapTableName[mapID]
+ if not serverGroupID:
+ if GameWorld.IsCrossServer():
+ return
+ serverGroupID = GameWorld.GetServerGroupID()
+ zoneIpyData = GetCrossCommZoneIpyDataByServerGroupID(serverGroupID)
+ if not zoneIpyData:
+ return
+ commZoneID = zoneIpyData.GetZoneID()
+ return IpyGameDataPY.GetIpyGameDataByCondition(tableName, {"ZoneID":commZoneID})
+
def IsCrossServerOpen():
## 跨服服务器是否开放中
return GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
--
Gitblit v1.8.0