-- InterruptMobs.lua
-- Database of mobs with important interruptible casts for M+ Season 3
-- Auto-generated from MDT data

local _, FellowKick = ...
FellowKick = FellowKick or {}

-- NPC ID -> mob data
-- priority: 1 = must interrupt, 2 = high priority, 3 = optional
FellowKick.InterruptMobs = {
    -- ============================
    -- Ara-Kara, City of Echoes
    -- ============================
    [216293] = { name = "Trilling Attendant", priority = 1, dungeon = "Ara-Kara" },
    [216364] = { name = "Blood Overseer", priority = 1, dungeon = "Ara-Kara" },
    [217531] = { name = "Ixin", priority = 1, dungeon = "Ara-Kara" },
    [217533] = { name = "Atik", priority = 1, dungeon = "Ara-Kara" },
    
    -- ============================
    -- The Dawnbreaker
    -- ============================
    [213892] = { name = "Nightfall Shadowmage", priority = 1, dungeon = "Dawnbreaker" },
    [213893] = { name = "Nightfall Darkcaster", priority = 1, dungeon = "Dawnbreaker" },
    [210966] = { name = "Sureki Webmage", priority = 1, dungeon = "Dawnbreaker" },
    [213934] = { name = "Manifested Shadow", priority = 2, dungeon = "Dawnbreaker" },
    [211263] = { name = "Nightfall Tactician", priority = 1, dungeon = "Dawnbreaker" },
    [211262] = { name = "Ascendant Vis'coxria", priority = 1, dungeon = "Dawnbreaker" },
    
    -- ============================
    -- Operation: Floodgate
    -- ============================
    [225436] = { name = "Slime Engineer", priority = 1, dungeon = "Floodgate" },
    [226395] = { name = "Venture Co. Pyromaniac", priority = 1, dungeon = "Floodgate" },
    [228818] = { name = "Undergeared Laborer", priority = 2, dungeon = "Floodgate" },
    [225349] = { name = "Venture Co. Surveyor", priority = 1, dungeon = "Floodgate" },
    [224461] = { name = "Kobold Taskfinder", priority = 1, dungeon = "Floodgate" },
    [228532] = { name = "Shroomhide Gulper", priority = 2, dungeon = "Floodgate" },
    [225487] = { name = "Venture Co. Mechanic", priority = 1, dungeon = "Floodgate" },
    [225540] = { name = "Venture Co. Electrician", priority = 1, dungeon = "Floodgate" },
    
    -- ============================
    -- Priory of the Sacred Flame
    -- ============================
    [211291] = { name = "Fervent Sharpshooter", priority = 1, dungeon = "Priory" },
    [206711] = { name = "Devout Priest", priority = 1, dungeon = "Priory" },
    [211289] = { name = "Risen Mage", priority = 1, dungeon = "Priory" },
    [207939] = { name = "Elaena Emberlanz", priority = 1, dungeon = "Priory" },
    [220196] = { name = "Sergeant Shaynemail", priority = 1, dungeon = "Priory" },
    [214801] = { name = "Sir Braunpyke", priority = 1, dungeon = "Priory" },
    [207942] = { name = "Taener Duelmal", priority = 1, dungeon = "Priory" },
    [207941] = { name = "Captain Furnace", priority = 1, dungeon = "Priory" },
    
    -- ============================
    -- Halls of Atonement
    -- ============================
    [165529] = { name = "Depraved Collector", priority = 1, dungeon = "HallsOfAtonement" },
    [165414] = { name = "Depraved Obliterator", priority = 1, dungeon = "HallsOfAtonement" },
    [164562] = { name = "Depraved Houndmaster", priority = 1, dungeon = "HallsOfAtonement" },
    [167607] = { name = "Stoneborn Reaver", priority = 2, dungeon = "HallsOfAtonement" },
    [165410] = { name = "High Adjudicator Aleez", priority = 1, dungeon = "HallsOfAtonement" },
    
    -- ============================
    -- Tazavesh: Streets of Wonder
    -- ============================
    [175649] = { name = "Armored Overseer", priority = 1, dungeon = "TazaveshLower" },
    [180092] = { name = "Interrogation Specialist", priority = 1, dungeon = "TazaveshLower" },
    [175663] = { name = "Market Peacekeeper", priority = 1, dungeon = "TazaveshLower" },
    [178392] = { name = "Veteran Sparkcaster", priority = 1, dungeon = "TazaveshLower" },
    [178388] = { name = "Commerce Enforcer", priority = 1, dungeon = "TazaveshLower" },
    [177817] = { name = "Support Officer", priority = 2, dungeon = "TazaveshLower" },
    [176562] = { name = "Ancient Core Hound", priority = 1, dungeon = "TazaveshLower" },
    [175677] = { name = "Customs Security", priority = 1, dungeon = "TazaveshLower" },
    
    -- ============================
    -- Tazavesh: So'leah's Gambit
    -- ============================
    [179840] = { name = "Tracker Zo'korss", priority = 1, dungeon = "TazaveshUpper" },
    [178950] = { name = "Cartel Muscle", priority = 2, dungeon = "TazaveshUpper" },
    [178165] = { name = "Murkbrine Scalebinder", priority = 1, dungeon = "TazaveshUpper" },
    [178141] = { name = "Murkbrine Wavejumper", priority = 1, dungeon = "TazaveshUpper" },
    [179334] = { name = "Coastwalker Goliath", priority = 1, dungeon = "TazaveshUpper" },
    [179733] = { name = "So'leah", priority = 1, dungeon = "TazaveshUpper" },
    
    -- ============================
    -- Eco-Dome Al'dani  
    -- ============================
    -- (Add as data becomes available)
}

-- Marker rotation: Star, Circle, Diamond, Triangle
FellowKick.MarkerRotation = { 1, 2, 3, 4 }
FellowKick.CurrentMarkerIndex = 1

-- Check if NPC ID is in the interrupt database
function FellowKick.IsInterruptMob(npcID)
    return FellowKick.InterruptMobs[npcID] ~= nil
end

-- Get mob data from NPC ID
function FellowKick.GetInterruptMobData(npcID)
    return FellowKick.InterruptMobs[npcID]
end

-- Get next marker in rotation
function FellowKick.GetNextMarker()
    local marker = FellowKick.MarkerRotation[FellowKick.CurrentMarkerIndex]
    FellowKick.CurrentMarkerIndex = FellowKick.CurrentMarkerIndex + 1
    if FellowKick.CurrentMarkerIndex > #FellowKick.MarkerRotation then
        FellowKick.CurrentMarkerIndex = 1
    end
    return marker
end

-- Reset marker rotation
function FellowKick.ResetMarkerRotation()
    FellowKick.CurrentMarkerIndex = 1
end

-- Extract NPC ID from GUID
function FellowKick.GetNPCIDFromGUID(guid)
    if not guid then return nil end
    local type, _, _, _, _, npcID = strsplit("-", guid)
    if type == "Creature" or type == "Vehicle" then
        return tonumber(npcID)
    end
    return nil
end
