WoWInterface SVN ZoneLevel

Compare Revisions

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

Rev 20 → Rev 21

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