using System;

using FilterAPI.Networking;

using FilterZone.ZoneNetworking;

namespace FilterZone.ZoneHandlers
{
    internal class Zone4Handle
    {
        [ZonePacketHandler(4, 56)]
        public static void HandleUnk00(ZoneClient ClientSocket, Packet ServerPacket)
        {
            ClientSocket.SendPacketClient(ServerPacket);

            ServerPacket.PacketReader.ReadBytes(58);
            String sMap = ServerPacket.ReadString(12);
            Int32 X = ServerPacket.PacketReader.ReadInt32();
            Int32 Y = ServerPacket.PacketReader.ReadInt32();

            ClientSocket.sMap = sMap;
            ClientSocket.InstanceID = Program.SQL.GetsMapFromsID(ClientSocket.sID).Replace(ClientSocket.sMap, "");
            ClientSocket.X = X;
            ClientSocket.Y = Y;
        }

        [ZonePacketHandler(4, 198)]
        public static void HandleAdminLevel(ZoneClient ClientSocket, Packet ServerPacket)
        {
            if (Program.SQL.HasPermission(ClientSocket.nCharNo, "SendAdmin")) { ClientSocket.SendPacketClient(ServerPacket); }
        }
    }
}
