Example #1
0
        public void Save(Stream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            using (var writer = new BioQuestMapWriter(stream))
            {
                // Quests
                writer.Write(Quests.Count);

                foreach (var quest in Quests)
                {
                    writer.Write(quest.Key);
                    writer.Write(quest.Value);
                }

                //
                writer.Write(BoolTaskEvals.Count);

                foreach (var taskEval in BoolTaskEvals)
                {
                    writer.Write(taskEval.Key);
                    writer.Write(taskEval.Value);
                }

                //
                writer.Write(IntTaskEvals.Count);

                foreach (var taskEval in IntTaskEvals)
                {
                    writer.Write(taskEval.Key);
                    writer.Write(taskEval.Value);
                }

                //
                writer.Write(FloatTaskEvals.Count);

                foreach (var taskEval in FloatTaskEvals)
                {
                    writer.Write(taskEval.Key);
                    writer.Write(taskEval.Value);
                }
            }
        }
		public void Save(Stream stream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException(nameof(stream));
			}

			using (var writer = new BioQuestMapWriter(stream))
			{
				// Quests
				writer.Write(Quests.Count);

				foreach (var quest in Quests)
				{
					writer.Write(quest.Key);
					writer.Write(quest.Value);
				}

				//
				writer.Write(BoolTaskEvals.Count);

				foreach (var taskEval in BoolTaskEvals)
				{
					writer.Write(taskEval.Key);
					writer.Write(taskEval.Value);
				}

				//
				writer.Write(IntTaskEvals.Count);

				foreach (var taskEval in IntTaskEvals)
				{
					writer.Write(taskEval.Key);
					writer.Write(taskEval.Value);
				}

				//
				writer.Write(FloatTaskEvals.Count);

				foreach (var taskEval in FloatTaskEvals)
				{
					writer.Write(taskEval.Key);
					writer.Write(taskEval.Value);
				}
			}
		}