PlayerExp:SetHeight(ShadowEOptions.PlayerHeight); |
PlayerExp:SetPoint("CENTER") |
PlayerExp:SetOrientation("HORIZONTAL"); |
PlayerExp:SetStatusBarColor(68, 0, 68, 1); |
-- PlayerExp:SetStatusBarColor(68, 0, 68, 1); |
PlayerExp:SetBackdropColor(0, 0, 0, 1); |
PlayerExp:SetMinMaxValues(1,UnitXPMax("player")); |
PlayerExp:SetScript("OnEvent", function(self, event, ...) |
if event == "PLAYER_XP_UPDATE" and arg1 == "player" then |
PlayerExp:SetValue(UnitXP("player")) |
PlayerExp.text:SetText(UnitXP("player").."/"..UnitXPMax("player")) |
end |
if event == "PLAYER_ENTERING_WORLD" then |
local retVal = GetXPExhaustion() |
|
PlayerExp.text:SetText(UnitXP("player").."/"..UnitXPMax("player")) |
PlayerExp:SetMinMaxValues(1,UnitXPMax("player")); |
PlayerExp:SetValue(UnitXP("player")) |
PlayerExp.text:SetText(UnitXP("player").."/"..UnitXPMax("player")) |
if retVal == false then |
PlayerExp:SetStatusBarColor(68, 0, 68, 1); |
else |
PlayerExp:SetStatusBarColor(0,0,1,1); |
end |
end |
if Position then |
PlayerExp:ClearAllPoints() |