Ejemplo n.º 1
0
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write(3);

            writer.Write(Enabled);

            writer.Write(ExemptCities.Count);
            ExemptCities.ForEach(c => writer.Write((int)c));

            writer.Write(HasGenerated);
            Battle.Serialize(writer);

            writer.Write(VvVItems.Count);
            foreach (Item item in VvVItems)
            {
                writer.Write(item);
            }

            writer.Write(GuildStats.Count);
            foreach (KeyValuePair <Guild, VvVGuildStats> kvp in GuildStats)
            {
                writer.Write(kvp.Key);
                kvp.Value.Serialize(writer);
            }
        }
Ejemplo n.º 2
0
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write(4);

            writer.Write(ShowNewRules == null ? 0 : ShowNewRules.Count);
            if (ShowNewRules != null)
            {
                foreach (var pm in ShowNewRules)
                {
                    writer.Write(pm);
                }
            }

            writer.Write(EnhancedRules);
            writer.Write(Enabled);

            writer.Write(ExemptCities.Count);
            ExemptCities.ForEach(c => writer.Write((int)c));

            writer.Write(HasGenerated);
            Battle.Serialize(writer);

            writer.Write(VvVItems.Count);
            foreach (Item item in VvVItems)
            {
                writer.Write(item);
            }

            writer.Write(GuildStats.Count);
            foreach (KeyValuePair <Guild, VvVGuildStats> kvp in GuildStats)
            {
                writer.Write(kvp.Key);
                kvp.Value.Serialize(writer);
            }
        }