3f90dc3 - Remove most healabsorb, remove concatenation from event handlers
[wowui.git] / OmaUF / Events.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();