Skip to content

Commit

Permalink
Classic/Stratholme/WilleyHopebreaker: Add boss module
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Nov 5, 2024
1 parent 760e38d commit 9ecf503
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Classic/Stratholme/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ BigWigs:AddColors("Commander Malor", {
})

BigWigs:AddColors("Willey Hopebreaker", {
[10101] = "purple",
[17279] = "cyan",
[110762] = "purple",
})

BigWigs:AddColors("Instructor Galford", {
Expand Down
3 changes: 3 additions & 0 deletions Classic/Stratholme/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ BigWigs:AddSounds("Commander Malor", {
})

BigWigs:AddSounds("Willey Hopebreaker", {
[10101] = "alert",
[17279] = "info",
[110762] = "alert",
})

BigWigs:AddSounds("Instructor Galford", {
Expand Down
48 changes: 42 additions & 6 deletions Classic/Stratholme/WilleyHopebreaker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,69 @@ local mod, CL = BigWigs:NewBoss("Willey Hopebreaker", 329, 446)
if not mod then return end
mod:RegisterEnableMob(10997) -- Willey Hopebreaker
mod:SetEncounterID(475)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

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

function mod:GetOptions()
return {

17279, -- Summon Risen Rifleman
{110762, "TANK"}, -- Knock Away
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "SummonRisenRifleman", 17279)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_SUCCESS", "KnockAway", 110762)
else -- Classic
self:Log("SPELL_CAST_SUCCESS", "KnockAway", 10101)
end
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 10997)
end
end

function mod:OnEngage()
self:CDBar(17279, 6.1) -- Summon Risen Rifleman
self:CDBar(110762, 8.7) -- Knock Away
end

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

if mod:Classic() then
function mod:GetOptions()
return {
17279, -- Summon Crimson Rifleman
{10101, "TANK"}, -- Knock Away
}
end

function mod:OnEngage()
self:CDBar(17279, 6.4) -- Summon Crimson Rifleman
self:CDBar(10101, 8.7) -- Knock Away
end
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:SummonRisenRifleman(args) -- Summon Crimson Rifleman on Classic
self:Message(args.spellId, "cyan")
self:CDBar(args.spellId, 6.1)
self:PlaySound(args.spellId, "info")
end

function mod:KnockAway(args)
if self:MobId(args.sourceGUID) == 10997 then -- Willey Hopebreaker
self:Message(args.spellId, "purple")
self:CDBar(args.spellId, 12.2)
self:PlaySound(args.spellId, "alert")
end
end

0 comments on commit 9ecf503

Please sign in to comment.