Skip to content

Commit

Permalink
Classic/Stratholme/MalekiThePallid: Add boss module (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 5, 2024
1 parent c4e050a commit b112fda
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
38 changes: 31 additions & 7 deletions Classic/Stratholme/MalekiThePallid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,57 @@ local mod, CL = BigWigs:NewBoss("Maleki the Pallid", 329, 453)
if not mod then return end
mod:RegisterEnableMob(10438) -- Maleki the Pallid
mod:SetEncounterID(481)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

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

function mod:GetOptions()
return {

{16869, "DISPEL"}, -- Ice Tomb
17620, -- Drain Life
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "IceTomb", 16869)
self:Log("SPELL_AURA_APPLIED", "IceTombApplied", 16869)
self:Log("SPELL_CAST_SUCCESS", "DrainLife", 17620)
self:Log("SPELL_AURA_APPLIED", "DrainLifeApplied", 17620)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 10438)
end
end

function mod:OnEngage()
self:CDBar(16869, 6.4) -- Ice Tomb
self:CDBar(17620, 12.4) -- Drain Life
end

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

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

function mod:IceTombApplied(args)
if self:Me(args.destGUID) or self:Dispeller("magic", nil, args.spellId) then
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "warning", nil, args.destName)
end
end

function mod:DrainLife(args)
self:CDBar(args.spellId, 17.0)
end

function mod:DrainLifeApplied(args)
self:Message(args.spellId, "orange", CL.casting:format(args.spellName))
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
Expand Up @@ -33,6 +33,8 @@ BigWigs:AddColors("Nerub'enkan", {
})

BigWigs:AddColors("Maleki the Pallid", {
[16869] = {"blue","red","yellow"},
[17620] = "orange",
})

BigWigs:AddColors("Magistrate Barthilas", {
Expand Down
2 changes: 2 additions & 0 deletions Classic/Stratholme/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ BigWigs:AddSounds("Nerub'enkan", {
})

BigWigs:AddSounds("Maleki the Pallid", {
[16869] = {"alert","warning"},
[17620] = "alert",
})

BigWigs:AddSounds("Magistrate Barthilas", {
Expand Down

0 comments on commit b112fda

Please sign in to comment.