7e1fc64 - Dim raid frames in another phase
authorAleksi Blinnikka <aleksi.blinnikka@iki.fi>
Sat, 23 May 2020 19:15:05 +0000
committerAleksi Blinnikka <aleksi.blinnikka@iki.fi>
Sat, 23 May 2020 19:15:05 +0000
kehys/updater.lua

index d7d3cb5..68015bb 100644 (file)
@@ -14,6 +14,7 @@ local UnitGetIncomingHeals, UnitGetTotalAbsorbs = UnitGetIncomingHeals, UnitGetT
 local UnitIsDeadOrGhost, UnitIsConnected = UnitIsDeadOrGhost, UnitIsConnected;
 local UnitGetTotalHealAbsorbs = UnitGetTotalHealAbsorbs;
 local InCombatLockdown, IsResting = InCombatLockdown, IsResting;
 local UnitIsDeadOrGhost, UnitIsConnected = UnitIsDeadOrGhost, UnitIsConnected;
 local UnitGetTotalHealAbsorbs = UnitGetTotalHealAbsorbs;
 local InCombatLockdown, IsResting = InCombatLockdown, IsResting;
+local UnitInRange, UnitInPhase = UnitInRange, UnitInPhase;
 
 local dispelcolor = addon.Colors.OverlayColorDispel;
 local charmcolor = addon.Colors.OverlayColorCharm;
 
 local dispelcolor = addon.Colors.OverlayColorDispel;
 local charmcolor = addon.Colors.OverlayColorCharm;
@@ -45,7 +46,8 @@ function addon.FrameUpdate(frame)
     -- range check (doesn't have an event) frames can be marked constantly visible
     if not frame.constant then
         local inrange, checked = UnitInRange(unit);
     -- range check (doesn't have an event) frames can be marked constantly visible
     if not frame.constant then
         local inrange, checked = UnitInRange(unit);
-        if checked and not inrange then
+        local inphase = UnitInPhase(unit);
+        if (checked and not inrange) or not inphase then
             frame:SetAlpha(0.55);
         else
             frame:SetAlpha(1);
             frame:SetAlpha(0.55);
         else
             frame:SetAlpha(1);