From c37796407f51c96c4f01f5b1a59e0d793bf712af Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Sun, 29 Dec 2024 13:13:06 -0500 Subject: [PATCH] Classic/Deadmines/CaptainGreenskin: Add boss module --- Classic/Deadmines/CaptainGreenskin.lua | 53 +++++++++++++++++++++++--- Classic/Deadmines/Options/Colors.lua | 2 + Classic/Deadmines/Options/Sounds.lua | 2 + 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/Classic/Deadmines/CaptainGreenskin.lua b/Classic/Deadmines/CaptainGreenskin.lua index d07a3a46d..5551c19b0 100644 --- a/Classic/Deadmines/CaptainGreenskin.lua +++ b/Classic/Deadmines/CaptainGreenskin.lua @@ -1,4 +1,3 @@ -if BigWigsLoader.isRetail and select(4, GetBuildInfo()) < 110005 then return end -- XXX remove check when 11.0.5 is live -------------------------------------------------------------------------------- -- Module Declaration -- @@ -15,25 +14,67 @@ mod:SetEncounterID(mod:Retail() and 2971 or 2744) function mod:GetOptions() return { - + {5208, "DISPEL"}, -- Poisoned Harpoon + 450550, -- Pistol Shot } end function mod:OnBossEnable() + self:Log("SPELL_CAST_START", "PoisonedHarpoon", 5208) + self:Log("SPELL_AURA_APPLIED", "PoisonedHarpoonApplied", 5208) if self:Retail() then - self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames + self:Log("SPELL_CAST_START", "PistolShot", 450550) end end function mod:OnEngage() + if self:Retail() then + self:CDBar(450550, 1.0) -- Pistol Shot + end + self:CDBar(5208, 2.8) -- Poisoned Harpoon +end + +-------------------------------------------------------------------------------- +-- Classic Initialization +-- + +if mod:Classic() then + function mod:GetOptions() + return { + {5208, "DISPEL"}, -- Poisoned Harpoon + } + end end -------------------------------------------------------------------------------- -- Event Handlers -- -function mod:ENCOUNTER_START(_, id) -- XXX no boss frames - if id == self.engageId then - self:Engage() +function mod:PoisonedHarpoon(args) + self:Message(args.spellId, "purple", CL.casting:format(args.spellName)) + if self:Retail() then + self:CDBar(args.spellId, 8.5) + else -- Classic + self:CDBar(args.spellId, 38.8) + end + if self:Interrupter() then + self:PlaySound(args.spellId, "info") + end +end + +function mod:PoisonedHarpoonApplied(args) + if self:Dispeller("poison", nil, args.spellId) then + self:TargetMessage(args.spellId, "orange", args.destName) + self:PlaySound(args.spellId, "alarm", nil, args.destName) + end +end + +function mod:PistolShot(args) + if self:MobId(args.sourceGUID) == 647 then -- Captain Greenskin + self:Message(args.spellId, "red", CL.casting:format(args.spellName)) + self:CDBar(args.spellId, 6.3) + if self:Interrupter() then + self:PlaySound(args.spellId, "alert") + end end end diff --git a/Classic/Deadmines/Options/Colors.lua b/Classic/Deadmines/Options/Colors.lua index ca490192b..e7e56bf80 100644 --- a/Classic/Deadmines/Options/Colors.lua +++ b/Classic/Deadmines/Options/Colors.lua @@ -12,6 +12,8 @@ BigWigs:AddColors("Mr. Smite", { }) BigWigs:AddColors("Captain Greenskin", { + [5208] = {"blue","orange","purple"}, + [450550] = "red", }) BigWigs:AddColors("Edwin VanCleef", { diff --git a/Classic/Deadmines/Options/Sounds.lua b/Classic/Deadmines/Options/Sounds.lua index 7eb6e9251..b69b54ea2 100644 --- a/Classic/Deadmines/Options/Sounds.lua +++ b/Classic/Deadmines/Options/Sounds.lua @@ -12,6 +12,8 @@ BigWigs:AddSounds("Mr. Smite", { }) BigWigs:AddSounds("Captain Greenskin", { + [5208] = {"alarm","info"}, + [450550] = "alert", }) BigWigs:AddSounds("Edwin VanCleef", {