Skip to content

Commit

Permalink
Classic/Stratholme/HearthsingerForresten: Add boss module (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 5, 2024
1 parent c55ea4b commit be06ae9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
36 changes: 29 additions & 7 deletions Classic/Stratholme/HearthsingerForresten.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,55 @@ local mod, CL = BigWigs:NewBoss("Hearthsinger Forresten", 329, 443)
if not mod then return end
mod:RegisterEnableMob(10558) -- Hearthsinger Forresten
mod:SetEncounterID(473)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

--------------------------------------------------------------------------------
-- Initialization
--

function mod:GetOptions()
return {

{16798, "DISPEL"}, -- Enchanting Lullaby
16244, -- Demoralizing Shout
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "EnchantingLullaby", 16798)
self:Log("SPELL_AURA_APPLIED", "EnchantingLullabyApplied", 16798)
self:Log("SPELL_CAST_SUCCESS", "DemoralizingShout", 16244)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 10558)
end
end

function mod:OnEngage()
self:CDBar(16244, 8.0) -- Demoralizing Shout
if not self:Solo() then
self:CDBar(16798, 9.5) -- Enchanting Lullaby
end
end

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

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

function mod:EnchantingLullabyApplied(args)
if self:Me(args.destGUID) or self:Dispeller("magic", nil, args.spellId) then
self:TargetMessage(args.spellId, "orange", args.destName)
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end

function mod:DemoralizingShout(args)
self:Message(args.spellId, "yellow")
self:CDBar(args.spellId, 11.0)
self:PlaySound(args.spellId, "alert")
end
2 changes: 2 additions & 0 deletions Classic/Stratholme/Options/Colors.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

BigWigs:AddColors("Hearthsinger Forresten", {
[16244] = "yellow",
[16798] = {"blue","orange","red"},
})

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

BigWigs:AddSounds("Hearthsinger Forresten", {
[16244] = "alert",
[16798] = {"alarm","alert"},
})

BigWigs:AddSounds("The Unforgiven", {
Expand Down

0 comments on commit be06ae9

Please sign in to comment.