863d68c - Fix GetMacroSpell calls
[wowui.git] / OmaAB / ExpBar.lua
index 021ac76..01febef 100644 (file)
@@ -1,4 +1,5 @@
 -- ExpBar.lua
+if true then return end
 local _;
 local min = math.min;
 local IsResting = IsResting;
@@ -12,7 +13,7 @@ local running = false;
 local frame = CreateFrame("Frame", "OmaExpBar", UIParent);
 
 local function expBar()
-    frame:SetPoint("BOTTOM");
+    frame:SetPoint("CENTER");
     frame:SetWidth(width);
     frame:SetHeight(10);
     frame.base = frame:CreateTexture(nil, "BACKGROUND");
@@ -57,7 +58,7 @@ local function expBar()
     frame:SetScript("OnEvent", function(self, event)
         if event == "PLAYER_XP_UPDATE" or event == "PLAYER_LEVEL_UP" then
             updateXP();
-        elseif event == "PLAYER_UPDATE_RESTING" then
+        elseif event == "PLAYER_UPDATE_RESTING" or event == "PLAYER_ENTERING_WORLD" then
             if IsResting() then
                 running = true;
                 CTimerAfter(6, updater);
@@ -70,16 +71,17 @@ local function expBar()
     frame:RegisterEvent("PLAYER_XP_UPDATE");
     frame:RegisterEvent("PLAYER_LEVEL_UP");
     frame:RegisterEvent("PLAYER_UPDATE_RESTING");
+    frame:RegisterEvent("PLAYER_ENTERING_WORLD");
     -- from FrameXML/MainMenuBar.lua
-    frame:SetScript("OnEnter", function(frame) frame.text:Show(); ExhaustionToolTipText(); end);
-    frame:SetScript("OnLeave", function(frame) frame.text:Hide(); GameTooltip:Hide(); end);
+    frame:SetScript("OnEnter", function(frame) frame.text:Show(); end);
+    frame:SetScript("OnLeave", function(frame) frame.text:Hide(); end);
 end
 
 frame:RegisterEvent("PLAYER_LOGIN");
 frame:SetScript("OnEvent", function(self, event)
     if event == "PLAYER_LOGIN" then
         GameTooltip = _G["GameTooltip"];
-        if UnitLevel("player") < 110 and not IsXPUserDisabled() then
+        if UnitLevel("player") < 120 and not IsXPUserDisabled() then
             return expBar();
         end
     end