Ejemplo n.º 1
0
        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);
            });
        }
Ejemplo n.º 2
0
        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);
            });
        }