<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ACooldownDisplaySetCooldown</id>
	<title>API:CooldownDisplaySetCooldown - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ACooldownDisplaySetCooldown"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:CooldownDisplaySetCooldown&amp;action=history"/>
	<updated>2026-10-17T18:28:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:CooldownDisplaySetCooldown&amp;diff=30263&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:CooldownDisplaySetCooldown&amp;diff=30263&amp;oldid=prev"/>
		<updated>2026-10-16T19:41:47Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=CooldownDisplay}}&lt;br /&gt;
Starts the cooldown shown by a CooldownDisplay window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CooldownDisplaySetCooldown(displayName, remaining, total)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;displayName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of a CooldownDisplay window.&lt;br /&gt;
;remaining : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Seconds of cooldown left.&lt;br /&gt;
;total : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Full length of the cooldown in seconds.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The client stores &amp;lt;code&amp;gt;total&amp;lt;/code&amp;gt; and the time at which the cooldown ends (now + &amp;lt;code&amp;gt;remaining&amp;lt;/code&amp;gt;), rebuilds the display&amp;#039;s shape and schedules it for update.&lt;br /&gt;
* The stock UI passes &amp;lt;code&amp;gt;0, 0&amp;lt;/code&amp;gt; to clear a cooldown.&lt;br /&gt;
* If the window exists but is not a CooldownDisplay, the call does nothing and raises no error.&lt;br /&gt;
* The error message is built from a format string, so its text is the same as the other &amp;#039;&amp;#039;does not exist&amp;#039;&amp;#039; errors.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;CooldownDisplaySetCooldown&amp;#039;: Window %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_actionbars/source/actionbutton.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.m_Cooldown, self.m_MaxCooldown = GetHotbarCooldown (self:GetSlot ())&lt;br /&gt;
...&lt;br /&gt;
cooldownFrame:Show (true)&lt;br /&gt;
CooldownDisplaySetCooldown (cooldownFrame:GetName (), self.m_Cooldown, self.m_MaxCooldown)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearing it, from &amp;lt;code&amp;gt;ea_moralewindow/source/moralewindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CooldownDisplaySetCooldown (self.m_Windows[COOLDOWN]:GetName (), 0, 0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:ActionButtonGroupSetTimer|ActionButtonGroupSetTimer]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>