Esempio n. 1
0
 public static void SendPing(ZoneClient character)
 {
     using (var packet = new Packet(SH2Type.Ping))
     {
         character.SendPacket(packet);
     }
 }
Esempio n. 2
0
 public static void SendError(ZoneClient client, ServerError error)
 {
     using (Packet pack = new Packet(SH3Type.Error))
     {
         pack.WriteShort((byte)error);
         client.SendPacket(pack);
     }
 }
Esempio n. 3
0
        public static void UseSPStoneHandler(ZoneClient client, Packet packet)
        {
            if (client.Character.StonesSP == 0)
            {
                using (var p = new Packet(SH20Type.ErrorUseStone))
                {
                    client.SendPacket(p);
                }
            }
            else
            {
                client.Character.HealSP((uint)client.Character.BaseStats.SoulSP);

                using (var p = new Packet(SH20Type.StartSPStoneCooldown))
                {
                    client.SendPacket(p);
                }
            }
        }
Esempio n. 4
0
 public static void SendStatsUpdate(MapObject pObject, ZoneClient to, bool selectedby)
 {
     using (var packet = new Packet(SH9Type.StatUpdate))
     {
         packet.WriteBool(selectedby);
         packet.WriteUShort(pObject.MapObjectID);
         if (pObject is ZoneCharacter)
         {
             ((ZoneCharacter)pObject).WriteUpdateStats(packet);
         }
         else
         {
             ((Mob)pObject).WriteUpdateStats(packet);
         }
         to.SendPacket(packet);
     }
 }
Esempio n. 5
0
 public static void SendUsablePoints(ZoneClient client)
 {
     using (var packet = new Packet(SH4Type.CharacterPoints))
     {
         packet.WriteByte(client.Character.character.UsablePoints);
         client.SendPacket(packet);
     }
 }
Esempio n. 6
0
 public static void SendSetUsablePoint(ZoneClient client, byte stat)
 {
     using (var packet = new Packet(SH4Type.SetPointOnStat))
     {
         packet.WriteByte(stat); // amount
         client.SendPacket(packet);
     }
 }
Esempio n. 7
0
 public static void SendReviveWindow(ZoneClient client, byte minutesTillExpire)
 {
     using (var packet = new Packet(SH4Type.ReviveWindow))
     {
         packet.WriteByte(minutesTillExpire); // It's not a short, the byte after it is buffershit
         client.SendPacket(packet);
     }
 }
Esempio n. 8
0
 public static void SendRevive(ZoneClient client, ushort mapid, int x, int y)
 {
     using (var packet = new Packet(SH4Type.Revive))
     {
         packet.WriteUShort(mapid);
         packet.WriteInt(x);
         packet.WriteInt(y);
         client.SendPacket(packet);
     }
 }
Esempio n. 9
0
 public static void SendConnectError(ZoneClient client, ConnectErrors error)
 {
     using (var packet = new Packet(SH4Type.ConnectError))
     {
         packet.WriteUShort((ushort)error);
         client.SendPacket(packet);
     }
 }
Esempio n. 10
0
 public static void SendNPCInteraction(ZoneClient client, ushort ID)
 {
     using (var packet = new Packet(SH8Type.Interaction))
     {
         packet.WriteUShort(ID);
         client.SendPacket(packet);
     }
 }
Esempio n. 11
0
 public static void SendEndRestResponse(ZoneClient client)
 {
     using (var packet = new Packet(SH8Type.EndRest))
     {
         packet.WriteUShort(0x0a81);
         client.SendPacket(packet);
     }
 }
Esempio n. 12
0
 public static void SendBeginRestResponse(ZoneClient client, ushort value)
 {
     /*  0x0A81 - OK to rest
            0x0A82 - Can't rest on mount
            0x0A83 - Too close to NPC*/
     using (var packet = new Packet(SH8Type.BeginRest))
     {
         packet.WriteUShort(value);
         client.SendPacket(packet);
     }
 }
Esempio n. 13
0
 public static void SendAdminNotice(ZoneClient client, string text)
 {
     using (var packet = new Packet(SH8Type.GmNotice))
     {
         packet.WriteByte((byte)text.Length);
         packet.WriteString(text, text.Length);
         client.SendPacket(packet);
     }
 }