using PSO2SERVER.Models;
using PSO2SERVER.Object;
using PSO2SERVER.Protocol.Packets;
using PSO2SERVER.Zone;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PSO2SERVER.Protocol.Handlers
{
    [PacketHandlerAttr(0x03, 0x39)]
    public class TeleportLobbyToBridge : PacketHandler
    {
        /// (0x03, 0x39) Move Lobby -> Bridge.
        public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
        {
            if (context._account == null)
                return;

            // Dunno what these are yet.
            context.SendPacket(0x11, 0x0A, 0x0, BitConverter.GetBytes(context._account.AccountId));
            context.SendPacket(new Unk1E0CPacket(101));

            Map bridgeMap = ZoneManager.Instance.MapFromInstance("bridge", "lobby");
            bridgeMap.SpawnClient(context, bridgeMap.GetDefaultLocation());

        }
    }
}
