public override List<GroundSpawnStruct> GetGroundSpawns() { List<GroundSpawnStruct> GroundSpawns = new List<GroundSpawnStruct>(); List<byte[]> GroundSpawnPackets = GetPacketsOfType("OP_GroundSpawn", PacketDirection.ServerToClient); foreach (byte[] GroundSpawnPacket in GroundSpawnPackets) { GroundSpawnStruct GroundSpawn = new GroundSpawnStruct(); ByteStream Buffer = new ByteStream(GroundSpawnPacket); Buffer.SkipBytes(12); GroundSpawn.DropID = Buffer.ReadUInt32(); GroundSpawn.ZoneID = Buffer.ReadUInt16(); GroundSpawn.InstanceID = Buffer.ReadUInt16(); Buffer.SkipBytes(8); GroundSpawn.Heading = Buffer.ReadSingle(); Buffer.SkipBytes(12); GroundSpawn.z = Buffer.ReadSingle(); GroundSpawn.x = Buffer.ReadSingle(); GroundSpawn.y = Buffer.ReadSingle(); GroundSpawn.Name = Buffer.ReadFixedLengthString(16, false); Buffer.SkipBytes(20); GroundSpawn.ObjectType = Buffer.ReadUInt32(); GroundSpawns.Add(GroundSpawn); } return GroundSpawns; }
public override List<GroundSpawnStruct> GetGroundSpawns() { List<GroundSpawnStruct> GroundSpawns = new List<GroundSpawnStruct>(); List<byte[]> GroundSpawnPackets = GetPacketsOfType("OP_GroundSpawn", PacketDirection.ServerToClient); foreach (byte[] GroundSpawnPacket in GroundSpawnPackets) { GroundSpawnStruct GroundSpawn = new GroundSpawnStruct(); ByteStream Buffer = new ByteStream(GroundSpawnPacket); GroundSpawn.DropID = Buffer.ReadUInt32(); GroundSpawn.Name = Buffer.ReadString(false); GroundSpawn.ZoneID = Buffer.ReadUInt16(); GroundSpawn.InstanceID = Buffer.ReadUInt16(); Buffer.SkipBytes(8); // Two unknown uint32s GroundSpawn.Heading = Buffer.ReadSingle(); Buffer.SkipBytes(12); // First float is 255 to make some groundspawns appear, second 4 bytes unknown, last is a float GroundSpawn.y = Buffer.ReadSingle(); GroundSpawn.x = Buffer.ReadSingle(); GroundSpawn.z = Buffer.ReadSingle(); GroundSpawn.ObjectType = Buffer.ReadUInt32(); GroundSpawns.Add(GroundSpawn); } return GroundSpawns; }