Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:PregameGetPreSelectedServerRealm

From RoR Wiki

UI Lua API · Pregame functions
Version: WAR 1.4.8

Returns the realm choice stored with PregameSetPreSelectedServerRealm.

realm = PregameGetPreSelectedServerRealm()

Arguments

None.

Returns

realm
number – The stored value. The stock UI treats 2 as Order only and 3 as Destruction only.

Details

  • 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:

-- if there is a pre-selected server limitation we will hide the un-shown side's info box
local preSelectedServerRealm = PregameGetPreSelectedServerRealm( )
if REALM_LIMIT_ORDER_ONLY == preSelectedServerRealm
then
    WindowSetShowing("CharacterSelectInfoBoxRight", false)
elseif REALM_LIMIT_DESTRUCTION_ONLY == preSelectedServerRealm
then
    -- ...

See also