m
Spacing
No edit summary |
m (Spacing) |
||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Returns the current bonus action bar index. | |||
{{Code/Begin}} | |||
offset = GetBonusBarOffset() | |||
{{Code/End}} | |||
== Parameters == | == Parameters == | ||
== | <big>'''Arguments'''</big> | ||
:NONE | |||
<big>'''Returns'''</big> | |||
:;offset - Number : The current bonus action bar index. | |||
== Details == | |||
Certain classes have "bonus action bars" for their class-specific actions, e.g. the various [[Stance|Stance Bars]] for the [[Warrior]] class. GetBonusBarOffset() returns the index of the current action bar that is being displayed. Note that simply scrolling through the action bar pages won't change the output; only switching to the different bonus bars. Each class has their own way of indexing their bonus bars. | |||
'''Warrior''' | |||
* Battle Stance: 1 | |||
* Defensive Stance: 2 | |||
* Berserker Stance: 3 | |||
'''Druid''' | |||
* ??? | |||
'''Rogue''' | |||
* Normal: 0 | |||
* Stealthed: 1 | |||
== | == Example == | ||
: | {{Code/Begin}} | ||
/script ChatFrame1:AddMessage(GetBonusBarOffset()) | |||
{{Code/End}} | |||
:This will simply print the output of GetBonusBarOffset(). It should change as you change between your bonus bars. | |||
{{Code/Begin}} | |||
slotID = (1 + (NUM_ACTIONBAR_PAGES + GetBonusBarOffset() - 1) * NUM_ACTIONBAR_BUTTONS) | |||
{{Code/End}} | |||
{{ | : Here, slotID will be the action slot number for the first slot of the current bonus bar. For example, for a Warrior in Defensive Stance, <tt>slotID = 85</tt>, which is correct.[http://www.wowwiki.com/ActionSlot] | ||