Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API UnitSetRole
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Stub/API}} {{wowapi}} == Synopsis == Sets the player role in the group as Tank, Dps, Healer or None. UnitSetRole(target,role) == Arguments == :;target:String - The affected group member. i.e. "player" or player name :;role:String - The role for the player. (known values "TANK", "HEALER", "DAMAGER", "NONE") == Returns == Unknown == Example == local name="Imtarr"; if ( playerInfo[name].tank == 1 ) then UnitSetRole(name,"TANK"); elseif ( playerInfo[name].heals == 1 ) then UnitSetRole(name,"HEALER"); elseif ( playerInfo[name].mDps == 1 ) then UnitSetRole(name,"DAMAGER"); elseif ( playerInfo[name].rDps == 1 ) then UnitSetRole(name,"DAMAGER"); end == Results == Sets the player role to the value specified. Note that the command will not allow roles to be assigned to classes that are not considered to be capable of fulfilling that role. i.e. It will not allow a Hunter to be given the role of TANK. A system message will be sent to the members of the group. "Healdude is now <<healTexture>> Healer. (Changed by Imtarr.)"
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Stub/API
(
edit
)
Template:Stub/Box
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)