public void Deserialize(Json_Support json) { this.FUID = json.fuid; this.PlayerName = json.name; this.PlayerLevel = json.lv; this.Cost = json.cost; if (json.unit != null) { Json_Unit unit = json.unit; this.UnitID = unit.iname; this.UnitLevel = unit.lv; this.UnitRarity = unit.rare; if (unit.select != null) { this.JobID = (string)null; for (int index = 0; index < unit.jobs.Length; ++index) { if (unit.jobs[index].iid == unit.select.job) { this.JobID = unit.jobs[index].iname; break; } } } this.LeaderSkillLevel = UnitParam.GetLeaderSkillLevel(this.UnitRarity, unit.plus); UnitData unitData = new UnitData(); unitData.Deserialize(unit); this.Unit = unitData; } this.mIsFriend = json.isFriend; }
private SupportData LoadHelpUnit(Json_Support json) { if (json == null) { return((SupportData)null); } SupportData supportData = new SupportData(); supportData.Deserialize(json); return(supportData); }