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/EquipWashSpecConfig.cs | 76 +++++++++++++++++++------------------
1 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/Core/GameEngine/Model/Config/EquipWashSpecConfig.cs b/Core/GameEngine/Model/Config/EquipWashSpecConfig.cs
index 73743d0..c7f6ba1 100644
--- a/Core/GameEngine/Model/Config/EquipWashSpecConfig.cs
+++ b/Core/GameEngine/Model/Config/EquipWashSpecConfig.cs
@@ -1,53 +1,55 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, June 14, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
public partial class EquipWashSpecConfig : ConfigBase {
- public int id { get ; private set ; }
- public int typeNeed { get ; private set ; }
- public int levelNeed { get ; private set ; }
- public string attByLevel { get ; private set; }
- public string attByLevelValue { get ; private set; }
- public int MasterLV { get ; private set ; }
-
+ public int id;
+ public int typeNeed;
+ public int levelNeed;
+ public string attByLevel;
+ public string attByLevelValue;
+ public int MasterLV;
+
public override string getKey()
{
return id.ToString();
- }
-
- public override void Parse() {
+ }
+
+ public override void Parse(string content) {
try
{
- id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+ var contents = content.Split('\t');
+
+ int.TryParse(contents[0],out id);
- typeNeed=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+ int.TryParse(contents[1],out typeNeed);
- levelNeed=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+ int.TryParse(contents[2],out levelNeed);
- attByLevel = rawContents[3].Trim();
+ attByLevel = contents[3];
- attByLevelValue = rawContents[4].Trim();
+ attByLevelValue = contents[4];
- MasterLV=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0;
+ int.TryParse(contents[5],out MasterLV);
}
catch (Exception ex)
{
DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ }
+ }
+
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0