Exemple #1
0
 public void Deserialize(JSON_FriendPresentItemParam json, MasterParam master = null)
 {
     if (json == null)
     {
         throw new InvalidJSONException();
     }
     this.m_Id   = json.iname;
     this.m_Name = json.name;
     this.m_Expr = json.expr;
     if (!string.IsNullOrEmpty(json.item))
     {
         this.m_Item = MonoSingleton <GameManager> .Instance.GetItemParam(json.item);
     }
     this.m_Num  = json.num;
     this.m_Zeny = json.zeny;
     try
     {
         if (!string.IsNullOrEmpty(json.begin_at))
         {
             this.m_BeginAt = TimeManager.GetUnixSec(DateTime.Parse(json.begin_at));
         }
         if (!string.IsNullOrEmpty(json.end_at))
         {
             this.m_EndAt = TimeManager.GetUnixSec(DateTime.Parse(json.end_at));
         }
         if (!(this.m_Id == "FP_DEFAULT"))
         {
             return;
         }
         FriendPresentItemParam.DefaultParam = this;
     }
     catch (Exception ex)
     {
         DebugUtility.LogError(ex.ToString());
     }
 }
Exemple #2
0
 public void Deserialize(string language, JSON_FriendPresentItemParam json)
 {
     this.Deserialize(json);
     this.localizeFields(language);
 }