From 34e1fe758ce0499e63cd232eb9f77fd67bfe80c4 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 15 一月 2024 21:15:01 +0800 Subject: [PATCH] 10019 【砍树】回合战斗(修改B420封包状态说明) --- Tool/Robot/DataReader/MapEventPointReader.py | 42 +++++++++++++++++++----------------------- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Tool/Robot/DataReader/MapEventPointReader.py b/Tool/Robot/DataReader/MapEventPointReader.py index db0a990..2468abb 100644 --- a/Tool/Robot/DataReader/MapEventPointReader.py +++ b/Tool/Robot/DataReader/MapEventPointReader.py @@ -12,34 +12,28 @@ #--------------------------------------------------------------------- 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 @@ -67,8 +61,8 @@ linenum = 0 for line in lines: linenum += 1 - # 1.字段类型 2.字段名 3.字段备注 - if linenum <= 3: + # 字段名 + if linenum <= 1: continue classObj = MapEventPoint() lineList = line.split('\t') @@ -88,8 +82,8 @@ 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') @@ -126,7 +120,7 @@ # 已记录 continue myPoint = point - print myPoint.LowLV + #print myPoint.LowLV if not myPoint: if not pointList: @@ -184,11 +178,13 @@ __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 -- Gitblit v1.8.0