Commit 78a491f9 authored by Ivaria's avatar Ivaria
Browse files

Fixed range detection for out of phase units

parent 9edcb6ca
......@@ -1033,16 +1033,21 @@ local function VUHDO_updateAllRange()
VUHDO_updateHealthBarsFor(tUnit, 4); -- VUHDO_UPDATE_DEBUFF
end
-- Check if unit is in range
if sIsRangeKnown then
tIsInRange = tInfo["connected"] and
(1 == IsSpellInRange(sRangeSpell, tUnit) or
((tInfo["dead"] or tInfo["charmed"]) and tInfo["baseRange"]) or "player" == tUnit or
(VUHDO_isSpecialUnit(tUnit) and CheckInteractDistance(tUnit, 1)));
-- Check if unit is phased
if UnitIsWarModePhased(tUnit) or not UnitInPhase(tUnit) then
tIsInRange = false;
else
tIsInRange = tInfo["connected"] and
(tInfo["baseRange"] or
(VUHDO_isSpecialUnit(tUnit) and CheckInteractDistance(tUnit, 1)));
-- Check if unit is in range
if sIsRangeKnown then
tIsInRange = tInfo["connected"] and
(1 == IsSpellInRange(sRangeSpell, tUnit) or
((tInfo["dead"] or tInfo["charmed"]) and tInfo["baseRange"]) or "player" == tUnit or
(VUHDO_isSpecialUnit(tUnit) and CheckInteractDistance(tUnit, 1)));
else
tIsInRange = tInfo["connected"] and
(tInfo["baseRange"] or
(VUHDO_isSpecialUnit(tUnit) and CheckInteractDistance(tUnit, 1)));
end
end
if tInfo["range"] ~= tIsInRange then
......
......@@ -279,12 +279,14 @@ local VUHDO_isTargetInRange = VUHDO_isTargetInRange;
-- returns wether or not a unit is in range
-- returns whether or not a unit is in range
function VUHDO_isInRange(aUnit)
if "player" == aUnit then
return true;
elseif VUHDO_isSpecialUnit(aUnit) then
return VUHDO_isTargetInRange(aUnit);
elseif UnitIsWarModePhased(aUnit) or not UnitInPhase(aUnit) then
return false;
elseif (sIsGuessRange) then
return UnitInRange(aUnit);
else
......
......@@ -20,6 +20,7 @@ Bugfixes:
-- Fixed display of debuff tooltips after zone change
-- Fixed incoming heal and shield bar height when there is no mana bar
-- Fixed export of custom debuffs in profile string
-- Fixed range detection for out of phase units
Improvements:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment