少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-12 1aeb815836d84ecfddf761a47862efebbba0ad03
Core/GameEngine/Model/Config/PetClassCostConfig.cs
@@ -1,53 +1,55 @@
//--------------------------------------------------------
//    [Author]:         第二世界
//    [  Date ]:         Friday, January 04, 2019
//--------------------------------------------------------
using UnityEngine;
using System;
namespace TableConfig {
   public partial class PetClassCostConfig : ConfigBase {
      public int ID { get ; private set ; }
      public int PetID { get ; private set ; }
      public int Rank { get ; private set ; }
      public int UpNeedExp { get ; private set ; }
      public int AtkAdd { get ; private set ; }
      public int NeedExpTotal { 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 PetClassCostConfig : ConfigBase {
      public int ID;
      public int PetID;
      public int Rank;
      public int UpNeedExp;
      public int AtkAdd;
      public int NeedExpTotal;
      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);
         
            PetID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
            int.TryParse(contents[1],out PetID);
         
            Rank=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
            int.TryParse(contents[2],out Rank);
         
            UpNeedExp=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
            int.TryParse(contents[3],out UpNeedExp);
         
            AtkAdd=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
            int.TryParse(contents[4],out AtkAdd);
         
            NeedExpTotal=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0;
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
      }
   }
}
            int.TryParse(contents[5],out NeedExpTotal);
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
      }
   }
}