WoW:API GetSummonFriendCooldown: Difference between revisions

bp
(Created page with '{{subst: :Help:API Function articles/Preload}}')
 
(bp)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
Returns information about the cooldown time of the players summon friend ability.
Returns information about the cooldown time of the RaF Summon Friend ability.
<pre>start, duration = GetSummonFriendCooldown()</pre>
start, duration = GetSummonFriendCooldown()
 
== Arguments ==
None.


== Returns ==
== Returns ==
:start, duration
;start : Number - The value of {{api|GetTime}}() at the moment the cooldown began, 0 if the ability is ready
;start : Number - The value of [[API_GetTime | GetTime]]() at the moment the cooldown began, 0 if the ability is ready
;duration : Number - The length of the cooldown in seconds, 0 if the ability is ready
;duration : Number - The length of the cooldown in seconds, 0 if the ability is ready


== Example ==
== Example ==
<pre>local start, duration = GetSummonFriendCooldown()
The snippet below prints the remaining time of the cooldown in seconds.
local timeleft = start + duration - GetTime()
local start, duration = GetSummonFriendCooldown()
print(timeleft)</pre>
local timeleft = start + duration - GetTime()
 
print(timeleft)
<big>'''Result'''</big>
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->
 
Remaining time of the cooldown in seconds.