<?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%3AGetHotbarData</id>
	<title>API:GetHotbarData - 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%3AGetHotbarData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetHotbarData&amp;action=history"/>
	<updated>2026-10-17T18:49:25Z</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:GetHotbarData&amp;diff=30405&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:GetHotbarData&amp;diff=30405&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:01Z</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=Hotbar}}&lt;br /&gt;
Returns the action in a hotbar slot and its current state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
actionType, actionId, isEnabled, isTargetValid, isBlocked = GetHotbarData(slot)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;slot : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Hotbar slot, 1 to 132 (&amp;lt;code&amp;gt;GameData.HOTBAR_TOTAL_SLOT_COUNT&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;actionType : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Type of the action, a &amp;lt;code&amp;gt;GameData.PlayerActions&amp;lt;/code&amp;gt; value. 0 for an empty slot.&lt;br /&gt;
;actionId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Id of the action (ability id, item id, macro slot, …). 0 for an empty slot.&lt;br /&gt;
;isEnabled : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – State flag of the slot. The stock action buttons use it as &amp;quot;enabled&amp;quot;.&lt;br /&gt;
;isTargetValid : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – State flag of the slot. The stock action buttons use it as &amp;quot;target valid&amp;quot;.&lt;br /&gt;
;isBlocked : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – State flag of the slot. The stock action buttons use it as &amp;quot;blocked&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The three flags are kept by the client per hotbar entry and read here; the function does not run the ability checks itself.&lt;br /&gt;
* For a slot outside 1 to 132 the type and id are 0 and all three flags are &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If there is no player object, or the Lua state is not available, the function returns nothing.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when the argument is missing or not a number.&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;
if( actionType == nil or actionId == nil )&lt;br /&gt;
then&lt;br /&gt;
    actionType, actionId, self.m_IsEnabled, self.m_IsTargetValid, self.m_IsBlocked = GetHotbarData( slot )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:SetHotbarData|SetHotbarData]]&lt;br /&gt;
* [[API:GetHotbarIcon|GetHotbarIcon]]&lt;br /&gt;
* [[API:GetHotbarCooldown|GetHotbarCooldown]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>