Skip to content

Commit

Permalink
Classic/Deadmines/RhahkZor: Add boss module (#1233)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Jan 9, 2025
1 parent 89491ba commit f565981
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Colors.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

BigWigs:AddColors("Rhahk'Zor", {
[6304] = "purple",
[450515] = "orange",
})

BigWigs:AddColors("Sneed", {
Expand Down
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Sounds.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

BigWigs:AddSounds("Rhahk'Zor", {
[6304] = "alert",
[450515] = "alarm",
})

BigWigs:AddSounds("Sneed", {
Expand Down
41 changes: 35 additions & 6 deletions Classic/Deadmines/RhahkZor.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,55 @@ mod:SetEncounterID(mod:Retail() and 2967 or 2741)

function mod:GetOptions()
return {

6304, -- Rhahk'Zor Slam
450515, -- Whirling Rage
--455010, -- Fixate, hidden
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "RhahkZorSlam", 6304)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "WhirlingRage", 450515)
end
end

function mod:OnEngage()
if self:Retail() then
-- Rhahk'Zor Slam can be cast on pull in Classic, Whirling Rage is Retail-only
self:CDBar(6304, 3.6) -- Rhahk'Zor Slam
self:CDBar(450515, 6.1) -- Whirling Rage
end
end

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

if mod:Classic() then
function mod:GetOptions()
return {
6304, -- Rhahk'Zor Slam
}
end
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:RhahkZorSlam(args)
self:Message(args.spellId, "purple")
if self:Retail() then
self:CDBar(args.spellId, 15.8)
else -- Classic
self:CDBar(args.spellId, 17.8)
end
self:PlaySound(args.spellId, "alert")
end

function mod:WhirlingRage(args)
self:Message(args.spellId, "orange")
self:CDBar(args.spellId, 17.0)
self:PlaySound(args.spellId, "alarm")
end

0 comments on commit f565981

Please sign in to comment.