oUF

99.9k Downloads

MOTHER encounter!

Merathilis opened this issue · 5 comments

commented

Hello folks,

on the MOTHER encounter in Uldir are different rooms. If player switch the rooms, they are Line of Sight. With the default Blizzard Frames the player shows as out of range if he is an another room. So you should take account to this.

A user from ElvUI just reported it back the behaviour with the Blizzard Frames.

commented

We use the same logic as Blizzard does, so I'm not sure what the issue is.
Do you/users have the range element enabled?

oUF: range.lua
RaidUI: Blizzard_RaidUI.lua
CompactUnitFrame: CompactUnitFrame.lua

commented

I've talked to @ls- i think he will probably take care of this.

commented

Did I? O_o

I told you to do the same thing Blizz do:

--DEBUG FIXME - We should really try to avoid having OnUpdate on every frame. An event when going in/out of range would be greatly preferred.
function CompactUnitFrame_OnUpdate(self, elapsed)
    CompactUnitFrame_UpdateInRange(self);
    CompactUnitFrame_UpdateDistance(self);
    CompactUnitFrame_CheckReadyCheckDecay(self, elapsed);
end
function CompactUnitFrame_UpdateInRange(frame)
	if ( not frame.optionTable.fadeOutOfRange ) then
		return;
	end

	local inRange, checkedRange = UnitInRange(frame.displayedUnit);
	if ( checkedRange and not inRange ) then	--If we weren't able to check the range for some reason, we'll just treat them as in-range (for example, enemy units)
		frame:SetAlpha(0.55);
	else
		frame:SetAlpha(1);
	end
end
commented

I totally need to add that to my raid and party frames too. Totally forgot about the range element.

commented

Just did the MOTHER fight on normal difficulty, the ranged element worked fine.