fixed mana ticks - hides on full mana now

This commit is contained in:
Meow
2026-03-14 10:40:08 +01:00
parent 8dc9f1cd13
commit 7f6c12d185
+6 -2
View File
@@ -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)