mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
fixed xp bar to show false rested values.
This commit is contained in:
+3
-3
@@ -45,7 +45,7 @@ local function OnEnter(self)
|
||||
local xp_perc = round(xp / xpmax * 100)
|
||||
local remaining = xpmax - xp
|
||||
local remaining_perc = round(remaining / xpmax * 100)
|
||||
local exh_perc = GetXPExhaustion() and round(GetXPExhaustion() / xpmax * 100) or 0
|
||||
local exh_perc = GetXPExhaustion() and round(GetXPExhaustion() / xpmax / 0.75 * 100) or 0
|
||||
local xp_persec = ((xp - data.startxp)/(GetTime() - data.starttime))
|
||||
local session = UnitXP("player") - data.startxp
|
||||
local avg_hour = floor(((UnitXP("player") - data.startxp) / (GetTime() - data.starttime)) * 60 * 60)
|
||||
@@ -171,7 +171,7 @@ end
|
||||
local text = "%s: %s%%"
|
||||
local xp, xpmax, ex = UnitXP("player"), UnitXPMax("player"), GetXPExhaustion()
|
||||
local xpperc = round(xp / xpmax * 100)
|
||||
local experc = ex and round(ex / xpmax * 100) or 0
|
||||
local experc = ex and round(ex / xpmax / 0.75 * 100) or 0
|
||||
if ex then text = "%s: %s%% (%s%% %s)" end
|
||||
self.bar.text:SetText(string.format(text, T["Experience"], xpperc, experc, T["Rested"]))
|
||||
|
||||
@@ -327,4 +327,4 @@ end
|
||||
end}
|
||||
|
||||
pfUI.xpbar:UpdateConfig()
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user