mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +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
|
pfUI.module.itemclick = true
|
||||||
|
|
||||||
-- [[ Constants ]]--
|
-- [[ 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",
|
NAMEPLATE_OBJECTORDER = { "border", "glow", "_", "_", "name", "level",
|
||||||
"levelicon", "raidicon" }
|
"levelicon", "raidicon" }
|
||||||
|
|||||||
+2
-1
@@ -4,7 +4,8 @@ setfenv(1, pfUI:GetEnvironment())
|
|||||||
if pfUI.client > 11200 then return end
|
if pfUI.client > 11200 then return end
|
||||||
|
|
||||||
-- [[ Constants ]]--
|
-- [[ 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",
|
NAMEPLATE_OBJECTORDER = { "border", "glow", "name", "level", "levelicon",
|
||||||
"raidicon" }
|
"raidicon" }
|
||||||
|
|||||||
+8
-2
@@ -121,10 +121,16 @@ pfUI:RegisterModule("castbar", function ()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- register for spell delay
|
-- 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()
|
cb:SetScript("OnEvent", function()
|
||||||
if not UnitIsUnit(this.unitstr, "player") then return end
|
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)
|
end)
|
||||||
|
|
||||||
cb:SetAlpha(0)
|
cb:SetAlpha(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user