From eddda540e947bcc6483b1c89b3e42b81a337f77e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 23 十月 2020 15:28:52 +0800
Subject: [PATCH] 4834 【主干】【长尾】【BT】GM补偿邮件重复;(当非单服邮件时GUID相同则不允许重复插入;当指定单服邮件批量发送补偿指令时,每个服重新生成GUID插入邮件)

---
 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