Skip to content

Instantly share code, notes, and snippets.

@birdayz
Created June 17, 2017 19:44
Show Gist options
  • Save birdayz/5ab981f2161de1e8d195a201a064a119 to your computer and use it in GitHub Desktop.
Save birdayz/5ab981f2161de1e8d195a201a064a119 to your computer and use it in GitHub Desktop.
function FindBossTarget(bossName)
local i
local bossTarget = nil
if( UnitName("playertarget") == bossName ) then
bossTarget = UnitName("playertargettarget")
else
for i = 1, GetNumRaidMembers(), 1 do
if UnitName("Raid"..i.."target") == bossName then
bossTarget = UnitName("Raid"..i.."targettarget")
break
end
end
end
return bossTarget
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment