WoWInterface SVN ZoneLevel

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /ShadowExperience
    from Rev 21 to Rev 20
    Reverse comparison

Rev 21 → Rev 20

Core.lua
15,7 → 15,7
PetWidth = 22;
PlayerScale = 1;
PlayerHeight = 12;
PlayerWidth = 220;
PlayerWidth = 120;
PlayerTipAnchor = "CURSOR";
 
 
41,11 → 41,8
local b = UnitXPMax("player")
local c = floor(h*100/b)
local ToGoLeft = floor(b-h)
local d = floor(100-c)
local retVal = GetXPExhaustion()
txt = c.."% into level."
txt2 = ToGoLeft.." left to level!"
txt1 = d.."% left!"
txt = c.."%"
txt1 = ToGoLeft.." left to level"
 
GameTooltip:SetOwner(PlayerExp, ShadowEOptions.PlayerTipAnchor)
GameTooltip:SetText(UnitName("Player"))
53,13 → 50,8
GameTooltip:AddLine(UnitXP("player").."/"..UnitXPMax("player"))
GameTooltip:AddLine(txt)
GameTooltip:AddLine(txt1)
GameTooltip:AddLine(txt2)
if retVal == nil then
 
else
GameTooltip:AddLine(retVal.." rested experience.")
end
 
 
GameTooltip:Show()
end
 
74,24 → 66,17
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"))
if retVal == false then
PlayerExp:SetStatusBarColor(68, 0, 68, 1);
else
PlayerExp:SetStatusBarColor(0,0,1,1);
end
PlayerExp.text:SetText(UnitXP("player").."/"..UnitXPMax("player"))
end
if Position then
PlayerExp:ClearAllPoints()