| | |
| | | #---------------------------------------------------------------------
|
| | | import CommFunc
|
| | | import logging
|
| | | import ConfigurationReader.ConfigIniReader |
| | |
|
| | |
|
| | | # 1. 构建表
|
| | |
|
| | | |
| | | ## 改成读取服务器表
|
| | | class ChinMapData():
|
| | | def __init__(self):
|
| | | #MapID Name Country LV ExistTime MapFBType AutoSize Period PeriodValue1 PeriodHour1 |
| | | #PeriodMinute1 PeriodValue2 PeriodHour2 PeriodMinute2 LocalReborn SkillReborn RebornMap |
| | | #RebornMapX RebornMapY CanRide CanOutPet TreasureID
|
| | | self.MapID = 0
|
| | | self.LV = 0
|
| | | self.TreasureID = 0
|
| | |
| | | self.__Table.append(classObj)
|
| | |
|
| | | def FindMaxMapID(self, lv, fbID):
|
| | | # 地图顺序即
|
| | | maxMapID = self.__Table[0].MapID # 默认第一张地图
|
| | | for mapData in self.__Table:
|
| | |
|
| | |
| | | if mapData.TreasureID != 0 and fbID < mapData.TreasureID:
|
| | | continue
|
| | |
|
| | | maxMapID = max(mapData.MapID, maxMapID)
|
| | | maxMapID = mapData.MapID
|
| | |
|
| | | return maxMapID
|
| | |
|
| | |
| | |
|
| | | def ReadChinMapData( PyBaseRoot):
|
| | | global __gChinMapDataReader
|
| | | config = ConfigurationReader.ConfigIniReader.GetConfig()
|
| | | ServerDBConfigPath = config.GetServerDBConfigPath() #数据库路径
|
| | | |
| | | if not __gChinMapDataReader:
|
| | | __gChinMapDataReader = ChinMapDataMgr()
|
| | | __gChinMapDataReader.InitTable(PyBaseRoot + "Data\\tagChinMap.txt")
|
| | | __gChinMapDataReader.InitTable(ServerDBConfigPath + r"\SysDB\tagChinMap.txt")
|
| | |
|
| | | def GetChinMapData():
|
| | | global __gChinMapDataReader
|