public override void Load(SerializationReader Reader) { this.village = HistoricEntity.Load(Reader, XRLCore.Core.Game.sultanHistory).GetCurrentSnapshot(); this.amount = Reader.ReadSingle(); this.faction = Factions.get(Reader.ReadString()); int countTales = Reader.ReadInt32(); this.historytales = new List <JournalVillageNote>(); List <JournalVillageNote> allnotes = JournalAPI.GetNotesForVillage(village.entity.id); for (int i = 0; i < countTales; i++) { string thissecretid = Reader.ReadString(); JournalVillageNote note = allnotes.FirstOrDefault(c => c.secretid == thissecretid); if (note != null) { this.historytales.Add(note); } } int counttales = Reader.ReadInt32(); this.tales = new List <string>(); for (int i = 0; i < counttales; i++) { this.tales.Add(Reader.ReadString()); } }
public override void Load(SerializationReader Reader) { this.faveSultan = HistoricEntity.Load(Reader, XRLCore.Core.Game.sultanHistory); this.amount = Reader.ReadSingle(); int countTales = Reader.ReadInt32(); this.tales = new List <HistoricEvent>(); for (int i = 0; i < countTales; i++) { this.tales.Add(HistoricEvent.Load(Reader)); } int countmytales = Reader.ReadInt32(); this.mytales = new List <string>(); for (int i = 0; i < countmytales; i++) { this.mytales.Add(Reader.ReadString()); } }