using Plus.HabboHotel.GameClients;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plus.Communication.Packets.Outgoing.Help.Helpers;
using Plus.HabboHotel.Helpers;

namespace Plus.Communication.Packets.Incoming.Help.Helpers
{
    class HandleHelperToolEvent : IPacketEvent
    {
        public void Parse(GameClient Session, ClientPacket Packet)
        {
            if (Session.GetHabbo().Rank > Convert.ToInt32(PlusEnvironment.GetConfig().data["rank.helpeur"]))
            {
                bool onDuty = Packet.PopBoolean();
                bool isGuide = Packet.PopBoolean();
                bool isHelper = Packet.PopBoolean();
                bool isGuardian = Packet.PopBoolean();

                if (onDuty)
                    HelperToolsManager.AddHelper(Session, isHelper, isGuardian, isGuide);
                else
                    HelperToolsManager.RemoveHelper(Session);

                Session.SendMessage(new HandleHelperToolComposer(onDuty));
            }
            else
            {
                Session.SendNotification("Tu n'as pas le rank mini pour accédés a la guide tools");
            }
        }
    }
}
