using System;

namespace FilterAPI
{
    //public enum Classes : Byte
    //{
    //    Fighter = 1,
    //    CleverFighter = 2,
    //    Warrior = 3,
    //    Gladiator = 4,
    //    Knight = 5,
    //    Cleric = 6,
    //    HighCleric = 7,
    //    Paladin = 8,
    //    HolyKnight = 9,
    //    Guardian = 10,
    //    Archer = 11,
    //    HawkArcher = 12,
    //    Scout = 13,
    //    SharpShooter = 14, 
    //    Ranger = 15,
    //    Mage = 16,
    //    WizMage = 17,
    //    Enchanter = 18,
    //    Warlock = 19,
    //    Wizard = 20,
    //    Trickster = 21,
    //    Gambit = 22,
    //    Renegade = 23,
    //    Spectre = 24,
    //    Reaper = 25
    //}

    public class Classes
    {
        public static Byte ConvertToClassID(Int32 DemandClass, out Boolean IsMultiClass)
        {
            switch (DemandClass)
            {
                case 62:
                    {
                        //Fighter

                        IsMultiClass = false;

                        return 1;
                    }
                case 60:
                    {
                        //CleverFighter

                        IsMultiClass = false;

                        return 2;
                    }
                case 56:
                    {
                        //Warrior

                        IsMultiClass = false;

                        return 3;
                    }
                case 16:
                    {
                        //Gladiator

                        IsMultiClass = false;

                        return 4;
                    }
                case 48:
                    {
                        //Gladiator & Knight

                        IsMultiClass = true;

                        return 4;
                    }
                case 32:
                    {
                        //Knight

                        IsMultiClass = false;

                        return 5;
                    }
                case 1984:
                    {
                        //Cleric

                        IsMultiClass = false;

                        return 6;
                    }
                case 1920:
                    {
                        //HighCleric

                        IsMultiClass = false;

                        return 7;
                    }
                case 1792:
                    {
                        //Paladin

                        IsMultiClass = false;

                        return 8;
                    }
                case 512:
                    {
                        //HolyKnight

                        IsMultiClass = false;

                        return 9;
                    }
                case 1536:
                    {
                        //HolyKnight & Guardian

                        IsMultiClass = true;

                        return 9;
                    }
                case 1024:
                    {
                        //Guardian

                        IsMultiClass = false;

                        return 10;
                    }
                case 63488:
                    {
                        //Archer

                        IsMultiClass = false;

                        return 11;
                    }
                case 61440:
                    {
                        //HawkArcher

                        IsMultiClass = false;

                        return 12;
                    }
                case 57344:
                    {
                        //Scout

                        IsMultiClass = false;

                        return 13;
                    }
                case 16384:
                    {
                        //SharpShooter

                        IsMultiClass = false;

                        return 14;
                    }
                case 49152:
                    {
                        //SharpShooter & Ranger

                        IsMultiClass = true;

                        return 14;
                    }
                case 32768:
                    {
                        //Ranger

                        IsMultiClass = false;

                        return 15;
                    }
                case 2031616:
                    {
                        //Mage

                        IsMultiClass = false;

                        return 16;
                    }
                case 1966080:
                    {
                        //WizMage

                        IsMultiClass = false;

                        return 17;
                    }
                case 1835008:
                    {
                        //Enchanter

                        IsMultiClass = false;

                        return 18;
                    }
                case 524288:
                    {
                        //Warlock

                        IsMultiClass = false;

                        return 19;
                    }
                case 1572864:
                    {
                        //Warlock & Wizard

                        IsMultiClass = true;

                        return 19;
                    }
                case 1048576:
                    {
                        //Wizard

                        IsMultiClass = false;

                        return 20;
                    }
                case 65011712:
                    {
                        //Trickster

                        IsMultiClass = false;

                        return 21;
                    }
                case 62914560:
                    {
                        //Gambit

                        IsMultiClass = false;

                        return 22;
                    }
                case 58720256:
                    {
                        //Renegade

                        IsMultiClass = false;

                        return 23;
                    }
                case 16777216:
                    {
                        //Spectre

                        IsMultiClass = false;

                        return 24;
                    }
                case 50331648:
                    {
                        //Spectre & Reaper

                        IsMultiClass = true;

                        return 24;
                    }
                case 33554432:
                    {
                        //Reaper

                        IsMultiClass = false;

                        return 25;
                    }
                case 67108862:
                    {
                        //Everyone

                        IsMultiClass = true;

                        return 0;
                    }
                default:
                    {
                        //Everything else

                        IsMultiClass = false;

                        return 0;
                    }
            }
        }
    }
}
