View Single Post
12-25-09, 01:02 AM   #5
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Originally Posted by Manaman View Post
But you say I just do:

Code:
AM_Tank = UnitGroupRolesAssigned("player")
without needing to separate out the isHeal or isDPS responses somehow? As I said above, I am new to lua. Thanks.
Yes that's correct. As an example, you could also do:

Code:
local a, b, c = UnitGroupRolesAssigned("player")
if a == true then
    AM_Tank = true
end
The point being that UnitGroupRolesAssigned returns three boolean values, the first one is true if the player is a tank, the second one is true if the player is a healer, the third one is true if the player is DPS. The above code simplifies to:

Code:
local a, b, c = UnitGroupRolesAssigned("player")
AM_Tank = a
and then further to what I posted above.
  Reply With Quote