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/WeekPartyConfig.cs |  102 ++++++++++++++++++++++++++-------------------------
 1 files changed, 52 insertions(+), 50 deletions(-)

diff --git a/Core/GameEngine/Model/Config/WeekPartyConfig.cs b/Core/GameEngine/Model/Config/WeekPartyConfig.cs
index ce27992..0f2a644 100644
--- a/Core/GameEngine/Model/Config/WeekPartyConfig.cs
+++ b/Core/GameEngine/Model/Config/WeekPartyConfig.cs
@@ -1,56 +1,58 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Wednesday, January 23, 2019
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class WeekPartyConfig : ConfigBase {
-
-		public int Id { get ; private set ; }
-		public int ActionType { get ; private set ; }
-		public string Description { get ; private set; } 
-		public int jump { get ; private set ; }
-		public int order { get ; private set ; }
-		public int DailyQusetId { get ; private set ; }
-		public int SpecialDisplayType { get ; private set ; }
-
-		public override string getKey()
-        {
-            return Id.ToString();
-        }
-
-		public override void Parse() {
-			try
-            {
-                Id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
+	public partial class WeekPartyConfig : ConfigBase {
+
+		public int Id;
+		public int ActionType;
+		public string Description;
+		public int jump;
+		public int order;
+		public int DailyQusetId;
+		public int SpecialDisplayType;
+
+		public override string getKey()
+        {
+            return Id.ToString();
+        }
+
+		public override void Parse(string content) {
+			try
+            {
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out Id);
 			
-				ActionType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out ActionType);
 			
-				Description = rawContents[2].Trim();
+				Description = contents[2];
 			
-				jump=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
+				int.TryParse(contents[3],out jump);
 			
-				order=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; 
+				int.TryParse(contents[4],out order);
 			
-				DailyQusetId=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; 
+				int.TryParse(contents[5],out DailyQusetId);
 			
-				SpecialDisplayType=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; 
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				int.TryParse(contents[6],out SpecialDisplayType);
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0