aa489f6 - Remove unused MoveAnything compatibility code
authorAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Sun, 25 Mar 2018 17:06:46 +0000
committerAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Sun, 25 Mar 2018 17:06:46 +0000
OmaUF/Auras.lua
OmaUF/BossFrames.lua
OmaUF/CastBar.lua
OmaUF/Events.lua
OmaUF/PetFrame.lua
OmaUF/PlayerFrame.lua
OmaUF/Settings.lua
OmaUF/TargetFrame.lua
OmaUF/UnitFrames.lua

index 5e6de47..0341a4d 100644 (file)
@@ -29,10 +29,6 @@ local function hideTooltip(frame)
     frame:SetScript("OnUpdate", nil);
 end
 
-function M.UpdateAuraTooltips()
-    GameTooltip = _G["GameTooltip"];
-end
-
 local function createAura(parent, prev, anchor, name, unit)
     local aura = CreateFrame("Frame", name, parent);
     aura:SetPoint("TOPLEFT", prev, anchor);
index 1b607ca..3e74dec 100644 (file)
@@ -17,7 +17,6 @@ local bgColor = Settings.BgColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
-local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Boss.Width, Settings.Boss.Height;
 local anchorX, anchorY = Settings.Boss.AnchorX, Settings.Boss.AnchorY;
 -- placeholders with visible values when error happens
@@ -50,11 +49,6 @@ local function hideTooltip(secure)
     GameTooltip:FadeOut();
 end
 
-function OmaUnitFrames.UpdateBossTooltips()
-    GameTooltip = _G["GameTooltip"];
-    GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
-end
-
 local function bossEvent(self)
     -- INSTANCE_ENCOUNTER_ENGAGE_UNIT only
     for unit, frame in pairs(self.frames) do
