| | |
| | | def GetMap():
|
| | | return __GameWorld.GetMap()
|
| | |
|
| | | def GetMapDataMapID(mapID):
|
| | | ## 用于获取非本地图的dataMapID,仅针对 ZoneServerGroup\map1_8G\MapServer\MapServerData\Map\MapID.txt
|
| | | mapIDTxtInfo = GetMapIDTxtInfo()
|
| | | if mapID not in mapIDTxtInfo:
|
| | | return mapID
|
| | | mapInfo = mapIDTxtInfo[mapID]
|
| | | dataMapID = mapInfo.get("DataMapID", mapID)
|
| | | return dataMapID
|
| | |
|
| | | def GetMapIDTxtInfo():
|
| | | if PyGameData.g_mapIDTxtInfo:
|
| | | return PyGameData.g_mapIDTxtInfo
|
| | | PyGameData.g_mapIDTxtInfo = {}
|
| | | rootPath = ChConfig.GetServerRootPath()
|
| | | mapIDTxt = rootPath + "\\ZoneServerGroup\\map1_8G\\MapServer\\MapServerData\\Map\\MapID.txt"
|
| | | f = open(mapIDTxt)
|
| | | for line in f.readlines():
|
| | | lineList = line.split('\t')
|
| | | if not lineList or len(lineList) < 9:
|
| | | continue
|
| | | tMapID = int(lineList[1])
|
| | | dDataMapID = int(lineList[3])
|
| | | PyGameData.g_mapIDTxtInfo[tMapID] = {"DataMapID":dDataMapID}
|
| | | Log("Load %s" % mapIDTxt)
|
| | | Log("g_mapIDTxtInfo=%s" % PyGameData.g_mapIDTxtInfo)
|
| | | return PyGameData.g_mapIDTxtInfo
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##获取Mail实例
|
| | | # @param 无
|