Skip to content

Commit

Permalink
Classic/ZulFarrak/ChiefUkorzSandscalp: Add boss module (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle authored Nov 4, 2024
1 parent 38c9cb7 commit 760e38d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 4 deletions.
58 changes: 54 additions & 4 deletions Classic/ZulFarrak/ChiefUkorzSandscalp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,74 @@ mod:SetEncounterID(600)

function mod:GetOptions()
return {
{8269, "DISPEL"}, -- Frenzy
15496, -- Cleave
454632, -- Enrage
}
end

function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "Frenzy", 8269)
self:Log("SPELL_AURA_APPLIED", "FrenzyApplied", 8269)
self:Log("SPELL_DAMAGE", "CleaveDamage", 15496)
self:Log("SPELL_MISSED", "CleaveDamage", 15496)
if self:Retail() then
self:RegisterEvent("ENCOUNTER_START") -- XXX no boss frames
self:Log("SPELL_AURA_APPLIED", "EnrageApplied", 454632)
end
if self:Heroic() then -- no encounter events in Timewalking
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus")
self:Death("Win", 7267)
end
end

function mod:OnEngage()
self:CDBar(8269, 37.6) -- Frenzy
end

--------------------------------------------------------------------------------
-- Classic Initialization
--

if mod:Classic() then
function mod:GetOptions()
return {
{8269, "DISPEL"}, -- Frenzy
15496, -- Cleave
}
end
end

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

function mod:ENCOUNTER_START(_, id) -- XXX no boss frames
if id == self.engageId then
self:Engage()
function mod:Frenzy(args)
self:CDBar(args.spellId, 120.0)
end

function mod:FrenzyApplied(args)
if self:Dispeller("enrage", true, args.spellId) then
self:Message(args.spellId, "orange", CL.onboss:format(args.spellName))
self:PlaySound(args.spellId, "alert")
end
end

do
local prev = 0
function mod:CleaveDamage(args)
if self:Tank() or self:Solo() then return end -- unavoidable for tank/solo
local mobId = self:MobId(args.sourceGUID)
local castByBoss = mobId == 7267 or mobId == 7797
if castByBoss and self:Me(args.destGUID) and args.time - prev > 1.5 then
prev = args.time
self:PersonalMessage(args.spellId, "near")
self:PlaySound(args.spellId, "alarm")
end
end
end

function mod:EnrageApplied(args)
-- applies to other boss when first boss dies
self:Message(args.spellId, "red", CL.onboss:format(args.spellName))
self:PlaySound(args.spellId, "alert")
end
3 changes: 3 additions & 0 deletions Classic/ZulFarrak/Options/Colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ BigWigs:AddColors("Nekrum & Sezz'ziz", {
})

BigWigs:AddColors("Chief Ukorz Sandscalp", {
[8269] = "orange",
[15496] = "blue",
[454632] = "red",
})
3 changes: 3 additions & 0 deletions Classic/ZulFarrak/Options/Sounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ BigWigs:AddSounds("Nekrum & Sezz'ziz", {
})

BigWigs:AddSounds("Chief Ukorz Sandscalp", {
[8269] = "alert",
[15496] = "alarm",
[454632] = "alert",
})

0 comments on commit 760e38d

Please sign in to comment.