Skip to content

Commit

Permalink
Classic/Deadmines/EdwinVanCleef: Add boss module (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Jan 9, 2025
1 parent 4d0e5ba commit 01af23d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
45 changes: 39 additions & 6 deletions Classic/Deadmines/EdwinVanCleef.lua
Original file line number Diff line number Diff line change
@@ -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
--
Expand All @@ -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
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ BigWigs:AddColors("Captain Greenskin", {
})

BigWigs:AddColors("Edwin VanCleef", {
[5200] = "cyan",
[450564] = "yellow",
})

BigWigs:AddColors("Cookie", {
Expand Down
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ BigWigs:AddSounds("Captain Greenskin", {
})

BigWigs:AddSounds("Edwin VanCleef", {
[5200] = "long",
[450564] = "info",
})

BigWigs:AddSounds("Cookie", {
Expand Down

0 comments on commit 01af23d

Please sign in to comment.