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

namespace FiestaBot.Zone.Handlers
{
    internal class Zone06Handler
    {
        [ZonePacketHandler(6, 2)]
        public static void CharacterDetailedInfo(ZoneClient Socket, Packet Packet)
        {
            //TODO: Detailed info
            Packet.Dispose();

            ZonePacket.SendIngame(Socket);

            Console.Title = string.Format("FiestaBot v0.54 - Logged in as {0} - Lvl: {1} - Adminlevel: {2} - Class: {3}", Socket.Manager.Character.Name, Socket.Manager.Character.Level, Socket.Manager.Character.AdminLevel, Socket.Manager.Character.Class);
            Program.TitleTimer.Start();
        }

        [ZonePacketHandler(6, 4)]
        public static void ZoneError(ZoneClient Socket, Packet Packet)
        {
            Packet.ReadShort(out short Error);
            Packet.Dispose();

            Logger.Log(LogType.Zone, "A zone error occurred: {0}", (ConnectError)Error);
        }
    }
}
