using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PSO2SERVER.Models
{

    public enum QuestType : byte
    {
        Unk0 = 0,             // 0x00
        Extreme = 1,          // 0x01
        ARKS = 3,             // 0x03
        LimitedTime = 4,      // 0x04
        ExtremeDebug = 5,     // 0x05
        Blank1 = 6,           // 0x06
        NetCafe = 8,          // 0x08
        WarmingDebug = 9,     // 0x09
        Blank2 = 10,          // 0x0A
        Advance = 11,         // 0x0B
        Expedition = 12,      // 0x0C
        FreeDebug = 13,       // 0x0D
        ArksDebug = 14,       // 0x0E
        Challenge = 16,       // 0x10
        Urgent = 17,          // 0x11
        UrgentDebug = 18,     // 0x12
        TimeAttack = 19,      // 0x13
        TimeDebug = 20,       // 0x14
        ArksDebug2 = 21,      // 0x15
        ArksDebug3 = 22,      // 0x16
        ArksDebug4 = 23,      // 0x17
        ArksDebug5 = 24,      // 0x18
        ArksDebug6 = 25,      // 0x19
        ArksDebug7 = 26,      // 0x1A
        ArksDebug8 = 27,      // 0x1B
        ArksDebug9 = 28,      // 0x1C
        ArksDebug10 = 29,     // 0x1D
        Blank3 = 30,          // 0x1E
        Recommended = 32,     // 0x20
        Ultimate = 33,        // 0x21
        UltimateDebug = 34,   // 0x22
        AGP = 35,             // 0x23
        Bonus = 36,           // 0x24
        StandardTraining = 37,// 0x25
        HunterTraining = 38,  // 0x26
        RangerTraining = 39,  // 0x27
        ForceTraining = 40,   // 0x28
        FighterTraining = 41, // 0x29
        GunnerTraining = 42,  // 0x2A
        TechterTraining = 43, // 0x2B
        BraverTraining = 44,  // 0x2C
        BouncerTraining = 45, // 0x2D
        SummonerTraining = 46,// 0x2E
        AutoAccept = 47,      // 0x2F
        Ridroid = 48,         // 0x30
        CafeAGP = 49,         // 0x31
        BattleBroken = 50,    // 0x32
        BusterDebug = 51,     // 0x33
        Poka12 = 52,          // 0x34
        StoryEP1 = 55,        // 0x37
        Buster = 56,          // 0x38
        HeroTraining = 57,    // 0x39
        Amplified = 58,       // 0x3A
        DarkBlastTraining = 61,// 0x3D
        Endless = 62,         // 0x3E
        Blank4 = 64,          // 0x40
        PhantomTraining = 65, // 0x41
        AISTraining = 66,     // 0x42
        DamageCalculation = 68,// 0x44
        EtoileTraining = 69,  // 0x45
        Divide = 70,          // 0x46
        Stars1 = 71,          // 0x47
        Stars2 = 72,          // 0x48
        Stars3 = 73,          // 0x49
        Stars4 = 74,          // 0x4A
        Stars5 = 75,          // 0x4B
        Stars6 = 76,          // 0x4C
    }


    [Flags]
    public enum AvailableQuestType : ulong
    {
        EXTREME = 1UL << 1,
        STORY_EP1 = 1UL << 2,
        ARKS = 1UL << 3,
        LIMITED_TIME = 1UL << 4,
        EXTREME_DEBUG = 1UL << 5,
        BLANK1 = 1UL << 6,
        STORY_EP2 = 1UL << 7,

        NET_CAFE = 1UL << 8,
        WARMING_DEBUG = 1UL << 9,
        BLANK2 = 1UL << 10,
        ADVANCE = 1UL << 11,
        EXPEDITION = 1UL << 12,
        FREE_DEBUG = 1UL << 13,
        ARKS_DEBUG = 1UL << 14,
        STORY_DEBUG = 1UL << 15,

        CHALLENGE = 1UL << 16,
        URGENT = 1UL << 17,
        URGENT_DEBUG = 1UL << 18,
        TIME_ATTACK = 1UL << 19,
        TIME_DEBUG = 1UL << 20,
        ARKS_DEBUG2 = 1UL << 21,
        ARKS_DEBUG3 = 1UL << 22,
        ARKS_DEBUG4 = 1UL << 23,

        ARKS_DEBUG5 = 1UL << 24,
        ARKS_DEBUG6 = 1UL << 25,
        ARKS_DEBUG7 = 1UL << 26,
        ARKS_DEBUG8 = 1UL << 27,
        ARKS_DEBUG9 = 1UL << 28,
        ARKS_DEBUG10 = 1UL << 29,
        BLANK3 = 1UL << 30,
        STORY_EP3 = 1UL << 31,

        RECOMMENDED = 1UL << 32,
        ULTIMATE = 1UL << 33,
        ULTIMATE_DEBUG = 1UL << 34,
        AGP = 1UL << 35,
        BONUS = 1UL << 36,
        UNK1 = 1UL << 37,
        STANDARD_TRAINING = 1UL << 38,
        HUNTER_TRAINING = 1UL << 39,

        RANGER_TRAINING = 1UL << 40,
        FORCE_TRAINING = 1UL << 41,
        FIGHTER_TRAINING = 1UL << 42,
        GUNNER_TRAINING = 1UL << 43,
        TECHTER_TRAINING = 1UL << 44,
        BRAVER_TRAINING = 1UL << 45,
        BOUNCER_TRAINING = 1UL << 46,
        SUMMONER_TRAINING = 1UL << 47,

        AUTO_ACCEPT = 1UL << 48,
        RIDROID = 1UL << 49,
        NET_CAFE_AGP = 1UL << 50,
        BATTLE_BROKEN = 1UL << 51,
        BUSTER_DEBUG = 1UL << 52,
        POKA12 = 1UL << 53,
        UNK2 = 1UL << 54,
        UNK3 = 1UL << 55,

        BUSTER = 1UL << 56,
        HERO_TRAINING = 1UL << 57,
        AMPLIFIED = 1UL << 58,
        UNK4 = 1UL << 59,
        UNK5 = 1UL << 60,
        DARK_BLAST_TRAINING = 1UL << 61,
        ENDLESS = 1UL << 62,
        UNK6 = 1UL << 63,

        BLANK4 = 1UL << 64,
        PHANTOM_TRAINING = 1UL << 65,
        AIS_TRAINING = 1UL << 66,
        UNK7 = 1UL << 67,
        DAMAGE_CALC = 1UL << 68,
        ETOILE_TRAINING = 1UL << 69,
        DIVIDE = 1UL << 70,
        STARS1 = 1UL << 71,

        STARS2 = 1UL << 72,
        STARS3 = 1UL << 73,
        STARS4 = 1UL << 74,
        STARS5 = 1UL << 75,
        STARS6 = 1UL << 76,
        UNK8 = 1UL << 77
    }

    public enum QuestEstimatedTime : byte
    {
        Short = 1,
        Medium,
        Long
    }

    [Flags]
    public enum QuestDifficultyType : byte
    {
        NORMAL = 1 << 0,    // 1 0x01 (0000 0001)
        HARD = 1 << 1,      // 2 0x02 (0000 0010)
        VERY_HARD = 1 << 2, // 4 0x04 (0000 0100)
        SUPER_HARD = 1 << 3, // 8 0x08 (0000 1000)
        EX_HARD = 1 << 4,    // 16 0x10 (0001 0000)
        ULTRA_HARD = 1 << 5,  // 32 0x20 (0010 0000)
        Dummy2 = 1 << 6,  // 64 0x40 (0100 0000)
        Dummy3 = 1 << 7  // 128 0x80 (1000 0000)
    }

    public enum QuestPartyType : byte
    {
        Solo,
        /// Only one party can join (up to 4 players).
        SingleParty,
        /// Multiple parties can join (up to 12 players).
        MultiParty,
    }

    [Flags]
    public enum QuestBitfield1 : ushort
    {
        MatterObjectiveQuest = 0x0001,
        ClientOrderOnQuest = 0x0008,
        NewQuest = 0x0100,
        ClientOrder = 0x0800,
        UnknownLevel = 0x1000
    }
}
