From c3d6a01a1330c6c1787e9adf7693575f85eb87e8 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Fri, 29 Nov 2024 14:56:58 -0500 Subject: [PATCH] Classic/DireMaul/GuardMoldar: Add boss module --- Classic/DireMaul/GuardMoldar.lua | 50 ++++++++++++++++++++++++----- Classic/DireMaul/Options/Colors.lua | 4 +++ Classic/DireMaul/Options/Sounds.lua | 4 +++ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/Classic/DireMaul/GuardMoldar.lua b/Classic/DireMaul/GuardMoldar.lua index 9321ab8bc..ad6085593 100644 --- a/Classic/DireMaul/GuardMoldar.lua +++ b/Classic/DireMaul/GuardMoldar.lua @@ -6,7 +6,7 @@ local mod, CL = BigWigs:NewBoss("Guard Mol'dar", 429, 411) if not mod then return end mod:RegisterEnableMob(14326) -- Guard Mol'dar mod:SetEncounterID(362) ---mod:SetRespawnTime(0) +--mod:SetRespawnTime(0) resets, doesn't respawn -------------------------------------------------------------------------------- -- Initialization @@ -14,25 +14,59 @@ mod:SetEncounterID(362) function mod:GetOptions() return { - + 11972, -- Shield Bash + 15749, -- Shield Charge + {14516, "TANK"}, -- Strike + 8269, -- Frenzy } end function mod:OnBossEnable() - if self:Retail() then - self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames - end + self:Log("SPELL_CAST_SUCCESS", "ShieldBash", 11972) + self:Log("SPELL_CAST_SUCCESS", "ShieldCharge", 15749) + self:Log("SPELL_CAST_SUCCESS", "Strike", 14516) + self:Log("SPELL_AURA_APPLIED", "FrenzyApplied", 8269) end function mod:OnEngage() + -- Shield Charge is cast immediately + -- Shield Bash is only cast if there are casters in melee range + self:CDBar(14516, 11.6) -- Strike end -------------------------------------------------------------------------------- -- Event Handlers -- -function mod:ENCOUNTER_START(_, id) -- XXX no boss frames - if id == self.engageId then - self:Engage() +function mod:ShieldBash(args) + if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar + self:TargetMessage(args.spellId, "orange", args.destName) + self:CDBar(args.spellId, 12.1) + if self:Me(args.destGUID) then + self:PlaySound(args.spellId, "alarm", nil, args.destName) + end + end +end + +function mod:ShieldCharge(args) + if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar + self:TargetMessage(args.spellId, "yellow", args.destName) + self:CDBar(args.spellId, 15.8) + self:PlaySound(args.spellId, "alert", nil, args.destName) + end +end + +function mod:Strike(args) + if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar + self:Message(args.spellId, "purple") + self:CDBar(args.spellId, 11.8) + self:PlaySound(args.spellId, "alert") + end +end + +function mod:FrenzyApplied(args) + if self:MobId(args.sourceGUID) == 14326 then -- Guard Mol'dar + self:Message(args.spellId, "cyan", CL.percent:format(50, args.spellName)) + self:PlaySound(args.spellId, "long") end end diff --git a/Classic/DireMaul/Options/Colors.lua b/Classic/DireMaul/Options/Colors.lua index a5ff8b6ed..6b478db70 100644 --- a/Classic/DireMaul/Options/Colors.lua +++ b/Classic/DireMaul/Options/Colors.lua @@ -15,6 +15,10 @@ BigWigs:AddColors("Prince Tortheldrin", { }) BigWigs:AddColors("Guard Mol'dar", { + [8269] = "cyan", + [11972] = {"blue","orange"}, + [14516] = "purple", + [15749] = {"blue","yellow"}, }) BigWigs:AddColors("Stomper Kreeg", { diff --git a/Classic/DireMaul/Options/Sounds.lua b/Classic/DireMaul/Options/Sounds.lua index 1b26ef54d..829822787 100644 --- a/Classic/DireMaul/Options/Sounds.lua +++ b/Classic/DireMaul/Options/Sounds.lua @@ -15,6 +15,10 @@ BigWigs:AddSounds("Prince Tortheldrin", { }) BigWigs:AddSounds("Guard Mol'dar", { + [8269] = "long", + [11972] = "alarm", + [14516] = "alert", + [15749] = "alert", }) BigWigs:AddSounds("Stomper Kreeg", {