3f90dc3 - Remove most healabsorb, remove concatenation from event handlers
authorAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Thu, 15 Mar 2018 09:13:07 +0000
committerAleksi Blinnikka <aleksi.blinnikka@gmail.com>
Thu, 15 Mar 2018 09:13:07 +0000
OmaUF/Events.lua
OmaUF/PetFrame.lua
OmaUF/PlayerFrame.lua
OmaUF/TargetFrame.lua

index 8121ae6..59b8592 100644 (file)
@@ -251,6 +251,10 @@ local function updateStatus(frame, unit)
     end
 end
 
     end
 end
 
+local pvpIcons = {
+    Alliance = "Interface\\TARGETINGFRAME\\UI-PVP-Alliance",
+    Horde = "Interface\\TARGETINGFRAME\\UI-PVP-Horde"
+};
 local function updatePVP(frame, unit)
     if UnitIsPVPFreeForAll(unit) then
         frame.pvp:SetTexture("Interface\\TARGETINGFRAME\\UI-PVP-FFA");
 local function updatePVP(frame, unit)
     if UnitIsPVPFreeForAll(unit) then
         frame.pvp:SetTexture("Interface\\TARGETINGFRAME\\UI-PVP-FFA");
@@ -266,7 +270,7 @@ local function updatePVP(frame, unit)
                     faction = "Horde";
                 end
             end
                     faction = "Horde";
                 end
             end
-            frame.pvp:SetTexture("Interface\\TARGETINGFRAME\\UI-PVP-"..faction);
+            frame.pvp:SetTexture(pvpIcons[faction]);
             frame.pvp:Show();
         else
             frame.pvp:Hide();
             frame.pvp:Show();
         else
             frame.pvp:Hide();
index a4d8fa5..67d433b 100644 (file)
@@ -14,7 +14,6 @@ local bgColor = Settings.BgColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
-local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Pet.Width, Settings.Pet.Height;
 local anchorX, anchorY = Settings.Pet.AnchorX, Settings.Pet.AnchorY;
 -- placeholders with visible values when error happens
 local width, height = Settings.Pet.Width, Settings.Pet.Height;
 local anchorX, anchorY = Settings.Pet.AnchorX, Settings.Pet.AnchorY;
 -- placeholders with visible values when error happens
index 960591d..38f19cf 100644 (file)
@@ -16,7 +16,6 @@ local bgColor = Settings.BgColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
-local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Player.Width, Settings.Player.Height;
 local anchorX, anchorY = Settings.Player.AnchorX, Settings.Player.AnchorY;
 -- placeholders with visible values when error happens
 local width, height = Settings.Player.Width, Settings.Player.Height;
 local anchorX, anchorY = Settings.Player.AnchorX, Settings.Player.AnchorY;
 -- placeholders with visible values when error happens
index a4c2c58..1c0893e 100644 (file)
@@ -17,7 +17,6 @@ local bgColor = Settings.BgColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
 local healthColor = Settings.HealthColor;
 local shieldColor = Settings.ShieldColor;
 local shieldhlColor = Settings.ShieldhlColor;
-local healabsorbColor = Settings.HealabsorbColor;
 local width, height = Settings.Target.Width, Settings.Target.Height;
 local anchorX, anchorY = Settings.Target.AnchorX, Settings.Target.AnchorY;
 -- placeholders with visible values when error happens
 local width, height = Settings.Target.Width, Settings.Target.Height;
 local anchorX, anchorY = Settings.Target.AnchorX, Settings.Target.AnchorY;
 -- placeholders with visible values when error happens