API:PregameGetRealmLimit
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns which realms the player may create characters in on the current server.
realmLimit = PregameGetRealmLimit()
Arguments
None.
Returns
- realmLimit
number–1,2or3. The stock UI names2REALM_LIMIT_ORDER_ONLYand3REALM_LIMIT_DESTRUCTION_ONLY, and does not limit the realm choice for any other value.
Details
- The client reads the limit from a value it keeps for the account. Any value other than 2 or 3 is returned as 1.
- While the character select data is not set up yet, the function returns 1.
- Outside the pregame state the function returns nothing.
Errors
None.
Example
From interfacecore/source/characterselectwindow.lua (the constants are local to that file):
local REALM_LIMIT_ORDER_ONLY = 2
local REALM_LIMIT_DESTRUCTION_ONLY = 3
-- get the realm limitation for the player
local realmLimit = PregameGetRealmLimit( )
if REALM_LIMIT_ORDER_ONLY == realmLimit
then
-- explain why Destruction cannot be chosen
