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/ResourcesBackConfig.cs |  114 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 58 insertions(+), 56 deletions(-)

diff --git a/Core/GameEngine/Model/Config/ResourcesBackConfig.cs b/Core/GameEngine/Model/Config/ResourcesBackConfig.cs
index dbd2e2c..6feae21 100644
--- a/Core/GameEngine/Model/Config/ResourcesBackConfig.cs
+++ b/Core/GameEngine/Model/Config/ResourcesBackConfig.cs
@@ -1,65 +1,67 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Wednesday, December 19, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class ResourcesBackConfig : ConfigBase {
-
-		public int ID { get ; private set ; }
-		public int RelatedID { get ; private set ; }
-		public int CanBackTimes { get ; private set ; }
-		public int NormalCostJade { get ; private set ; }
-		public int VipCostJade { get ; private set ; }
-		public string JadeReward { get ; private set; } 
-		public int CostCopper { get ; private set ; }
-		public string CopperReward { get ; private set; } 
-		public string JobItem { get ; private set; } 
-		public string RewardList { 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 ResourcesBackConfig : ConfigBase {
+
+		public int ID;
+		public int RelatedID;
+		public int CanBackTimes;
+		public int NormalCostJade;
+		public int VipCostJade;
+		public string JadeReward;
+		public int CostCopper;
+		public string CopperReward;
+		public string JobItem;
+		public string RewardList;
+
+		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);
 			
-				RelatedID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out RelatedID);
 			
-				CanBackTimes=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out CanBackTimes);
 			
-				NormalCostJade=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
+				int.TryParse(contents[3],out NormalCostJade);
 			
-				VipCostJade=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; 
+				int.TryParse(contents[4],out VipCostJade);
 			
-				JadeReward = rawContents[5].Trim();
+				JadeReward = contents[5];
 			
-				CostCopper=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; 
+				int.TryParse(contents[6],out CostCopper);
 			
-				CopperReward = rawContents[7].Trim();
+				CopperReward = contents[7];
 			
-				JobItem = rawContents[8].Trim();
+				JobItem = contents[8];
 			
-				RewardList = rawContents[9].Trim();
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				RewardList = contents[9];
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0