Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classic/Stratholme/PostmasterMalown: Add boss module #1200

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Classic/Stratholme/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ BigWigs:AddColors("Ramstein the Gorger", {
})

BigWigs:AddColors("Postmaster Malown", {
[6253] = "purple",
[12741] = {"blue","yellow"},
})

BigWigs:AddColors("Lord Aurius Rivendare", {
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 @@ -36,6 +36,8 @@ BigWigs:AddSounds("Ramstein the Gorger", {
})

BigWigs:AddSounds("Postmaster Malown", {
[6253] = "alert",
[12741] = "alert",
})

BigWigs:AddSounds("Lord Aurius Rivendare", {
Expand Down
34 changes: 26 additions & 8 deletions Classic/Stratholme/PostmasterMalown.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if not BigWigsLoader.isVanilla and not (BigWigsLoader.isRetail and select(4, GetBuildInfo()) >= 110005) then return end -- XXX remove build check when 11.0.5 is live
if not BigWigsLoader.isVanilla and not BigWigsLoader.isRetail then return end -- not an encounter in Cataclysm
--------------------------------------------------------------------------------
-- Module Declaration
--
Expand All @@ -7,33 +7,51 @@ local mod, CL = BigWigs:NewBoss("Postmaster Malown", 329, 2633)
if not mod then return end
mod:RegisterEnableMob(11143) -- Postmaster Malown
mod:SetEncounterID(mod:Retail() and 1885 or 2798)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

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

function mod:GetOptions()
return {

6253, -- Backhand
{12741, "DISPEL"}, -- Curse of Weakness
}
end

function mod:OnBossEnable()
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "Backhand", 6253)
self:Log("SPELL_CAST_SUCCESS", "CurseOfWeakness", 12741)
self:Log("SPELL_AURA_APPLIED", "CurseOfWeaknessApplied", 12741)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 11143)
end
end

function mod:OnEngage()
self:CDBar(6253, 9.7) -- Backhand
self:CDBar(12741, 10.6) -- Curse of Weakness
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:Backhand(args)
self:Message(args.spellId, "purple")
self:CDBar(args.spellId, 7.3)
self:PlaySound(args.spellId, "alert")
end

function mod:CurseOfWeakness(args)
self:CDBar(args.spellId, 14.6)
end

function mod:CurseOfWeaknessApplied(args)
if self:Me(args.destGUID) or self:Dispeller("curse", nil, args.spellId) then
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "alert", nil, args.destName)
end
end