Skip to content

Commit

Permalink
WarWithin/DarkflameCleft/OlWaxbeard: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Aug 31, 2024
1 parent 48cc10d commit 5bb1e2c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions WarWithin/DarkflameCleft/OlWaxbeard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,17 @@ end
--

do
local startTime = 0

local function printTarget(self, name, guid)
local function printTarget(self, name, guid, elapsed)
self:TargetMessage(422116, "orange", name)
self:PlaySound(422116, "alarm", nil, name)
if self:Me(guid) then
self:Say(422116, nil, nil, "Reckless Charge")
-- reduce the countdown duration by the scan length because we had to target scan
local remainingDuration = 5 + startTime - GetTime()
self:SayCountdown(422116, remainingDuration)
self:SayCountdown(422116, 5 - elapsed)
end
end

function mod:UNIT_SPELLCAST_START(_, unit, _, spellId)
if spellId == 422116 then -- Reckless Charge
startTime = GetTime()
-- there is an emote for this with a target, but the emote often lists the wrong player
self:GetUnitTarget(printTarget, 0.1, self:UnitGUID(unit))
self:CDBar(spellId, 35.2)
Expand Down

0 comments on commit 5bb1e2c

Please sign in to comment.