Skip to content

Commit

Permalink
Classic/Deadmines/Gilnid: Add boss module
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Dec 29, 2024
1 parent 85b46bb commit 5bfaad9
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 6 deletions.
74 changes: 68 additions & 6 deletions Classic/Deadmines/Gilnid.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
if BigWigsLoader.isRetail and select(4, GetBuildInfo()) < 110005 then return end -- XXX remove check when 11.0.5 is live
--------------------------------------------------------------------------------
-- Module Declaration
--
Expand All @@ -15,25 +14,88 @@ mod:SetEncounterID(mod:Retail() and 2969 or 2743)

function mod:GetOptions()
return {

{5213, "DISPEL"}, -- Molten Metal
{5159, "DISPEL"}, -- Melt Ore
450542, -- Summon Remote-Controlled Golems
}
end

function mod:OnBossEnable()
if self:Classic() then
self:Log("SPELL_CAST_START", "MoltenMetal", 5213)
end
self:Log("SPELL_CAST_SUCCESS", "MoltenMetalSuccess", 5213)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_AURA_APPLIED", "MoltenMetalApplied", 5213)
self:Log("SPELL_CAST_START", "MeltOre", 5159)
self:Log("SPELL_AURA_APPLIED", "MeltOreApplied", 5159)
self:Log("SPELL_CAST_START", "SummonRemoteControlledGolems", 450542)
end
end

function mod:OnEngage()
if self:Retail() then
self:CDBar(5213, 1.2) -- Molten Metal
self:CDBar(5159, 9.7) -- Melt Ore
self:CDBar(450542, 12.1) -- Summon Remote-Controlled Golems
else -- Classic
self:CDBar(5213, 13.0) -- Molten Metal
end
end

--------------------------------------------------------------------------------
-- Classic Initialization
--

if mod:Classic() then
function mod:GetOptions()
return {
5213, -- Molten Metal
}
end
end

--------------------------------------------------------------------------------
-- Event Handlers
--

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:MoltenMetal(args) -- Classic only
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:PlaySound(args.spellId, "alert")
end

function mod:MoltenMetalSuccess(args)
if self:Retail() then
self:CDBar(args.spellId, 9.7)
else -- Classic
self:CDBar(args.spellId, 28.7)
end
end

function mod:MoltenMetalApplied(args)
if self:Dispeller("movement", nil, args.spellId) then
self:TargetMessage(args.spellId, "orange", args.destName)
self:PlaySound(args.spellId, "info", nil, args.destName)
end
end

function mod:MeltOre(args)
if self:MobId(args.sourceGUID) == 1763 then -- Gilnid
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 20.6)
self:PlaySound(args.spellId, "alert")
end
end

function mod:MeltOreApplied(args)
if self:Dispeller("magic", nil, args.spellId) and self:MobId(args.sourceGUID) == 1763 then -- Gilnid
self:TargetMessage(args.spellId, "orange", args.destName)
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end

function mod:SummonRemoteControlledGolems(args)
self:Message(args.spellId, "cyan")
self:CDBar(args.spellId, 30.4)
self:PlaySound(args.spellId, "long")
end
3 changes: 3 additions & 0 deletions Classic/Deadmines/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ BigWigs:AddColors("Sneed", {
})

BigWigs:AddColors("Gilnid", {
[5159] = {"blue","orange","red"},
[5213] = {"blue","orange","red"},
[450542] = "cyan",
})

BigWigs:AddColors("Mr. Smite", {
Expand Down
3 changes: 3 additions & 0 deletions Classic/Deadmines/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ BigWigs:AddSounds("Sneed", {
})

BigWigs:AddSounds("Gilnid", {
[5159] = {"alarm","alert"},
[5213] = {"alert","info"},
[450542] = "long",
})

BigWigs:AddSounds("Mr. Smite", {
Expand Down

0 comments on commit 5bfaad9

Please sign in to comment.