From 01af23d058a61c2eeeca6a2060561a603d917030 Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 8 Jan 2025 20:03:10 -0500 Subject: [PATCH] Classic/Deadmines/EdwinVanCleef: Add boss module (#1238) --- Classic/Deadmines/EdwinVanCleef.lua | 45 ++++++++++++++++++++++++---- Classic/Deadmines/Options/Colors.lua | 2 ++ Classic/Deadmines/Options/Sounds.lua | 2 ++ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/Classic/Deadmines/EdwinVanCleef.lua b/Classic/Deadmines/EdwinVanCleef.lua index 393222770..8ce9375a9 100644 --- a/Classic/Deadmines/EdwinVanCleef.lua +++ b/Classic/Deadmines/EdwinVanCleef.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 -- @@ -9,31 +8,65 @@ mod:RegisterEnableMob(639) -- Edwin VanCleef mod:SetEncounterID(mod:Retail() and 2972 or 2747) --mod:SetRespawnTime(0) +-------------------------------------------------------------------------------- +-- Localization +-- + +local L = mod:GetLocale() +if L then + L["5200_icon"] = "ability_rogue_masterofsubtlety" + L["450564_desc"] = -29832 -- Shadowstep +end + -------------------------------------------------------------------------------- -- Initialization -- function mod:GetOptions() return { - + 5200, -- VanCleef's Allies + 450564, -- Shadowstep } end function mod:OnBossEnable() + self:Log("SPELL_CAST_SUCCESS", "VanCleefsAllies", 5200) if self:Retail() then - self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames + self:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", nil, "boss1", "boss2") -- Shadowstep end end function mod:OnEngage() + if self:Retail() then + self:CDBar(450564, 5.0) -- Shadowstep + end +end + +-------------------------------------------------------------------------------- +-- Classic Initialization +-- + +if mod:Classic() then + function mod:GetOptions() + return { + 5200, -- VanCleef's Allies + } + end end -------------------------------------------------------------------------------- -- Event Handlers -- -function mod:ENCOUNTER_START(_, id) -- XXX no boss frames - if id == self.engageId then - self:Engage() +function mod:VanCleefsAllies(args) + self:Message(args.spellId, "cyan", CL.percent:format(50, args.spellName), L["5200_icon"]) + self:PlaySound(args.spellId, "long") +end + +function mod:UNIT_SPELLCAST_SUCCEEDED(_, _, _, spellId) + if spellId == 450564 then -- Shadowstep + self:Message(spellId, "yellow") + self:CDBar(spellId, 9.7) + self:PlaySound(spellId, "info") end end diff --git a/Classic/Deadmines/Options/Colors.lua b/Classic/Deadmines/Options/Colors.lua index aa703a635..e963b83ef 100644 --- a/Classic/Deadmines/Options/Colors.lua +++ b/Classic/Deadmines/Options/Colors.lua @@ -30,6 +30,8 @@ BigWigs:AddColors("Captain Greenskin", { }) BigWigs:AddColors("Edwin VanCleef", { + [5200] = "cyan", + [450564] = "yellow", }) BigWigs:AddColors("Cookie", { diff --git a/Classic/Deadmines/Options/Sounds.lua b/Classic/Deadmines/Options/Sounds.lua index c56254eab..3a8bb2e2a 100644 --- a/Classic/Deadmines/Options/Sounds.lua +++ b/Classic/Deadmines/Options/Sounds.lua @@ -30,6 +30,8 @@ BigWigs:AddSounds("Captain Greenskin", { }) BigWigs:AddSounds("Edwin VanCleef", { + [5200] = "long", + [450564] = "info", }) BigWigs:AddSounds("Cookie", {