Returns whether two unit references are to the same unit. Useful for determining whether a composite unitID
(such as raid19target
) also refers to a basic unitID
; see example.
See also Unit functions.
Signature:
isSame
=
UnitIsUnit("unit",
"unit")
Arguments:
Returns:
isSame
- Returns 1 if the two references are to the same unit; otherwise nil (1nil
)
Examples:
if (UnitIsUnit("targettarget","player")) -- watch out! your target is also targeting you! end