Skip to content

Commit

Permalink
Updates and cleanups for classic
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 6, 2024
1 parent c2669ef commit 56a23f2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
23 changes: 15 additions & 8 deletions Bastion/Sinestra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ local function isTargetableByOrb(unit, bossUnit)
-- check sinestra's target too
if bossUnit and mod:ThreatTarget(unit, bossUnit) then return false end
-- and maybe do a check for whelp targets
for k, v in next, whelpGUIDs do
for k in next, whelpGUIDs do
local whelp = mod:GetUnitIdByGUID(k)
if whelp and mod:ThreatTarget(unit, whelp) then
return false
Expand Down Expand Up @@ -113,6 +113,7 @@ function mod:OnBossEnable()
self:Log("SWING_DAMAGE", "WhelpWatcher", "*")
self:Log("SWING_MISSED", "WhelpWatcher", "*")
self:Death("TwilightWhelpDeaths", 47265, 48047, 48048, 48049, 48050) -- Twilight Whelp
self:RegisterEvent("NAME_PLATE_UNIT_ADDED")

self:Log("SPELL_CAST_START", "Breath", 90125)

Expand All @@ -131,7 +132,7 @@ function mod:OnEngage()
orbWarned = nil
eggs = 0
self:CDBar(90125, 23) -- Breath
self:CDBar(92852, 30) -- Slicer
self:CDBar(92852, 29) -- Slicer
self:Bar("whelps", 16, L["whelps"], 69005) -- whelp like icon
self:ScheduleTimer("NextOrbSpawned", 30)
self:RegisterUnitEvent("UNIT_HEALTH", "PhaseWarn", "boss1")
Expand Down Expand Up @@ -163,6 +164,12 @@ do
function mod:TwilightWhelpDeaths(args)
whelpGUIDs[args.destGUID] = nil
end
function mod:NAME_PLATE_UNIT_ADDED(_, unit)
local guid = self:UnitGUID(unit)
if whelpIds[self:MobId(guid)] then
whelpGUIDs[guid] = true
end
end
end

local repeatCount = 0
Expand All @@ -172,7 +179,7 @@ function mod:OrbWarning(source)

if source == "spawn" then
if #orbList > 0 then
mod:TargetsMessage(92852, "yellow", orbList, nil, L.slicer_message)
mod:TargetsMessage(92852, "yellow", orbList, #orbList, L.slicer_message)
if #orbList == 1 and repeatCount == 0 then
repeatCount = 1
self:SimpleTimer(function()
Expand All @@ -193,7 +200,7 @@ function mod:OrbWarning(source)
end
end
elseif source == "damage" then
mod:TargetsMessage(92852, "yellow", orbList, nil, L.slicer_message)
mod:TargetsMessage(92852, "yellow", orbList, #orbList, L.slicer_message)
mod:SimpleTimer(ResetOrbWarning, 10) -- might need to adjust this
if orbOnMe then
self:PlaySound(92852, "warning")
Expand All @@ -205,11 +212,11 @@ end
-- need to change it once there is a proper trigger for orbs
function mod:NextOrbSpawned()
repeatCount = 0
self:CDBar(92852, 29)
self:CDBar(92852, 28.5)
self:MessageOld(92852, "blue")
populateOrbList()
self:OrbWarning("spawn")
self:ScheduleTimer("NextOrbSpawned", 29)
self:ScheduleTimer("NextOrbSpawned", 28.5)
end

function mod:OrbDamage()
Expand Down Expand Up @@ -277,9 +284,9 @@ function mod:TwilightEggDeaths()
if eggs == 2 then
self:MessageOld("phase", "green", "info", CL["phase"]:format(3), 51070) -- broken egg icon
self:Bar("whelps", 50, L["whelps"], 69005)
self:CDBar(92852, 30) -- Slicer
self:CDBar(92852, 29) -- Slicer
self:CDBar(90125, 24) -- Breath
self:ScheduleTimer("NextOrbSpawned", 30)
self:ScheduleTimer("NextOrbSpawned", 29)
end
end

3 changes: 2 additions & 1 deletion Blackwing/Chimaeron.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ end
function mod:Mortality(args)
self:StopBar(CL.count:format(self:SpellName(88853), systemsFailureCount)) -- Systems Failure
self:StopBar(CL.count:format(self:SpellName(82848), massacreCount)) -- Massacre
self:StopBar(CL.cast:format(self:SpellName(82848))) -- Massacre
self:StopBar(82935) -- Caustic Slime
self:Message(args.spellId, "orange", CL.percent:format(20, args.spellName))
self:PlaySound(args.spellId, "long")
end

function mod:UNIT_HEALTH(event, unit)
local hp = self:GetHealth(unit)
if hp < 23 then
if hp < 24 then
self:UnregisterUnitEvent(event, unit)
if hp > 20 then
self:Message(82890, "cyan", CL.soon:format(self:SpellName(82890)), false)
Expand Down
5 changes: 3 additions & 2 deletions Blackwing/Nefarian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ do
end

function mod:Empower(args)
if self:GetStage() == 3 then
if not addsCollector[args.destGUID] then
addsActive = addsActive + 1
addsDead = addsDead - 1
addsCollector[args.destGUID] = 0
Expand All @@ -250,7 +250,7 @@ end
function mod:AnimatedBoneWarriorDeaths(args)
addsActive = addsActive - 1
addsDead = addsDead + 1
addsCollector[args.destGUID] = 0
addsCollector[args.destGUID] = nil
self:SetInfo("infobox", empowerLine-3, addsActive)
self:SetInfo("infobox", empowerLine-1, addsDead)
local highest = 0
Expand All @@ -259,6 +259,7 @@ function mod:AnimatedBoneWarriorDeaths(args)
highest = v
end
end
highestEmpower = highest
self:SetInfo("infobox", empowerLine+1, highest)
self:SetInfoBar("infobox", empowerLine, highest/100)
end
Expand Down

0 comments on commit 56a23f2

Please sign in to comment.