→Example: upgraded code blocks
(Added Druid info - may not be complete.) |
(→Example: upgraded code blocks) |
||
| Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} | ||
Returns the current bonus action bar index. | Returns the current bonus action bar index. | ||
offset = GetBonusBarOffset() | |||
offset = GetBonusBarOffset() | |||
== Parameters == | == Parameters == | ||
| Line 33: | Line 30: | ||
== Example == | == Example == | ||
/script ChatFrame1:AddMessage(GetBonusBarOffset()) | |||
slotID = (1 + (NUM_ACTIONBAR_PAGES + GetBonusBarOffset() - 1) * NUM_ACTIONBAR_BUTTONS) | |||
This will simply print the output of GetBonusBarOffset(). It should change as you change between your bonus bars. | |||
slotID = (1 + (NUM_ACTIONBAR_PAGES + GetBonusBarOffset() - 1) * NUM_ACTIONBAR_BUTTONS) | |||
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. ([[ActionSlot]]) | |||