@@ -123,11 +117,6 @@ local function createFrame(framename, securename, parent, unit, anchorX, anchorY
     frame.shieldhl:SetPoint("BOTTOMRIGHT", frame.healthback, "BOTTOMRIGHT", 1, 0);
     frame.shieldhl:SetColorTexture(unpack(shieldhlColor));
     frame.shieldhl:Hide();
-    frame.healabsorb = frame:CreateTexture(nil, "ARTWORK");
-    frame.healabsorb:SetPoint("TOPRIGHT", frame.health, "TOPRIGHT");
-    frame.healabsorb:SetPoint("BOTTOMRIGHT", frame.health, "BOTTOMRIGHT");
-    frame.healabsorb:SetColorTexture(unpack(healabsorbColor));
-    frame.healabsorb:Hide();
     frame.name = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
     frame.name:SetPoint("LEFT", frame.healthback, "LEFT", 2, 1);
     frame.name.count = 10;
index 174789e..8da7d22 100644 (file)
@@ -15,7 +15,6 @@ local channelingColor = {0.32, 0.3, 1};
 local M = {};
 OmaUFCastBar = M;
 
--- TODO trade skill bar updates as well, check Quartz modules/Tradeskill.lua
 local function onUpdate(bar)
     if not bar:IsShown() then return end
     local width = bar.icon:IsShown() and bar.cast.width or bar.cast.width; -- TODO fullwidth
index 59b8592..d8cc7af 100644 (file)
@@ -10,7 +10,6 @@ local UnitHealth, UnitHealthMax = UnitHealth, UnitHealthMax;
 local UnitGetIncomingHeals, UnitGetTotalAbsorbs = UnitGetIncomingHeals, UnitGetTotalAbsorbs;
 local UnitThreatSituation, GetThreatStatusColor = UnitThreatSituation, GetThreatStatusColor;
 local UnitIsDeadOrGhost, UnitIsConnected = UnitIsDeadOrGhost, UnitIsConnected;
-local UnitGetTotalHealAbsorbs = UnitGetTotalHealAbsorbs;
 local UnitHasVehicleUI, UnitTargetsVehicleInRaidUI = UnitHasVehicleUI, UnitTargetsVehicleInRaidUI;
 local UnitLevel, UnitClassification = UnitLevel, UnitClassification;
 local UnitAffectingCombat, IsResting = UnitAffectingCombat, IsResting;
@@ -50,9 +49,6 @@ function M.RegisterUnitEvents(frame)
     if frame.shield then
         frame:RegisterUnitEvent("UNIT_ABSORB_AMOUNT_CHANGED", frame.unit, displayed);
     end
-    if frame.healabsorb then
-        frame:RegisterUnitEvent("UNIT_HEAL_ABSORB_AMOUNT_CHANGED", frame.unit, displayed);
-    end
     if frame.auras then
         frame:RegisterUnitEvent("UNIT_AURA", frame.unit, displayed);
     end
@@ -166,20 +162,8 @@ local function updateShield(frame, unit)
     end
 end
 
-local function updateHealAbsorb(frame, unit)
-    local absorb = UnitGetTotalHealAbsorbs(unit) or 0;
-    if absorb > 0 then
-        local space = frame.health:GetWidth();
-        absorb = (absorb / frame.health.max) * frame.width;
-        frame.healabsorb:SetWidth(min(space, absorb));
-        frame.healabsorb:Show();
-    else
-        frame.healabsorb:Hide();
-    end
-end
-
 local function updateAuras(frame, unit)
-    if frame.auras then updateAuraFrames(frame, unit) end
+    updateAuraFrames(frame, unit);
 end
 
 local function updateAggro(frame, unit)
@@ -332,7 +316,6 @@ local eventFuncs = {
         updateHealth(frame, frame.displayed);
         updateHealthText(frame, frame.displayed);
         if frame.shield then updateShield(frame, frame.displayed) end
-        if frame.healabsorb then updateHealAbsorb(frame, frame.displayed) end
     end,
     ["UNIT_POWER"] = function(frame)
         updatePower(frame, frame.displayed);
@@ -344,9 +327,6 @@ local eventFuncs = {
     ["UNIT_ABSORB_AMOUNT_CHANGED"] = function(frame)
         updateShield(frame, frame.displayed);
     end,
-    ["UNIT_HEAL_ABSORB_AMOUNT_CHANGED"] = function(frame)
-        updateHealAbsorb(frame, frame.displayed);
-    end,
     ["UNIT_THREAT_SITUATION_UPDATE"] = function(frame)
         updateAggro(frame, frame.displayed);
     end,
@@ -355,7 +335,6 @@ local eventFuncs = {
         updateHealth(frame, frame.displayed);
         updateHealthText(frame, frame.displayed);
         if frame.shield then updateShield(frame, frame.displayed) end
-        if frame.healabsorb then updateHealAbsorb(frame, frame.displayed) end
     end,
     ["UNIT_MAXPOWER"] = function(frame)
         updateMaxPower(frame, frame.displayed);
@@ -421,7 +400,6 @@ local eventFuncs = {
         end
         if frame.auras then updateAuras(frame, frame.displayed) end
         if frame.shield then updateShield(frame, frame.displayed) end
-        if frame.healabsorb then updateHealAbsorb(frame, frame.displayed) end
         if frame.name then updateName(frame, frame.displayed) end
         if frame.level then updateLevelText(frame, frame.unit) end
         if frame.status then updateStatus(frame, frame.unit) end
index 67d433b..93da251 100644 (file)
@@ -52,11 +52,6 @@ local vehicletoggle = [=[
     end
 ]=]
 
-function OmaUnitFrames.UpdatePetTooltips()
-    GameTooltip = _G["GameTooltip"];
-    GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
-end
-
 function OmaUnitFrames.InitializePet(parent)
     attributes = Settings.Character.Clickheal; -- TODO pet clickheal separate with Mend Pet etc.
 
index 38f19cf..27b2599 100644 (file)
@@ -61,11 +61,6 @@ local vehicletoggle = [=[
     end
 ]=]
 
-function OmaUnitFrames.UpdatePlayerTooltips()
-    GameTooltip = _G["GameTooltip"];
-    GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
-end
-
 function OmaUnitFrames.InitializePlayer(parent)
     attributes = Settings.Character.Clickheal;
 
index 7059cfa..d58f2f3 100644 (file)
@@ -87,7 +87,6 @@ local settings = {
     ShieldColor = {0.1, 0.8, 1},
     ShieldhlColor = {0.5, 0.8, 1},
     HealpredColor = {0.5, 0.6, 0.5},
-    HealabsorbColor = {0.1, 0.1, 0.1},
     PowerColors = {
         [PowerTypeMana] = {0, 0.5, 1},
         [PowerTypeRage] = {1, 0, 0},
index 1c0893e..c5e1079 100644 (file)
@@ -50,11 +50,6 @@ local function hideTooltip(secure)
     GameTooltip:FadeOut();
 end
 
-function OmaUnitFrames.UpdateTargetTooltips()
-    GameTooltip = _G["GameTooltip"];
-    GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"];
-end
-
 function OmaUnitFrames.InitializeTarget(parent)
     attributes = Settings.Character.Clickheal;
 
index 89cfa4a..1fd993d 100644 (file)
@@ -2,9 +2,6 @@
 local _;
 local pairs = pairs;
 local InCombatLockdown = InCombatLockdown;
-local CTimerAfter = C_Timer.After;
-
-local updateAuraTooltips = OmaUFAuras.UpdateAuraTooltips;
 
 local UnitFrames = CreateFrame("Frame", "OmaUnitFrame", UIParent);
 
@@ -63,7 +60,6 @@ local hiddenFrame = CreateFrame("Frame");
 hiddenFrame:Hide();
 local arenaHidden = false;
 local function hideArenaFrames()
-    -- not run if /reload happens in combat, may cause problems?
     if not arenaHidden and not InCombatLockdown() then
         arenaHidden = true;
         ArenaEnemyFrames:UnregisterAllEvents();
@@ -74,22 +70,10 @@ local function hideArenaFrames()
     end
 end
 
-local function updateTooltipFuncs()
-    -- let MoveAnything hook these to anchor tooltip elsewhere
-    M.UpdatePlayerTooltips();
-    M.UpdatePetTooltips();
-    M.UpdateTargetTooltips();
-    M.UpdateBossTooltips();
-    updateAuraTooltips();
-end
-
 UnitFrames:RegisterEvent("PLAYER_LOGIN");
-UnitFrames:RegisterEvent("PLAYER_ENTERING_WORLD");
 UnitFrames:RegisterEvent("ADDON_LOADED");
 UnitFrames:SetScript("OnEvent", function(self, event, addon)
-    if event == "PLAYER_ENTERING_WORLD" then
-        CTimerAfter(0.01, updateTooltipFuncs);
-    elseif event == "ADDON_LOADED" and addon == "Blizzard_ArenaUI" then
+    if event == "ADDON_LOADED" and addon == "Blizzard_ArenaUI" then
         hideArenaFrames();
     elseif event == "PLAYER_LOGIN" then
         OmaUFLoadChar();