Skip to content

Commit

Permalink
Classic/Deadmines/CaptainGreenskin: Add boss module
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Dec 29, 2024
1 parent 85b46bb commit c377964
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
53 changes: 47 additions & 6 deletions Classic/Deadmines/CaptainGreenskin.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 @@ -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
2 changes: 2 additions & 0 deletions Classic/Deadmines/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ BigWigs:AddColors("Mr. Smite", {
})

BigWigs:AddColors("Captain Greenskin", {
[5208] = {"blue","orange","purple"},
[450550] = "red",
})

BigWigs:AddColors("Edwin VanCleef", {
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 @@ -12,6 +12,8 @@ BigWigs:AddSounds("Mr. Smite", {
})

BigWigs:AddSounds("Captain Greenskin", {
[5208] = {"alarm","info"},
[450550] = "alert",
})

BigWigs:AddSounds("Edwin VanCleef", {
Expand Down

0 comments on commit c377964

Please sign in to comment.