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/NewAllPeoplePartyConfig.cs | 102 ++++++++++++++++++++++++++-------------------------
1 files changed, 52 insertions(+), 50 deletions(-)
diff --git a/Core/GameEngine/Model/Config/NewAllPeoplePartyConfig.cs b/Core/GameEngine/Model/Config/NewAllPeoplePartyConfig.cs
index 3076c15..e891aba 100644
--- a/Core/GameEngine/Model/Config/NewAllPeoplePartyConfig.cs
+++ b/Core/GameEngine/Model/Config/NewAllPeoplePartyConfig.cs
@@ -1,56 +1,58 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Monday, January 28, 2019
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
- public partial class NewAllPeoplePartyConfig : ConfigBase {
-
- public int ID { get ; private set ; }
- public int TotalTimes { get ; private set ; }
- public int AddPoint { get ; private set ; }
- public string TaskDes { get ; private set; }
- public int FuncID { get ; private set ; }
- public int JumpId { get ; private set ; }
- public string IconKey { 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 NewAllPeoplePartyConfig : ConfigBase {
+
+ public int ID;
+ public int TotalTimes;
+ public int AddPoint;
+ public string TaskDes;
+ public int FuncID;
+ public int JumpId;
+ public string IconKey;
+
+ 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);
- TotalTimes=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+ int.TryParse(contents[1],out TotalTimes);
- AddPoint=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+ int.TryParse(contents[2],out AddPoint);
- TaskDes = rawContents[3].Trim();
+ TaskDes = contents[3];
- FuncID=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
+ int.TryParse(contents[4],out FuncID);
- JumpId=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0;
+ int.TryParse(contents[5],out JumpId);
- IconKey = rawContents[6].Trim();
- }
- catch (Exception ex)
- {
- DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ IconKey = contents[6];
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0