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/LVAawrdConfig.cs |   76 +++++++++++++++++++------------------
 1 files changed, 39 insertions(+), 37 deletions(-)

diff --git a/Core/GameEngine/Model/Config/LVAawrdConfig.cs b/Core/GameEngine/Model/Config/LVAawrdConfig.cs
index 9f7d5d4..65ac1c9 100644
--- a/Core/GameEngine/Model/Config/LVAawrdConfig.cs
+++ b/Core/GameEngine/Model/Config/LVAawrdConfig.cs
@@ -1,53 +1,55 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Monday, July 16, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
 	public partial class LVAawrdConfig : ConfigBase {
 
-		public int RewardID { get ; private set ; }
-		public int LV { get ; private set ; }
-		public int LimitNUM { get ; private set ; }
-		public string Reward { get ; private set; } 
-		public int VIPLimit { get ; private set ; }
-		public string VIPAward { get ; private set; } 
-
+		public int RewardID;
+		public int LV;
+		public int LimitNUM;
+		public string Reward;
+		public int VIPLimit;
+		public string VIPAward;
+
 		public override string getKey()
         {
             return RewardID.ToString();
-        }
-
-		public override void Parse() {
+        }
+
+		public override void Parse(string content) {
 			try
             {
-                RewardID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out RewardID);
 			
-				LV=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out LV);
 			
-				LimitNUM=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out LimitNUM);
 			
-				Reward = rawContents[3].Trim();
+				Reward = contents[3];
 			
-				VIPLimit=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; 
+				int.TryParse(contents[4],out VIPLimit);
 			
-				VIPAward = rawContents[5].Trim();
+				VIPAward = contents[5];
             }
             catch (Exception ex)
             {
                 DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0