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

            writer.Write(HasSpawned);

            writer.Write(Spawn == null ? 0 : Spawn.Count);

            if (Spawn != null)
            {
                Spawn.ForEach(bc => writer.Write(bc));
            }

            Timer.DelayCall(TimeSpan.FromMinutes(1), CheckSpawn);
        }
Exemplo n.º 2
0
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write(1); // Version

            writer.Write(_Active);
            writer.Write(Level);
            writer.Write(Kills);

            if (Spawn != null)
            {
                writer.Write(Spawn.Count);
                Spawn.ForEach(sp => writer.Write(sp as Mobile));
            }
            else
            {
                writer.Write(0);
            }
        }
Exemplo n.º 3
0
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write(0);

            writer.Write(Trees == null ? 0 : Trees.Count);
            if (Trees != null)
            {
                Trees.ForEach(t => writer.Write(t));
            }

            writer.Write(Spawn == null ? 0 : Spawn.Count);
            if (Spawn != null)
            {
                Spawn.ForEach(s => writer.Write(s));
            }

            writer.Write(Bones);
        }