From 1aeb815836d84ecfddf761a47862efebbba0ad03 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 12 二月 2019 21:55:16 +0800
Subject: [PATCH] 3335 配置表读取重构。

---
 Core/GameEngine/Model/Config/BossInfoConfig.cs |   86 ++++++++++++++++++++++---------------------
 1 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/Core/GameEngine/Model/Config/BossInfoConfig.cs b/Core/GameEngine/Model/Config/BossInfoConfig.cs
index f4eca38..ddfa003 100644
--- a/Core/GameEngine/Model/Config/BossInfoConfig.cs
+++ b/Core/GameEngine/Model/Config/BossInfoConfig.cs
@@ -1,44 +1,46 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Thursday, August 30, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class BossInfoConfig : ConfigBase {
-
-		public int NPCID { get ; private set ; }
-		public int MapID { get ; private set ; }
-		public int StoneNPCID { get ; private set ; }
-
-		public override string getKey()
-        {
-            return NPCID.ToString();
-        }
-
-		public override void Parse() {
-			try
-            {
-                NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
+	public partial class BossInfoConfig : ConfigBase {
+
+		public int NPCID;
+		public int MapID;
+		public int StoneNPCID;
+
+		public override string getKey()
+        {
+            return NPCID.ToString();
+        }
+
+		public override void Parse(string content) {
+			try
+            {
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out NPCID);
 			
-				MapID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out MapID);
 			
-				StoneNPCID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				int.TryParse(contents[2],out StoneNPCID);
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0