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/SkillConfig.cs |  370 ++++++++++++++++++++++++++--------------------------
 1 files changed, 186 insertions(+), 184 deletions(-)

diff --git a/Core/GameEngine/Model/Config/SkillConfig.cs b/Core/GameEngine/Model/Config/SkillConfig.cs
index 5ac4014..b035919 100644
--- a/Core/GameEngine/Model/Config/SkillConfig.cs
+++ b/Core/GameEngine/Model/Config/SkillConfig.cs
@@ -1,257 +1,259 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Wednesday, October 24, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class SkillConfig : ConfigBase {
-
-		public int SkillID { get ; private set ; }
-		public string SkillName { get ; private set; } 
-		public int SkillTypeID { get ; private set ; }
-		public int SkillLV { get ; private set ; }
-		public int SkillMaxLV { get ; private set ; }
-		public int UseType { get ; private set ; }
-		public int FuncType { get ; private set ; }
-		public int CastTime { get ; private set ; }
-		public int SkillType { get ; private set ; }
-		public int HurtType { get ; private set ; }
-		public int ContinueUse { get ; private set ; }
-		public int AtkType { get ; private set ; }
-		public int AtkRadius { get ; private set ; }
-		public int Tag { get ; private set ; }
-		public int AtkDist { get ; private set ; }
-		public int StiffTime { get ; private set ; }
-		public int CoolDownTime { get ; private set ; }
-		public int MP { get ; private set ; }
-		public int HP { get ; private set ; }
-		public int XP { get ; private set ; }
-		public int UseItemID { get ; private set ; }
-		public int UseItemCount { get ; private set ; }
-		public int Effect1 { get ; private set ; }
-		public int EffectValue11 { get ; private set ; }
-		public int EffectValue12 { get ; private set ; }
-		public int EffectValue13 { get ; private set ; }
-		public int Effect2 { get ; private set ; }
-		public int EffectValue21 { get ; private set ; }
-		public int EffectValue22 { get ; private set ; }
-		public int EffectValue23 { get ; private set ; }
-		public int Effect3 { get ; private set ; }
-		public int EffectValue31 { get ; private set ; }
-		public int EffectValue32 { get ; private set ; }
-		public int EffectValue33 { get ; private set ; }
-		public int Effect4 { get ; private set ; }
-		public int EffectValue41 { get ; private set ; }
-		public int EffectValue42 { get ; private set ; }
-		public int EffectValue43 { get ; private set ; }
-		public int Effect5 { get ; private set ; }
-		public int EffectValue51 { get ; private set ; }
-		public int EffectValue52 { get ; private set ; }
-		public int EffectValue53 { get ; private set ; }
-		public int Effect6 { get ; private set ; }
-		public int EffectValue61 { get ; private set ; }
-		public int EffectValue62 { get ; private set ; }
-		public int EffectValue63 { get ; private set ; }
-		public int StateSkillLV { get ; private set ; }
-		public int LearnSkillReq { get ; private set ; }
-		public int LearnSkillLV { get ; private set ; }
-		public int LearnLVReq { get ; private set ; }
-		public int LearnSkillPointReq { get ; private set ; }
-		public int FightPower { get ; private set ; }
-		public int LVUpCostMoneyType { get ; private set ; }
-		public int LVUpCostMoney { get ; private set ; }
-		public int LVUpCostExp { get ; private set ; }
-		public int ClientActionLimit { get ; private set ; }
-		public int ClientSkillSeriesLimit { get ; private set ; }
-		public int SkillOfSeries { get ; private set ; }
-		public int ExpendMPRate { get ; private set ; }
-		public int ExAttr1 { get ; private set ; }
-		public int ExAttr3 { get ; private set ; }
-		public int ExAttr4 { get ; private set ; }
-		public int ExAttr5 { get ; private set ; }
-		public int WarnInfo { get ; private set ; }
-		public int CtrlActionID { get ; private set ; }
-		public int BuffEffectID { get ; private set ; }
-		public int EffectName { get ; private set ; }
-		public string IconName { get ; private set; } 
-		public string SkillNameIcon { get ; private set; } 
-		public string Description { get ; private set; } 
-		public string BuffDescription { get ; private set; } 
-		public string Skillsource { get ; private set; } 
-		public int Skillactmark { get ; private set ; }
-		public int BuffDisplay { get ; private set ; }
-
-		public override string getKey()
-        {
-            return SkillID.ToString();
-        }
-
-		public override void Parse() {
-			try
-            {
-                SkillID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
+	public partial class SkillConfig : ConfigBase {
+
+		public int SkillID;
+		public string SkillName;
+		public int SkillTypeID;
+		public int SkillLV;
+		public int SkillMaxLV;
+		public int UseType;
+		public int FuncType;
+		public int CastTime;
+		public int SkillType;
+		public int HurtType;
+		public int ContinueUse;
+		public int AtkType;
+		public int AtkRadius;
+		public int Tag;
+		public int AtkDist;
+		public int StiffTime;
+		public int CoolDownTime;
+		public int MP;
+		public int HP;
+		public int XP;
+		public int UseItemID;
+		public int UseItemCount;
+		public int Effect1;
+		public int EffectValue11;
+		public int EffectValue12;
+		public int EffectValue13;
+		public int Effect2;
+		public int EffectValue21;
+		public int EffectValue22;
+		public int EffectValue23;
+		public int Effect3;
+		public int EffectValue31;
+		public int EffectValue32;
+		public int EffectValue33;
+		public int Effect4;
+		public int EffectValue41;
+		public int EffectValue42;
+		public int EffectValue43;
+		public int Effect5;
+		public int EffectValue51;
+		public int EffectValue52;
+		public int EffectValue53;
+		public int Effect6;
+		public int EffectValue61;
+		public int EffectValue62;
+		public int EffectValue63;
+		public int StateSkillLV;
+		public int LearnSkillReq;
+		public int LearnSkillLV;
+		public int LearnLVReq;
+		public int LearnSkillPointReq;
+		public int FightPower;
+		public int LVUpCostMoneyType;
+		public int LVUpCostMoney;
+		public int LVUpCostExp;
+		public int ClientActionLimit;
+		public int ClientSkillSeriesLimit;
+		public int SkillOfSeries;
+		public int ExpendMPRate;
+		public int ExAttr1;
+		public int ExAttr3;
+		public int ExAttr4;
+		public int ExAttr5;
+		public int WarnInfo;
+		public int CtrlActionID;
+		public int BuffEffectID;
+		public int EffectName;
+		public string IconName;
+		public string SkillNameIcon;
+		public string Description;
+		public string BuffDescription;
+		public string Skillsource;
+		public int Skillactmark;
+		public int BuffDisplay;
+
+		public override string getKey()
+        {
+            return SkillID.ToString();
+        }
+
+		public override void Parse(string content) {
+			try
+            {
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out SkillID);
 			
-				SkillName = rawContents[1].Trim();
+				SkillName = contents[1];
 			
-				SkillTypeID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out SkillTypeID);
 			
-				SkillLV=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
+				int.TryParse(contents[3],out SkillLV);
 			
-				SkillMaxLV=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; 
+				int.TryParse(contents[4],out SkillMaxLV);
 			
-				UseType=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; 
+				int.TryParse(contents[5],out UseType);
 			
-				FuncType=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; 
+				int.TryParse(contents[6],out FuncType);
 			
-				CastTime=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; 
+				int.TryParse(contents[7],out CastTime);
 			
-				SkillType=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; 
+				int.TryParse(contents[8],out SkillType);
 			
-				HurtType=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; 
+				int.TryParse(contents[9],out HurtType);
 			
-				ContinueUse=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; 
+				int.TryParse(contents[10],out ContinueUse);
 			
-				AtkType=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; 
+				int.TryParse(contents[11],out AtkType);
 			
-				AtkRadius=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; 
+				int.TryParse(contents[12],out AtkRadius);
 			
-				Tag=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; 
+				int.TryParse(contents[13],out Tag);
 			
-				AtkDist=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; 
+				int.TryParse(contents[14],out AtkDist);
 			
-				StiffTime=IsNumeric(rawContents[15]) ? int.Parse(rawContents[15]):0; 
+				int.TryParse(contents[15],out StiffTime);
 			
-				CoolDownTime=IsNumeric(rawContents[16]) ? int.Parse(rawContents[16]):0; 
+				int.TryParse(contents[16],out CoolDownTime);
 			
-				MP=IsNumeric(rawContents[17]) ? int.Parse(rawContents[17]):0; 
+				int.TryParse(contents[17],out MP);
 			
-				HP=IsNumeric(rawContents[18]) ? int.Parse(rawContents[18]):0; 
+				int.TryParse(contents[18],out HP);
 			
-				XP=IsNumeric(rawContents[19]) ? int.Parse(rawContents[19]):0; 
+				int.TryParse(contents[19],out XP);
 			
-				UseItemID=IsNumeric(rawContents[20]) ? int.Parse(rawContents[20]):0; 
+				int.TryParse(contents[20],out UseItemID);
 			
-				UseItemCount=IsNumeric(rawContents[21]) ? int.Parse(rawContents[21]):0; 
+				int.TryParse(contents[21],out UseItemCount);
 			
-				Effect1=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0; 
+				int.TryParse(contents[22],out Effect1);
 			
-				EffectValue11=IsNumeric(rawContents[23]) ? int.Parse(rawContents[23]):0; 
+				int.TryParse(contents[23],out EffectValue11);
 			
-				EffectValue12=IsNumeric(rawContents[24]) ? int.Parse(rawContents[24]):0; 
+				int.TryParse(contents[24],out EffectValue12);
 			
-				EffectValue13=IsNumeric(rawContents[25]) ? int.Parse(rawContents[25]):0; 
+				int.TryParse(contents[25],out EffectValue13);
 			
-				Effect2=IsNumeric(rawContents[26]) ? int.Parse(rawContents[26]):0; 
+				int.TryParse(contents[26],out Effect2);
 			
-				EffectValue21=IsNumeric(rawContents[27]) ? int.Parse(rawContents[27]):0; 
+				int.TryParse(contents[27],out EffectValue21);
 			
-				EffectValue22=IsNumeric(rawContents[28]) ? int.Parse(rawContents[28]):0; 
+				int.TryParse(contents[28],out EffectValue22);
 			
-				EffectValue23=IsNumeric(rawContents[29]) ? int.Parse(rawContents[29]):0; 
+				int.TryParse(contents[29],out EffectValue23);
 			
-				Effect3=IsNumeric(rawContents[30]) ? int.Parse(rawContents[30]):0; 
+				int.TryParse(contents[30],out Effect3);
 			
-				EffectValue31=IsNumeric(rawContents[31]) ? int.Parse(rawContents[31]):0; 
+				int.TryParse(contents[31],out EffectValue31);
 			
-				EffectValue32=IsNumeric(rawContents[32]) ? int.Parse(rawContents[32]):0; 
+				int.TryParse(contents[32],out EffectValue32);
 			
-				EffectValue33=IsNumeric(rawContents[33]) ? int.Parse(rawContents[33]):0; 
+				int.TryParse(contents[33],out EffectValue33);
 			
-				Effect4=IsNumeric(rawContents[34]) ? int.Parse(rawContents[34]):0; 
+				int.TryParse(contents[34],out Effect4);
 			
-				EffectValue41=IsNumeric(rawContents[35]) ? int.Parse(rawContents[35]):0; 
+				int.TryParse(contents[35],out EffectValue41);
 			
-				EffectValue42=IsNumeric(rawContents[36]) ? int.Parse(rawContents[36]):0; 
+				int.TryParse(contents[36],out EffectValue42);
 			
-				EffectValue43=IsNumeric(rawContents[37]) ? int.Parse(rawContents[37]):0; 
+				int.TryParse(contents[37],out EffectValue43);
 			
-				Effect5=IsNumeric(rawContents[38]) ? int.Parse(rawContents[38]):0; 
+				int.TryParse(contents[38],out Effect5);
 			
-				EffectValue51=IsNumeric(rawContents[39]) ? int.Parse(rawContents[39]):0; 
+				int.TryParse(contents[39],out EffectValue51);
 			
-				EffectValue52=IsNumeric(rawContents[40]) ? int.Parse(rawContents[40]):0; 
+				int.TryParse(contents[40],out EffectValue52);
 			
-				EffectValue53=IsNumeric(rawContents[41]) ? int.Parse(rawContents[41]):0; 
+				int.TryParse(contents[41],out EffectValue53);
 			
-				Effect6=IsNumeric(rawContents[42]) ? int.Parse(rawContents[42]):0; 
+				int.TryParse(contents[42],out Effect6);
 			
-				EffectValue61=IsNumeric(rawContents[43]) ? int.Parse(rawContents[43]):0; 
+				int.TryParse(contents[43],out EffectValue61);
 			
-				EffectValue62=IsNumeric(rawContents[44]) ? int.Parse(rawContents[44]):0; 
+				int.TryParse(contents[44],out EffectValue62);
 			
-				EffectValue63=IsNumeric(rawContents[45]) ? int.Parse(rawContents[45]):0; 
+				int.TryParse(contents[45],out EffectValue63);
 			
-				StateSkillLV=IsNumeric(rawContents[46]) ? int.Parse(rawContents[46]):0; 
+				int.TryParse(contents[46],out StateSkillLV);
 			
-				LearnSkillReq=IsNumeric(rawContents[47]) ? int.Parse(rawContents[47]):0; 
+				int.TryParse(contents[47],out LearnSkillReq);
 			
-				LearnSkillLV=IsNumeric(rawContents[48]) ? int.Parse(rawContents[48]):0; 
+				int.TryParse(contents[48],out LearnSkillLV);
 			
-				LearnLVReq=IsNumeric(rawContents[49]) ? int.Parse(rawContents[49]):0; 
+				int.TryParse(contents[49],out LearnLVReq);
 			
-				LearnSkillPointReq=IsNumeric(rawContents[50]) ? int.Parse(rawContents[50]):0; 
+				int.TryParse(contents[50],out LearnSkillPointReq);
 			
-				FightPower=IsNumeric(rawContents[51]) ? int.Parse(rawContents[51]):0; 
+				int.TryParse(contents[51],out FightPower);
 			
-				LVUpCostMoneyType=IsNumeric(rawContents[52]) ? int.Parse(rawContents[52]):0; 
+				int.TryParse(contents[52],out LVUpCostMoneyType);
 			
-				LVUpCostMoney=IsNumeric(rawContents[53]) ? int.Parse(rawContents[53]):0; 
+				int.TryParse(contents[53],out LVUpCostMoney);
 			
-				LVUpCostExp=IsNumeric(rawContents[54]) ? int.Parse(rawContents[54]):0; 
+				int.TryParse(contents[54],out LVUpCostExp);
 			
-				ClientActionLimit=IsNumeric(rawContents[55]) ? int.Parse(rawContents[55]):0; 
+				int.TryParse(contents[55],out ClientActionLimit);
 			
-				ClientSkillSeriesLimit=IsNumeric(rawContents[56]) ? int.Parse(rawContents[56]):0; 
+				int.TryParse(contents[56],out ClientSkillSeriesLimit);
 			
-				SkillOfSeries=IsNumeric(rawContents[57]) ? int.Parse(rawContents[57]):0; 
+				int.TryParse(contents[57],out SkillOfSeries);
 			
-				ExpendMPRate=IsNumeric(rawContents[58]) ? int.Parse(rawContents[58]):0; 
+				int.TryParse(contents[58],out ExpendMPRate);
 			
-				ExAttr1=IsNumeric(rawContents[59]) ? int.Parse(rawContents[59]):0; 
+				int.TryParse(contents[59],out ExAttr1);
 			
-				ExAttr3=IsNumeric(rawContents[60]) ? int.Parse(rawContents[60]):0; 
+				int.TryParse(contents[60],out ExAttr3);
 			
-				ExAttr4=IsNumeric(rawContents[61]) ? int.Parse(rawContents[61]):0; 
+				int.TryParse(contents[61],out ExAttr4);
 			
-				ExAttr5=IsNumeric(rawContents[62]) ? int.Parse(rawContents[62]):0; 
+				int.TryParse(contents[62],out ExAttr5);
 			
-				WarnInfo=IsNumeric(rawContents[63]) ? int.Parse(rawContents[63]):0; 
+				int.TryParse(contents[63],out WarnInfo);
 			
-				CtrlActionID=IsNumeric(rawContents[64]) ? int.Parse(rawContents[64]):0; 
+				int.TryParse(contents[64],out CtrlActionID);
 			
-				BuffEffectID=IsNumeric(rawContents[65]) ? int.Parse(rawContents[65]):0; 
+				int.TryParse(contents[65],out BuffEffectID);
 			
-				EffectName=IsNumeric(rawContents[66]) ? int.Parse(rawContents[66]):0; 
+				int.TryParse(contents[66],out EffectName);
 			
-				IconName = rawContents[67].Trim();
+				IconName = contents[67];
 			
-				SkillNameIcon = rawContents[68].Trim();
+				SkillNameIcon = contents[68];
 			
-				Description = rawContents[69].Trim();
+				Description = contents[69];
 			
-				BuffDescription = rawContents[70].Trim();
+				BuffDescription = contents[70];
 			
-				Skillsource = rawContents[71].Trim();
+				Skillsource = contents[71];
 			
-				Skillactmark=IsNumeric(rawContents[72]) ? int.Parse(rawContents[72]):0; 
+				int.TryParse(contents[72],out Skillactmark);
 			
-				BuffDisplay=IsNumeric(rawContents[73]) ? int.Parse(rawContents[73]):0; 
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				int.TryParse(contents[73],out BuffDisplay);
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0