local mod	= DBM:NewMod("z2687", "DBM-Delves-WarWithin")
local L		= mod:GetLocalizedStrings()

mod:SetRevision("20240622200108")

mod:RegisterCombat("scenario", 2687, 2767)--2767 likely not used player facing

mod:RegisterEventsInCombat(
--	"SPELL_CAST_START ",
--	"SPELL_CAST_SUCCESS",
--	"SPELL_AURA_APPLIED",
--	"SPELL_AURA_REMOVED",
--	"SPELL_PERIODIC_DAMAGE",
--	"UNIT_DIED",
	"ENCOUNTER_START",
	"ENCOUNTER_END"
)

--NOTE: This one lacks encounter ID for easy win detection and boss timers
--local warnDrones							= mod:NewSpellAnnounce(449072, 2)

--local specWarnFearfulShriek				= mod:NewSpecialWarningDodge(433410, nil, nil, nil, 2, 2)

--local timerShadowsofStrifeCD				= mod:NewCDNPTimer(12.4, 449318, nil, nil, nil, 4, nil, DBM_COMMON_L.INTERRUPT_ICON)
--local timerBurrowingTremorsCD				= mod:NewCDTimer(31.5, 448644, nil, nil, nil, 5)

--Antispam IDs for this mod: 1 run away, 2 dodge, 3 dispel, 4 incoming damage, 5 you/role, 6 misc, 7 off interrupt

--[[
function mod:SPELL_CAST_START(args)
	if args.spellId == 449318 then

	end
end
--]]

--[[
function mod:SPELL_CAST_SUCCESS(args)
	if args.spellId == 138680 then

	end
end
--]]

--[[
function mod:SPELL_AURA_APPLIED(args)
	if args.spellId == 1098 then

	end
end
--]]

--[[
function mod:SPELL_AURA_REMOVED(args)
	if args.spellId == 1098 then

	end
end
--]]

--[[
function mod:SPELL_PERIODIC_DAMAGE(_, _, _, _, destGUID, _, _, _, spellId)
	if spellId == 138561 and destGUID == UnitGUID("player") and self:AntiSpam() then

	end
end
--]]

--[[
function mod:UNIT_DIED(args)
	--if args.destGUID == UnitGUID("player") then--Solo scenario, a player death is a wipe

	--end
	local cid = self:GetCIDFromGUID(args.destGUID)
	if cid == 208242 then
	end
end
--]]

function mod:ENCOUNTER_START(eID)
	if eID == 2999 then--Mirror Master Murkna
		DBM:AddMsg("Boss alerts/timers not yet implemented for Mirror Master Murkna")
	elseif eID == 3000 then--Bloated Drowner
		DBM:AddMsg("Boss alerts/timers not yet implemented for Bloated Drowner")
	elseif eID == 3001 then--Cragpie
		DBM:AddMsg("Boss alerts/timers not yet implemented for Cragpie")
	elseif eID == 3002 then--Leviathan Caller
		DBM:AddMsg("Boss alerts/timers not yet implemented for Leviathan Caller")
	end
end

function mod:ENCOUNTER_END(eID, _, _, _, success)
	if eID == 2999 then--Mirror Master Murkna
		if success then
			DBM:EndCombat(self)
		else
			--Stop Timers manually
		end
	elseif eID == 3000 then--Bloated Drowner
		if success then
			DBM:EndCombat(self)
		else
			--Stop Timers manually
		end
	elseif eID == 3001 then--Cragpie
		if success then
			DBM:EndCombat(self)
		else
			--Stop Timers manually
		end
	elseif eID == 3002 then--Leviathan Caller
		if success then
			DBM:EndCombat(self)
		else
			--Stop Timers manually
		end
	end
end
