Reply
Thread Tools Display Modes
Unread 06-01-12, 12:19 AM   #1
Solsis00
Claw of Regulos
 
Solsis00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2012
Posts: 13
Role number

Looking for a way to acquire the role (spec) a character is currently in without them changing. Example on an initial login or reloadui. I am looking for the number 1-6 that returns what role set they are in. Used to Inspect.TEMPORARY.role would give this but it is recommended to no longer be used. Anyone have any suggestions?

The Scenario: My addon sets up keybinds based upon the role you are currently in (1 - 6). I set the roleset variable to 1 or whatever by default so it is a valid number and not nil. But lets say you've loaded my addon for the very first time and you are currently in your DPS role which is number 2. This causes a mismatch that could eventually fix itself and be overlooked if you use the addon long enough to discover it and reset a 2nd time your keybinds by switching roles and then switching back. It will get the right role from the Event.TEMPORARY.role at that point.

Thanks in advance.

~Solsis
Solsis00 is offline   Reply With Quote
Unread 06-02-12, 04:34 AM   #2
Myrroddin
Endless Captain
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 50
Inspect.TEMPORARY.Role is the recommended (and only) choice right now. The official documentation states that this inspector will be removed at a later date, but that date has not been provided.
Myrroddin is offline   Reply With Quote
Unread 06-02-12, 04:41 AM   #3
Solsis00
Claw of Regulos
 
Solsis00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2012
Posts: 13
Thanks for the response Myrroddin. That's what I was finding. I went ahead and implemented it and set it up yesterday and it is working fine. Wish they'd just add it to the Unit.Details.

Thanks again.


Quote:
Originally Posted by Myrroddin View Post
Inspect.TEMPORARY.Role is the recommended (and only) choice right now. The official documentation states that this inspector will be removed at a later date, but that date has not been provided.
Solsis00 is offline   Reply With Quote
Reply

Go BackRiftui » Developer Discussions » General Authoring Discussion » Role number

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off