Example #1
0
 public void Deserialize(JSON_TowerFloorParam json)
 {
     if (json == null)
     {
         throw new InvalidJSONException();
     }
     this.iname           = json.iname;
     this.title           = json.title;
     this.name            = json.name;
     this.expr            = json.expr;
     this.cond            = json.cond;
     this.tower_id        = json.tower_id;
     this.cond_quest      = json.cond_quest;
     this.hp_recover_rate = json.hp_recover_rate;
     this.pt            = (short)json.pt;
     this.lv            = json.lv;
     this.joblv         = json.joblv;
     this.can_help      = (int)json.can_help == 1;
     this.rdy_cnd       = json.rdy_cnd;
     this.reward_id     = json.reward_id;
     this.floor         = json.floor;
     this.is_unit_chg   = json.is_unit_chg;
     this.me_id         = json.me_id;
     this.is_wth_no_chg = json.is_wth_no_chg;
     this.wth_set_id    = json.wth_set_id;
     if (json.rand_tag != null)
     {
         this.rand_tag = new byte[json.rand_tag.Length];
         for (int index = 0; index < json.rand_tag.Length; ++index)
         {
             this.rand_tag[index] = (byte)json.rand_tag[index];
         }
     }
     this.naut = json.naut;
     this.map.Clear();
     if (json.map != null)
     {
         for (int index = 0; index < json.map.Length; ++index)
         {
             MapParam mapParam = new MapParam();
             mapParam.Deserialize(json.map[index]);
             this.map.Add(mapParam);
         }
     }
     this.BaseQuest = MonoSingleton <GameManager> .Instance.FindBaseQuest(QuestTypes.Tower, this.tower_id);
 }
Example #2
0
 public void Deserialize(string language, JSON_TowerFloorParam json)
 {
     this.Deserialize(json);
     this.localizeFields(language);
 }