WoW:API GetMirrorTimerInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(created article ~~~~)
 
(+ Events)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}}
 
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc)
Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc)
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
  timer, initial, maxvalue, scale, paused, label = GetMirrorTimerInfo(id)
  local timer, value, maxvalue, scale, paused, label = GetMirrorTimerInfo(i)
 


== Arguments ==
== Arguments ==
<!-- List each argument, together with its type -->
; id : Number - timer index, from 1 to MIRRORTIMER_NUMTIMERS (3 as of 3.2). In general, the following correspondence holds: 1 = Fatigue, 2 = Breath, 3 = Feign Death.
:("i")
 
:;arg1 : String - Number of bar
 


== Returns ==  
== Returns ==  
; timer : String - A string identifying timer type; "EXHAUSTION", "BREATH", and "FEIGNDEATH", or "UNKNOWN" indicating that the timer corresponding to that index is not currently active, and other return values are invalid.
; initial : Number - Value of the timer when the it started.
; maxvalue : Number - Maximum value of the timer.
; scale : Number - Change in timer value per second.
; paused : Flag - 0 if the timer is currently running, a value greater than zero if it is not.
; label : String - Localized timer name.


(to be filled)
== Notes ==
<!-- List each return value, together with its type -->
* Calling the function with an out-of-range index results in an error. The syntax specification in the error text is invalid; this function may not be called with "BREATH", "EXHAUSTION" etc as arguments.
:isTrue, retVal1, retVal2  <!-- remove this line if it's just one value -->
* The current value of the timer may be retrieved using {{api|GetMirrorTimerProgress}}("timer"). Most timers tend to count down to zero, at which point something bad happens.
 
:;isTrue : Boolean - is it true
:;retVal1 : String - is it true
:;retVal2 : Number - is it true


== Further Information ==
== Related events ==
For further information you may want to have a look at Quartz addon -> Mirror
* {{api|t=e|MIRROR_TIMER_START}} is fired when a timer becomes active.
* {{api|t=e|MIRROR_TIMER_STOP}} is fired when a timer becomes inactive.
* {{api|t=e|MIRROR_TIMER_PAUSE}} is fired when a timer is paused.

Revision as of 00:03, 8 November 2009

WoW API < GetMirrorTimerInfo

Gives information about the mirror bar. (Spirit release, exhaustion/fatigue, etc)

timer, initial, maxvalue, scale, paused, label = GetMirrorTimerInfo(id)

Arguments

id
Number - timer index, from 1 to MIRRORTIMER_NUMTIMERS (3 as of 3.2). In general, the following correspondence holds: 1 = Fatigue, 2 = Breath, 3 = Feign Death.

Returns

timer
String - A string identifying timer type; "EXHAUSTION", "BREATH", and "FEIGNDEATH", or "UNKNOWN" indicating that the timer corresponding to that index is not currently active, and other return values are invalid.
initial
Number - Value of the timer when the it started.
maxvalue
Number - Maximum value of the timer.
scale
Number - Change in timer value per second.
paused
Flag - 0 if the timer is currently running, a value greater than zero if it is not.
label
String - Localized timer name.

Notes

  • Calling the function with an out-of-range index results in an error. The syntax specification in the error text is invalid; this function may not be called with "BREATH", "EXHAUSTION" etc as arguments.
  • The current value of the timer may be retrieved using GetMirrorTimerProgress("timer"). Most timers tend to count down to zero, at which point something bad happens.

Related events