mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 20:50:01 +00:00
fixed mana ticks - hides on full mana now
This commit is contained in:
@@ -64,7 +64,10 @@ pfUI:RegisterModule("energytick", "vanilla:tbc", function()
|
||||
if this.mode == "MANA" and diff < 0 then
|
||||
this.target = 5
|
||||
elseif this.mode == "MANA" and diff > 0 then
|
||||
if this.max ~= 5 and diff > (this.badtick and this.badtick * 1.2 or 5) then
|
||||
if UnitMana("player") >= UnitManaMax("player") then
|
||||
this.start = nil
|
||||
this.spark:SetAlpha(0)
|
||||
elseif this.max ~= 5 and diff > (this.badtick and this.badtick * 1.2 or 5) then
|
||||
this.target = 2
|
||||
else
|
||||
this.badtick = diff
|
||||
@@ -89,6 +92,7 @@ pfUI:RegisterModule("energytick", "vanilla:tbc", function()
|
||||
if this.target then
|
||||
this.start, this.max = GetTime(), this.target
|
||||
this.target = nil
|
||||
this.spark:SetAlpha(1)
|
||||
end
|
||||
|
||||
if not this.start then
|
||||
@@ -121,4 +125,4 @@ pfUI:RegisterModule("energytick", "vanilla:tbc", function()
|
||||
energytick.spark:SetWidth(C.unitframes.player.pheight + 5)
|
||||
hookUpdateConfig(pfUI.uf.player)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user