WoW:API GetBonusBarOffset: Difference between revisions

m
Move page script moved page API GetBonusBarOffset to WoW:API GetBonusBarOffset without leaving a redirect
m (internal link)
m (Move page script moved page API GetBonusBarOffset to WoW:API GetBonusBarOffset without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}}


Returns the current bonus action bar index.
Returns the current bonus action bar index.
{{Code/Begin}}
offset = GetBonusBarOffset()
offset = GetBonusBarOffset()
{{Code/End}}
 


== Parameters ==
== Parameters ==
<big>'''Arguments'''</big>
Arguments:
:NONE
:none
 
<big>'''Returns'''</big>


Returns:
:;offset - Number : The current bonus action bar index.
:;offset - Number : The current bonus action bar index.


Line 24: Line 20:


'''Druid'''
'''Druid'''
* ???
* Caster: 0
* Cat: 1
* Tree of Life: 2
* Bear: 3
* Moonkin: 4


'''Rogue'''
'''Rogue'''
* Normal: 0
* Normal: 0
* Stealthed: 1
* Stealthed: 1
'''Priest'''
* Normal: 0
* Shadowform: 1
'''All Characters'''
* When Possessing a Target: 5


== Example ==
== 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}}
/script ChatFrame1:AddMessage(GetBonusBarOffset())
slotID = (1 + (NUM_ACTIONBAR_PAGES + GetBonusBarOffset() - 1) * NUM_ACTIONBAR_BUTTONS)
 
{{Code/End}}
This will simply print the output of GetBonusBarOffset().  It should change as you change between your bonus bars.
: 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]])
 
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]])
Anonymous user