using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FiestaBot.Instances.Networking;
using FiestaBot.Zone.ClientPacket;
using FiestaBot.Zone.Networking;

namespace FiestaBot.Zone.Handlers
{
    internal class Zone02Handler
    {
        [ZonePacketHandler(2, 4)]
        public static void Ping(ZoneClient Socket, Packet Packet)
        {
            Packet.Dispose();

            Packet p = new Packet(2, 5);
            Socket.SendPacket(p);
        }

        [ZonePacketHandler(2, 7)]
        public static void ReceiveXor(ZoneClient Socket, Packet Packet)
        {
            Packet.ReadShort(out short Xor);

            Socket.Crypto = new FiestaCrypto(Xor);
            Packet.Dispose();

            ZonePacket.SendSHNHashes(Socket);
        }
    }
}
