public static void SendBattlefieldList(Character chr, GlobalBattlegroundQueue queue) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_BATTLEFIELD_LIST)) { bool flag = true; packet.Write(0L); packet.Write(flag); packet.Write((uint)queue.Template.Id); packet.Write((byte)queue.BracketId); packet.Write((byte)0); long position = packet.Position; packet.Position += 4L; int num = 0; for (int index = 0; index < queue.Instances.Count; ++index) { Battleground instance = queue.Instances[index]; if (chr.Role.IsStaff || instance.CanEnter(chr)) { packet.Write(instance.InstanceId); ++num; } } packet.Position = position; packet.Write(num); chr.Send(packet, false); } }