Skip to content

Commit

Permalink
Classic/DireMaul/TendrisWarpwood: Add boss module (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Dec 1, 2024
1 parent 598fa3d commit 2329b82
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Classic/DireMaul/Options/Colors.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

BigWigs:AddColors("Tendris Warpwood", {
[5568] = "yellow",
[22924] = "red",
[22994] = {"blue","orange","yellow"},
})

BigWigs:AddColors("Illyanna Ravenoak", {
Expand Down
2 changes: 2 additions & 0 deletions Classic/DireMaul/Options/Sounds.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

BigWigs:AddSounds("Tendris Warpwood", {
[22924] = "alert",
[22994] = {"alarm","alert"},
})

BigWigs:AddSounds("Illyanna Ravenoak", {
Expand Down
47 changes: 41 additions & 6 deletions Classic/DireMaul/TendrisWarpwood.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,68 @@ local mod, CL = BigWigs:NewBoss("Tendris Warpwood", 429, 406)
if not mod then return end
mod:RegisterEnableMob(11489) -- Tendris Warpwood
mod:SetEncounterID(350)
--mod:SetRespawnTime(0)
--mod:SetRespawnTime(0) resets, doesn't respawn

--------------------------------------------------------------------------------
-- Initialization
--

function mod:GetOptions()
return {

{5568, "HEALER"}, -- Trample
22924, -- Grasping Vines
{22994, "DISPEL"}, -- Entangle
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "Trample", 5568)
self:Log("SPELL_CAST_START", "GraspingVines", 22924)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_CAST_START", "Entangle", 451014)
end
self:Log("SPELL_AURA_APPLIED", "EntangleApplied", 22994)
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 11489)
end
end

function mod:OnEngage()
if self:Retail() then
self:CDBar(22994, 6.6) -- Entangle
end
self:CDBar(5568, 7.1) -- Trample
self:CDBar(22924, 11.8) -- Grasping Vines
end

--------------------------------------------------------------------------------
-- Event Handlers
--

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:Trample(args)
-- also cast by trash
if self:MobId(args.sourceGUID) == 11489 then -- Tendris Warpwood
self:Message(args.spellId, "yellow")
self:CDBar(args.spellId, 5.6)
end
end

function mod:GraspingVines(args)
self:Message(args.spellId, "red", CL.casting:format(args.spellName))
self:CDBar(args.spellId, 14.5)
self:PlaySound(args.spellId, "alert")
end

function mod:Entangle(args)
self:Message(22994, "orange", CL.casting:format(args.spellName))
self:CDBar(22994, 6.1)
self:PlaySound(22994, "alert")
end

function mod:EntangleApplied(args)
if self:Me(args.destGUID) or self:Dispeller("magic", nil, args.spellId) or self:Dispeller("movement", nil, args.spellId) then
self:TargetMessage(args.spellId, "yellow", args.destName)
self:PlaySound(args.spellId, "alarm", nil, args.destName)
end
end

0 comments on commit 2329b82

Please sign in to comment.