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/MarketQueryConfig.cs | 84 +++++++++++++++++++++--------------------
1 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/Core/GameEngine/Model/Config/MarketQueryConfig.cs b/Core/GameEngine/Model/Config/MarketQueryConfig.cs
index 1b20a46..478f76b 100644
--- a/Core/GameEngine/Model/Config/MarketQueryConfig.cs
+++ b/Core/GameEngine/Model/Config/MarketQueryConfig.cs
@@ -1,46 +1,48 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Tuesday, November 13, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
- public partial class MarketQueryConfig : ConfigBase {
-
- public int queryType { get ; private set ; }
- public int[] ChooseType;
-
- public override string getKey()
- {
- return queryType.ToString();
- }
-
- public override void Parse() {
- try
- {
- queryType=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class MarketQueryConfig : ConfigBase {
+
+ public int queryType;
+ public int[] ChooseType;
+
+ public override string getKey()
+ {
+ return queryType.ToString();
+ }
+
+ public override void Parse(string content) {
+ try
+ {
+ var contents = content.Split('\t');
+
+ int.TryParse(contents[0],out queryType);
- string[] ChooseTypeStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ var ChooseTypeStringArray = contents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
ChooseType = new int[ChooseTypeStringArray.Length];
for (int i=0;i<ChooseTypeStringArray.Length;i++)
{
int.TryParse(ChooseTypeStringArray[i],out ChooseType[i]);
- }
- }
- catch (Exception ex)
- {
- DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ }
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0