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/CrossServerArenaConfig.cs | 102 ++++++++++++++++++++++++++-------------------------
1 files changed, 52 insertions(+), 50 deletions(-)
diff --git a/Core/GameEngine/Model/Config/CrossServerArenaConfig.cs b/Core/GameEngine/Model/Config/CrossServerArenaConfig.cs
index fc681ce..b365410 100644
--- a/Core/GameEngine/Model/Config/CrossServerArenaConfig.cs
+++ b/Core/GameEngine/Model/Config/CrossServerArenaConfig.cs
@@ -1,56 +1,58 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Thursday, December 27, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
- public partial class CrossServerArenaConfig : ConfigBase {
-
- public int DanLV { get ; private set ; }
- public string Name { get ; private set; }
- public int DanType { get ; private set ; }
- public string IconKey { get ; private set; }
- public int LVUpScore { get ; private set ; }
- public string DanLVAwardList { get ; private set; }
- public string SeasonAwardList { get ; private set; }
-
- public override string getKey()
- {
- return DanLV.ToString();
- }
-
- public override void Parse() {
- try
- {
- DanLV=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class CrossServerArenaConfig : ConfigBase {
+
+ public int DanLV;
+ public string Name;
+ public int DanType;
+ public string IconKey;
+ public int LVUpScore;
+ public string DanLVAwardList;
+ public string SeasonAwardList;
+
+ public override string getKey()
+ {
+ return DanLV.ToString();
+ }
+
+ public override void Parse(string content) {
+ try
+ {
+ var contents = content.Split('\t');
+
+ int.TryParse(contents[0],out DanLV);
- Name = rawContents[1].Trim();
+ Name = contents[1];
- DanType=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+ int.TryParse(contents[2],out DanType);
- IconKey = rawContents[3].Trim();
+ IconKey = contents[3];
- LVUpScore=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
+ int.TryParse(contents[4],out LVUpScore);
- DanLVAwardList = rawContents[5].Trim();
+ DanLVAwardList = contents[5];
- SeasonAwardList = rawContents[6].Trim();
- }
- catch (Exception ex)
- {
- DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ SeasonAwardList = contents[6];
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0