mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
xpbar: avoid nil error when reaching maxlevel
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ pfUI:RegisterModule("xpbar", "vanilla:tbc", function ()
|
||||
this.enabled = true
|
||||
if event == "PLAYER_ENTERING_WORLD" then
|
||||
this.starttime = GetTime()
|
||||
this.startxp = UnitXP("player")
|
||||
this.startxp = UnitXP("player") or 0
|
||||
elseif event == "PLAYER_LEVEL_UP" then
|
||||
-- add previously gained experience to the session
|
||||
this.startxp = this.startxp - UnitXPMax("player")
|
||||
|
||||
Reference in New Issue
Block a user