| | |
| | | #---------------------------------------------------------------------
|
| | | import CommFunc
|
| | | import logging
|
| | | # 1. 构建表
|
| | | import ConfigurationReader.ConfigIniReader |
| | |
|
| | |
|
| | |
|
| | |
|
| | | # 1. 构建表
|
| | |
|
| | | class MapEventPoint():
|
| | | def __init__(self):
|
| | | #int int int int int int int int string string string
|
| | | self.Key = 0 |
| | | self.MapID = 0
|
| | | self.NPCID = 0
|
| | | self.IsShowInfo = 0
|
| | | self.Colour = 0
|
| | | self.LowLV = 0
|
| | | self.HighestLV = 0
|
| | | self.Defense = 0
|
| | | self.Drop1 = "" |
| | | self.Drop2 = ""
|
| | | self.EXP = "" |
| | |
|
| | | self.count = 12
|
| | |
|
| | | def ReadFromList(self, curList):
|
| | |
|
| | | self.MapID = CommFunc.ToIntDef(curList[1])
|
| | | self.NPCID = CommFunc.ToIntDef(curList[2])
|
| | |
|
| | | self.LowLV = CommFunc.ToIntDef(curList[6])
|
| | | self.HighestLV = CommFunc.ToIntDef(curList[7])
|
| | | self.Defense = CommFunc.ToIntDef(curList[8])
|
| | | self.MapID = CommFunc.ToIntDef(curList[0])
|
| | | self.NPCID = CommFunc.ToIntDef(curList[1])
|
| | | self.LowLV = CommFunc.ToIntDef(curList[2])
|
| | | self.HighestLV = CommFunc.ToIntDef(curList[3])
|
| | | self.Defense = CommFunc.ToIntDef(curList[4])
|
| | |
|
| | | return
|
| | |
|
| | |
| | | linenum = 0
|
| | | for line in lines:
|
| | | linenum += 1
|
| | | # 1.字段类型 2.字段名 3.字段备注
|
| | | if linenum <= 3:
|
| | | # 字段名 |
| | | if linenum <= 1:
|
| | | continue
|
| | | classObj = MapEventPoint()
|
| | | lineList = line.split('\t')
|
| | |
| | | linenum = 0
|
| | | for line in lines:
|
| | | linenum += 1
|
| | | # 1.字段类型 2.字段名 3.字段备注
|
| | | if linenum <= 3:
|
| | | # .字段名 |
| | | if linenum <= 1:
|
| | | continue
|
| | | classObj = NPCPoint()
|
| | | lineList = line.strip().split('\t')
|
| | |
| | | # 已记录
|
| | | continue
|
| | | myPoint = point
|
| | | print myPoint.LowLV
|
| | | #print myPoint.LowLV
|
| | |
|
| | | if not myPoint:
|
| | | if not pointList:
|
| | |
| | | __gMapEventPointReader = None
|
| | |
|
| | | def ReadMapEventPoint( PyBaseRoot):
|
| | | config = ConfigurationReader.ConfigIniReader.GetConfig()
|
| | | ServerDBConfigPath = config.GetServerDBConfigPath() #数据库路径
|
| | | global __gMapEventPointReader
|
| | | if not __gMapEventPointReader:
|
| | | __gMapEventPointReader = MapEventPointMgr()
|
| | | __gMapEventPointReader.InitTable(PyBaseRoot + "Data\\MapEventPoint.txt")
|
| | | __gMapEventPointReader.InitPointType(PyBaseRoot + "Data\\MonsterRefreshPoint.txt")
|
| | | __gMapEventPointReader.InitTable(ServerDBConfigPath + r"\PySysDB\tagMapEventPoint.txt")
|
| | | __gMapEventPointReader.InitPointType(ServerDBConfigPath + r"\PySysDB\tagMonsterRefreshPoint.txt")
|
| | |
|
| | | def GetMapEventPoint():
|
| | | global __gMapEventPointReader
|