Skip to content

Commit

Permalink
Classic/ZulFarrak/Zumrah: Add boss module (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 4, 2024
1 parent b55c6e6 commit ce553ed
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Classic/ZulFarrak/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ BigWigs:AddColors("Hydromancer Velratha", {
})

BigWigs:AddColors("Witch Doctor Zum'rah", {
[11086] = "cyan",
[15982] = "red",
[17228] = "red",
})

BigWigs:AddColors("Gahz'rilla", {
Expand Down
3 changes: 3 additions & 0 deletions Classic/ZulFarrak/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ BigWigs:AddSounds("Hydromancer Velratha", {
})

BigWigs:AddSounds("Witch Doctor Zum'rah", {
[11086] = "info",
[15982] = "alert",
[17228] = "alert",
})

BigWigs:AddSounds("Gahz'rilla", {
Expand Down
71 changes: 66 additions & 5 deletions Classic/ZulFarrak/Zumrah.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,87 @@ mod:SetEncounterID(597)
-- Initialization
--

local wardOfZumrahMarker = mod:AddMarkerOption(true, "npc", 8, 11086, 8) -- Ward of Zum'rah
function mod:GetOptions()
return {
11086, -- Ward of Zum'rah
wardOfZumrahMarker,
15982, -- Healing Wave
17228, -- Shadow Bolt Volley
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_SUCCESS", "WardOfZumrah", 11086)
self:Log("SPELL_SUMMON", "WardOfZumrahSummon", 11086)
self:Log("SPELL_CAST_START", "HealingWave", 15982)
self:Log("SPELL_INTERRUPT", "HealingWaveInterrupt", 15982)
self:Log("SPELL_CAST_SUCCESS", "HealingWaveSuccess", 15982)
self:Log("SPELL_CAST_START", "ShadowBoltVolley", 17228)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 7271)
end
end

function mod:OnEngage()
self:CDBar(17228, 6.9) -- Shadow Bolt Volley
self:CDBar(11086, 14.2) -- Ward of Zum'rah
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:WardOfZumrah(args)
self:Message(args.spellId, "cyan", CL.spawning:format(args.spellName))
self:CDBar(args.spellId, 10.9)
self:PlaySound(args.spellId, "info")
end

do
local wardOfZumrahGUID = nil

function mod:WardOfZumrahSummon(args)
-- register events to auto-mark Ward of Zum'rah
if self:GetOption(wardOfZumrahMarker) then
wardOfZumrahGUID = args.destGUID
self:RegisterTargetEvents("MarkWardOfZumrah")
end
end

function mod:MarkWardOfZumrah(_, unit, guid)
if wardOfZumrahGUID == guid then
wardOfZumrahGUID = nil
self:CustomIcon(wardOfZumrahMarker, unit, 8)
self:UnregisterTargetEvents()
end
end
end

function mod:HealingWave(args)
if self:MobId(args.sourceGUID) == 7271 then -- Witch Doctor Zum'rah
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:PlaySound(args.spellId, "alert")
end
end

function mod:HealingWaveInterrupt(args)
if self:MobId(args.destGUID) == 7271 then -- Witch Doctor Zum'rah
self:CDBar(15982, 10.4)
end
end

function mod:HealingWaveSuccess(args)
if self:MobId(args.sourceGUID) == 7271 then -- Witch Doctor Zum'rah
self:CDBar(args.spellId, 10.4)
end
end

function mod:ShadowBoltVolley(args)
if self:MobId(args.sourceGUID) == 7271 then -- Witch Doctor Zum'rah
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 18.2)
self:PlaySound(args.spellId, "alert")
end
end

0 comments on commit ce553ed

Please sign in to comment.