public static void OnSave(WorldSaveEventArgs e) { Persistence.Serialize( FilePath, writer => { writer.Write(0); writer.Write(QuestData.Count); foreach (var kvp in QuestData) { writer.Write(kvp.Key); QuestWriter.Quests(writer, kvp.Value); } writer.Write(ChainData.Count); foreach (var kvp in ChainData) { writer.Write(kvp.Key); QuestWriter.Chains(writer, kvp.Value); } TierQuestInfo.Save(writer); }); }
public static void OnSave(WorldSaveEventArgs e) { Persistence.Serialize( FilePath, writer => { writer.Write(0); writer.Write(QuestData.Count); foreach (KeyValuePair <PlayerMobile, List <BaseQuest> > kvp in QuestData) { writer.Write(kvp.Key); QuestWriter.Quests(writer, kvp.Value); } writer.Write(ChainData.Count); foreach (KeyValuePair <PlayerMobile, Dictionary <QuestChain, BaseChain> > kvp in ChainData) { writer.Write(kvp.Key); QuestWriter.Chains(writer, kvp.Value); } TierQuestInfo.Save(writer); }); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.WriteEncodedInt(0); // version QuestWriter.Type(writer, m_Quest); }