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/FuncOpenLVConfig.cs |   50 ++++++++++++++++++++++++++------------------------
 1 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/Core/GameEngine/Model/Config/FuncOpenLVConfig.cs b/Core/GameEngine/Model/Config/FuncOpenLVConfig.cs
index 20647e6..52ed426 100644
--- a/Core/GameEngine/Model/Config/FuncOpenLVConfig.cs
+++ b/Core/GameEngine/Model/Config/FuncOpenLVConfig.cs
@@ -1,6 +1,6 @@
 锘�//--------------------------------------------------------
 //    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Wednesday, May 16, 2018
+//    [  Date ]:		   Tuesday, February 12, 2019
 //--------------------------------------------------------
 
 using UnityEngine;
@@ -11,47 +11,49 @@
     
 	public partial class FuncOpenLVConfig : ConfigBase {
 
-		public int FuncId { get ; private set ; }
-		public int LimitLV { get ; private set ; }
-		public int LimitMagicWeapon { get ; private set ; }
-		public int LimiRealmLV { get ; private set ; }
-		public int LimitMissionID { get ; private set ; }
-		public string Remark { get ; private set; } 
-		public string State { get ; private set; } 
-		public string Tip { get ; private set; } 
-		public string Icon { get ; private set; } 
-		public int open { get ; private set ; }
-		public int ContinueTask { get ; private set ; }
+		public int FuncId;
+		public int LimitLV;
+		public int LimitMagicWeapon;
+		public int LimiRealmLV;
+		public int LimitMissionID;
+		public string Remark;
+		public string State;
+		public string Tip;
+		public string Icon;
+		public int open;
+		public int ContinueTask;
 
 		public override string getKey()
         {
             return FuncId.ToString();
         }
 
-		public override void Parse() {
+		public override void Parse(string content) {
 			try
             {
-                FuncId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out FuncId);
 			
-				LimitLV=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out LimitLV);
 			
-				LimitMagicWeapon=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out LimitMagicWeapon);
 			
-				LimiRealmLV=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
+				int.TryParse(contents[3],out LimiRealmLV);
 			
-				LimitMissionID=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; 
+				int.TryParse(contents[4],out LimitMissionID);
 			
-				Remark = rawContents[5].Trim();
+				Remark = contents[5];
 			
-				State = rawContents[6].Trim();
+				State = contents[6];
 			
-				Tip = rawContents[7].Trim();
+				Tip = contents[7];
 			
-				Icon = rawContents[8].Trim();
+				Icon = contents[8];
 			
-				open=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; 
+				int.TryParse(contents[9],out open);
 			
-				ContinueTask=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; 
+				int.TryParse(contents[10],out ContinueTask);
             }
             catch (Exception ex)
             {

--
Gitblit v1.8.0