UnitDuelTeam

Returns the duel team of a WowGameObject.

UnitDuelTeam(--[[(1)]]objectReference) : x, y, z
  1. See Object Reference for more information on possible values.

Example

If two units are on the same team don't continue your rotation on them.

local pdt = UnitDuelTeam('player')
local tdt = UnitDuelTeam('target')
if pdt == tdt then return end