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

diff --git a/Core/GameEngine/Model/Config/VIPAwardConfig.cs b/Core/GameEngine/Model/Config/VIPAwardConfig.cs
index bf4efc0..70218b6 100644
--- a/Core/GameEngine/Model/Config/VIPAwardConfig.cs
+++ b/Core/GameEngine/Model/Config/VIPAwardConfig.cs
@@ -1,56 +1,58 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Thursday, November 08, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class VIPAwardConfig : ConfigBase {
-
-		public int VIPLV { get ; private set ; }
-		public string VIPgift { get ; private set; } 
-		public int GiftPrice { get ; private set ; }
-		public int OldPrice { get ; private set ; }
-		public string specialGiftIcon { get ; private set; } 
-		public string privilegeIcon1 { get ; private set; } 
-		public string privilegeIcon2 { get ; private set; } 
-
-		public override string getKey()
-        {
-            return VIPLV.ToString();
-        }
-
-		public override void Parse() {
-			try
-            {
-                VIPLV=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
+	public partial class VIPAwardConfig : ConfigBase {
+
+		public int VIPLV;
+		public string VIPgift;
+		public int GiftPrice;
+		public int OldPrice;
+		public string specialGiftIcon;
+		public string privilegeIcon1;
+		public string privilegeIcon2;
+
+		public override string getKey()
+        {
+            return VIPLV.ToString();
+        }
+
+		public override void Parse(string content) {
+			try
+            {
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out VIPLV);
 			
-				VIPgift = rawContents[1].Trim();
+				VIPgift = contents[1];
 			
-				GiftPrice=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out GiftPrice);
 			
-				OldPrice=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
+				int.TryParse(contents[3],out OldPrice);
 			
-				specialGiftIcon = rawContents[4].Trim();
+				specialGiftIcon = contents[4];
 			
-				privilegeIcon1 = rawContents[5].Trim();
+				privilegeIcon1 = contents[5];
 			
-				privilegeIcon2 = rawContents[6].Trim();
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				privilegeIcon2 = contents[6];
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0