mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 14:10:01 +00:00
castbar: reset delays on new spell casts
This commit is contained in:
@@ -159,6 +159,8 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function ()
|
||||
local playerarg = nil
|
||||
cb:RegisterEvent(CASTBAR_EVENT_CAST_DELAY)
|
||||
cb:RegisterEvent(CASTBAR_EVENT_CHANNEL_DELAY)
|
||||
cb:RegisterEvent(CASTBAR_EVENT_CAST_START)
|
||||
cb:RegisterEvent(CASTBAR_EVENT_CHANNEL_START)
|
||||
cb:SetScript("OnEvent", function()
|
||||
if this.unitstr and not UnitIsUnit(this.unitstr, "player") then return end
|
||||
playerarg = pfUI.client <= 11200 or arg1 == "player" and true or nil
|
||||
@@ -172,6 +174,8 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function ()
|
||||
local isChannel, _, _, _, startTime, endTime = UnitChannelInfo(this.unitstr or this.unitname)
|
||||
if not isChannel then return end
|
||||
this.delay = ( this.delay or 0 ) + this.bar:GetValue() - (endTime/1000 - GetTime())
|
||||
elseif playerarg then
|
||||
this.delay = 0
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user