From 4e890dcf6ca7a885ad6d4f8e654599d8c08261ea Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 30 四月 2019 13:34:05 +0800
Subject: [PATCH] 1 修复本服妖王设置寻访状态bug
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py | 28 +++++++++++++++-------------
1 files changed, 15 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..878c2c8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
@@ -36,27 +36,29 @@
return opName.decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
-def GetServerCrossZoneIpyData(mapID, serverGroupID=0):
- ## 获取本服对应跨服玩法分区地图信息
- if mapID not in ChConfig.Def_CrossZoneTableName:
+def GetCrossZoneIpyDataByServerGroupID(mapID, serverGroupID):
+ ## 获取跨服分区
+ zoneTypeName = ChConfig.Def_CrossZoneTypeName.get(mapID, "CrossZoneComm")
+ crossZoneName = GameWorld.GetCrossZoneName()
+ ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition(zoneTypeName, {"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]) \
or (isinstance(serverGroupIDInfo, int) and serverGroupIDInfo == serverGroupID):
return ipyData
+ GameWorld.ErrLog("没有找到跨服玩法对应分区! mapID=%s, serverGroupID=%s, zoneTypeName=%s" % (mapID, serverGroupID, zoneTypeName))
return
+def GetServerCrossZoneMapIpyData(zoneID, mapID):
+ ## 获取本服对应跨服玩法分区地图信息 - 仅适用于固定地图及虚拟分线的跨服玩法
+ if mapID not in ChConfig.Def_CrossZoneMapTableName:
+ return
+ tableName = ChConfig.Def_CrossZoneMapTableName[mapID]
+ return IpyGameDataPY.GetIpyGameDataByCondition(tableName, {"ZoneID":zoneID})
+
def IsCrossServerOpen():
## 跨服服务器是否开放中
return GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
--
Gitblit v1.8.0