Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }