<?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%3APregameGetRealmLimit</id>
	<title>API:PregameGetRealmLimit - 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%3APregameGetRealmLimit"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:PregameGetRealmLimit&amp;action=history"/>
	<updated>2026-10-17T04:19:18Z</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:PregameGetRealmLimit&amp;diff=30641&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:PregameGetRealmLimit&amp;diff=30641&amp;oldid=prev"/>
		<updated>2026-10-16T19:47: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=Pregame}}&lt;br /&gt;
Returns which realms the player may create characters in on the current server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
realmLimit = PregameGetRealmLimit()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;realmLimit : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;. The stock UI names &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;REALM_LIMIT_ORDER_ONLY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;REALM_LIMIT_DESTRUCTION_ONLY&amp;lt;/code&amp;gt;, and does not limit the realm choice for any other value.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The client reads the limit from a value it keeps for the account. Any value other than 2 or 3 is returned as 1.&lt;br /&gt;
* While the character select data is not set up yet, the function returns 1.&lt;br /&gt;
* Outside the pregame state the function returns nothing.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;interfacecore/source/characterselectwindow.lua&amp;lt;/code&amp;gt; (the constants are local to that file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local REALM_LIMIT_ORDER_ONLY = 2&lt;br /&gt;
local REALM_LIMIT_DESTRUCTION_ONLY = 3&lt;br /&gt;
&lt;br /&gt;
-- get the realm limitation for the player&lt;br /&gt;
local realmLimit = PregameGetRealmLimit( )&lt;br /&gt;
if REALM_LIMIT_ORDER_ONLY == realmLimit&lt;br /&gt;
then&lt;br /&gt;
    -- explain why Destruction cannot be chosen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:PregameGetPreSelectedServerRealm|PregameGetPreSelectedServerRealm]]&lt;br /&gt;
* [[API:PregameGetServerRealmBonuses|PregameGetServerRealmBonuses]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>