public static void SendZoneStopped(byte zoneid) { using (var packet = new InterPacket(InterHeader.Zoneclosed)) { packet.Write(zoneid); foreach (var c in Program.Zones.Values) c.SendPacket(packet); } }
public static void SendZoneList(ZoneConnection zc) { using (var packet = new InterPacket(InterHeader.Zonelist)) { packet.Write(Program.Zones.Values.Count); foreach (var z in Program.Zones.Values) { packet.Write(z.ID); packet.Write(z.IP); packet.Write(z.Port); packet.WriteInt(z.Maps.Count); foreach (var m in z.Maps) { packet.WriteUShort(m.ID); packet.WriteStringLen(m.ShortName); packet.WriteStringLen(m.FullName); packet.WriteInt(m.RegenX); packet.WriteInt(m.RegenY); packet.WriteByte(m.Kingdom); packet.WriteUShort(m.ViewRange); } } zc.SendPacket(packet); } }