Example #1
0
        /// <summary>
        /// Reads the block data from the underlying stream.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            SpawnName = reader.ReadByteString();
            int normalCount = reader.ReadInt32();

            for (int i = 0; i < normalCount; i++)
            {
                MonsterSpawnPoint spawn = new MonsterSpawnPoint();
                spawn.Name    = reader.ReadByteString();
                spawn.Monster = reader.ReadInt32();
                spawn.Count   = reader.ReadInt32();

                NormalSpawnPoints.Add(spawn);
            }

            int tacticalCount = reader.ReadInt32();

            for (int i = 0; i < tacticalCount; i++)
            {
                MonsterSpawnPoint spawn = new MonsterSpawnPoint();
                spawn.Name    = reader.ReadByteString();
                spawn.Monster = reader.ReadInt32();
                spawn.Count   = reader.ReadInt32();

                TacticalSpawnPoints.Add(spawn);
            }

            Interval         = reader.ReadInt32();
            Limit            = reader.ReadInt32();
            Range            = reader.ReadInt32();
            TacticalVariable = reader.ReadInt32();
        }
Example #2
0
        /// <summary>
        /// Reads the block data from the underlying stream.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            SpawnName = reader.ReadByteString();
            int normalCount = reader.ReadInt32();

            for (int i = 0; i < normalCount; i++) {
                MonsterSpawnPoint spawn = new MonsterSpawnPoint();
                spawn.Name = reader.ReadByteString();
                spawn.Monster = reader.ReadInt32();
                spawn.Count = reader.ReadInt32();

                NormalSpawnPoints.Add(spawn);
            }

            int tacticalCount = reader.ReadInt32();

            for (int i = 0; i < tacticalCount; i++) {
                MonsterSpawnPoint spawn = new MonsterSpawnPoint();
                spawn.Name = reader.ReadByteString();
                spawn.Monster = reader.ReadInt32();
                spawn.Count = reader.ReadInt32();

                TacticalSpawnPoints.Add(spawn);
            }

            Interval = reader.ReadInt32();
            Limit = reader.ReadInt32();
            Range = reader.ReadInt32();
            TacticalVariable = reader.ReadInt32();
        }