UnitIsTapDenied

From Warcraft Wiki
Jump to navigation Jump to search

Indicates a mob is no longer eligible for tap.

unitIsTapDenied = UnitIsTapDenied(unit)

Arguments

unit
string : UnitToken

Returns

unitIsTapDenied
boolean

Example

The following code in FrameXML {TargetFrame_CheckFaction at Townlong-Yak} grays out the target frame when the target is tap denied:

function TargetFrame_CheckFaction (self)
	if ( not UnitPlayerControlled(self.unit) and UnitIsTapDenied(self.unit) ) then
		self.nameBackground:SetVertexColor(0.5, 0.5, 0.5);
		if ( self.portrait ) then
			self.portrait:SetVertexColor(0.5, 0.5, 0.5);
		end
	else
		self.nameBackground:SetVertexColor(UnitSelectionColor(self.unit));
		if ( self.portrait ) then
			self.portrait:SetVertexColor(1.0, 1.0, 1.0);
		end
	end
    -- the function continues with activities not relevant to this example
end

Patch changes

Legion Patch 7.0.3 (2016-07-19): Added, replacing UnitIsTapped().