mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 20:50:01 +00:00
player: show energy ticks after entering world
This commit is contained in:
+4
-4
@@ -308,13 +308,13 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.power.bar:SetMinMaxValues(0, 100)
|
||||
|
||||
if pfUI_config.unitframes.player.energy == "1" then
|
||||
pfUI.uf.player.power.tick = CreateFrame("Frame", nil, UIParent)
|
||||
pfUI.uf.player.power.tick:RegisterEvent("VARIABLES_LOADED")
|
||||
pfUI.uf.player.power.tick = CreateFrame("Frame", nil, pfUI.uf.player.power.bar)
|
||||
pfUI.uf.player.power.tick:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.uf.player.power.tick:RegisterEvent("UNIT_DISPLAYPOWER")
|
||||
|
||||
pfUI.uf.player.power.tick:SetScript("OnEvent", function()
|
||||
if event == "VARIABLES_LOADED" then this.lastTick = GetTime() end
|
||||
if event == "VARIABLES_LOADED" or ( event == "UNIT_DISPLAYPOWER" and arg1 == "player" ) then
|
||||
if event == "PLAYER_ENTERING_WORLD" then this.lastTick = GetTime() end
|
||||
if event == "PLAYER_ENTERING_WORLD" or ( event == "UNIT_DISPLAYPOWER" and arg1 == "player" ) then
|
||||
if UnitPowerType("player") ~= 3 then
|
||||
this.spark:Hide()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user