WoW:API GetBonusBarOffset: Difference between revisions

m
Move page script moved page API GetBonusBarOffset to WoW:API GetBonusBarOffset without leaving a redirect
mNo edit summary
 
m (Move page script moved page API GetBonusBarOffset to WoW:API GetBonusBarOffset without leaving a redirect)
 
(8 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<center>'''GetBonusBarOffset''' - ''Documentation by [[User:Flickering|Flickering]]''</center>
{{wowapi}}


Determine which page of bonus actions to show.
Returns the current bonus action bar index.
offset = GetBonusBarOffset()


offset = GetBonusBarOffset()
== Parameters ==
== Parameters ==
=== Arguments ===
Arguments:
:()
:none
 
Returns:
:;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'''
* Caster: 0
* Cat: 1
* Tree of Life: 2
* Bear: 3
* Moonkin: 4
 
'''Rogue'''
* Normal: 0
* Stealthed: 1
 
'''Priest'''
* Normal: 0
* Shadowform: 1
 
'''All Characters'''
* When Possessing a Target: 5
 
== Example ==
 
/script ChatFrame1:AddMessage(GetBonusBarOffset())
 
This will simply print the output of GetBonusBarOffset().  It should change as you change between your bonus bars.


=== Returns ===
slotID = (1 + (NUM_ACTIONBAR_PAGES + GetBonusBarOffset() - 1) * NUM_ACTIONBAR_BUTTONS)
:offset


:;offset : Numeric - 0 if the player has no current bonus actions, otherwise the bonus action page to show, starting at 1 (This is for warriors, rogues, druids, etc, who have multiple action bars for their different forms/stances). The first slot of the current action bar is (1 + (NUM_ACTIONBAR_PAGES + offset - 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]])
----
__NOTOC__
{{Template:WoW API}}
[[Category:API Functions|GetBonusBarOffset]]
[[Category:API Action Functions|GetBonusBarOffset]]
Anonymous user