少年修仙传客户端代码仓库
client_linchunjie
2019-01-28 316392fc7db70f82c5da0badee782a03e73c5d50
Core/GameEngine/Model/Config/RedPackConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:         第二世界
//    [  Date ]:         Saturday, July 28, 2018
//    [  Date ]:         Monday, January 28, 2019
//--------------------------------------------------------
using UnityEngine;
@@ -9,8 +9,8 @@
namespace TableConfig {
    
   public partial class RedPackConfig : ConfigBase {
   public partial class RedPackConfig : ConfigBase {
      public int id { get ; private set ; }
      public int RedEnvelopeType { get ; private set ; }
      public int RedEnvelopeAmount { get ; private set ; }
@@ -18,15 +18,17 @@
      public int PacketCnt { get ; private set ; }
      public int LeaderOwn { get ; private set ; }
      public string content { get ; private set; } 
      public string PacketOpenTime { get ; private set; }
      public int ValidMinutes { get ; private set ; }
      public override string getKey()
        {
            return id.ToString();
      public override string getKey()
        {
            return id.ToString();
        }
      public override void Parse() {
         try
            {
         try
            {
                id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
         
            RedEnvelopeType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
@@ -40,10 +42,14 @@
            LeaderOwn=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; 
         
            content = rawContents[6].Trim();
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            PacketOpenTime = rawContents[7].Trim();
            ValidMinutes=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0;
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
      }