public bool Deserialize(JSON_JobParam json) { if (json == null) { return(false); } this.iname = json.iname; this.name = json.name; this.expr = json.expr; this.model = json.mdl; this.ac2d = json.ac2d; this.modelp = json.mdlp; this.pet = json.pet; this.buki = json.buki; this.origin = json.origin; this.type = (JobTypes)json.type; this.role = (RoleTypes)json.role; this.wepmdl = json.wepmdl; this.mov = (OInt)json.jmov; this.jmp = (OInt)json.jjmp; this.atkskill[0] = string.IsNullOrEmpty(json.atkskl) ? string.Empty : json.atkskl; this.atkskill[1] = string.IsNullOrEmpty(json.atkfi) ? string.Empty : json.atkfi; this.atkskill[2] = string.IsNullOrEmpty(json.atkwa) ? string.Empty : json.atkwa; this.atkskill[3] = string.IsNullOrEmpty(json.atkwi) ? string.Empty : json.atkwi; this.atkskill[4] = string.IsNullOrEmpty(json.atkth) ? string.Empty : json.atkth; this.atkskill[5] = string.IsNullOrEmpty(json.atksh) ? string.Empty : json.atksh; this.atkskill[6] = string.IsNullOrEmpty(json.atkda) ? string.Empty : json.atkda; this.fixed_ability = json.fixabl; this.artifact = json.artifact; this.ai = json.ai; this.master = json.master; this.MapEffectAbility = json.me_abl; this.IsMapEffectRevReso = json.is_me_rr != 0; this.DescCharacteristic = json.desc_ch; this.DescOther = json.desc_ot; Array.Clear((Array)this.ranks, 0, this.ranks.Length); if (json.ranks != null) { for (int index = 0; index < json.ranks.Length; ++index) { this.ranks[index] = new JobRankParam(); if (!this.ranks[index].Deserialize(json.ranks[index])) { return(false); } } } return(true); }
public void Deserialize(string language, JSON_JobParam json) { this.Deserialize(json); this.localizeFields(language); }