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/AlchemySpecConfig.cs | 38 ++++++++++++++++++++------------------
1 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/Core/GameEngine/Model/Config/AlchemySpecConfig.cs b/Core/GameEngine/Model/Config/AlchemySpecConfig.cs
index 2c44f68..9701d00 100644
--- a/Core/GameEngine/Model/Config/AlchemySpecConfig.cs
+++ b/Core/GameEngine/Model/Config/AlchemySpecConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, April 19, 2018
+// [ Date ]: Tuesday, February 12, 2019
//--------------------------------------------------------
using UnityEngine;
@@ -11,38 +11,40 @@
public partial class AlchemySpecConfig : ConfigBase {
- public int ID { get ; private set ; }
- public int SpecialMaterialD { get ; private set ; }
- public int SpecialMateriaNUM { get ; private set ; }
- public int AlchemyEXP { get ; private set ; }
- public string AlchemyItem { get ; private set; }
- public string AlchemPreviewItem { get ; private set; }
- public int BlastFurnaceLV { get ; private set ; }
- public string Introduce { get ; private set; }
+ public int ID;
+ public int SpecialMaterialD;
+ public int SpecialMateriaNUM;
+ public int AlchemyEXP;
+ public string AlchemyItem;
+ public string AlchemPreviewItem;
+ public int BlastFurnaceLV;
+ public string Introduce;
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);
- SpecialMaterialD=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+ int.TryParse(contents[1],out SpecialMaterialD);
- SpecialMateriaNUM=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+ int.TryParse(contents[2],out SpecialMateriaNUM);
- AlchemyEXP=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+ int.TryParse(contents[3],out AlchemyEXP);
- AlchemyItem = rawContents[4].Trim();
+ AlchemyItem = contents[4];
- AlchemPreviewItem = rawContents[5].Trim();
+ AlchemPreviewItem = contents[5];
- BlastFurnaceLV=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0;
+ int.TryParse(contents[6],out BlastFurnaceLV);
- Introduce = rawContents[7].Trim();
+ Introduce = contents[7];
}
catch (Exception ex)
{
--
Gitblit v1.8.0