mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 19:19:59 +00:00
castbar: add pushback counter to channel bar
This commit is contained in:
+2
-1
@@ -9,7 +9,8 @@ pfUI.module.autoshift = true
|
||||
pfUI.module.itemclick = true
|
||||
|
||||
-- [[ Constants ]]--
|
||||
CASTBAR_DELAY_EVENT = "UNIT_SPELLCAST_DELAYED" -- UNIT_SPELLCAST_CHANNEL_UPDATE ?
|
||||
CASTBAR_EVENT_CAST_DELAY = "UNIT_SPELLCAST_DELAYED"
|
||||
CASTBAR_EVENT_CHANNEL_DELAY = "UNIT_SPELLCAST_CHANNEL_UPDATE"
|
||||
|
||||
NAMEPLATE_OBJECTORDER = { "border", "glow", "_", "_", "name", "level",
|
||||
"levelicon", "raidicon" }
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@ setfenv(1, pfUI:GetEnvironment())
|
||||
if pfUI.client > 11200 then return end
|
||||
|
||||
-- [[ Constants ]]--
|
||||
CASTBAR_DELAY_EVENT = "SPELLCAST_DELAYED" -- SPELLCAST_CHANNEL_UPDATE ?
|
||||
CASTBAR_EVENT_CAST_DELAY = "SPELLCAST_DELAYED"
|
||||
CASTBAR_EVENT_CHANNEL_DELAY = "SPELLCAST_CHANNEL_UPDATE"
|
||||
|
||||
NAMEPLATE_OBJECTORDER = { "border", "glow", "name", "level", "levelicon",
|
||||
"raidicon" }
|
||||
|
||||
+8
-2
@@ -121,10 +121,16 @@ pfUI:RegisterModule("castbar", function ()
|
||||
end)
|
||||
|
||||
-- register for spell delay
|
||||
cb:RegisterEvent(CASTBAR_DELAY_EVENT)
|
||||
cb:RegisterEvent(CASTBAR_EVENT_CAST_DELAY)
|
||||
cb:RegisterEvent(CASTBAR_EVENT_CHANNEL_DELAY)
|
||||
cb:SetScript("OnEvent", function()
|
||||
if not UnitIsUnit(this.unitstr, "player") then return end
|
||||
this.delay = ( this.delay or 0 ) + arg1/1000
|
||||
|
||||
if event == CASTBAR_EVENT_CAST_DELAY then
|
||||
this.delay = ( this.delay or 0 ) + arg1/1000
|
||||
elseif event == CASTBAR_EVENT_CHANNEL_DELAY then
|
||||
this.delay = ( this.delay or 0 ) + this.bar:GetValue() - arg1/1000
|
||||
end
|
||||
end)
|
||||
|
||||
cb:SetAlpha(0)
|
||||
|
||||
Reference in New Issue
Block a user