API:PregameGetCharacterSelectPage
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns which page of character slots the character select screen shows.
realm, page = PregameGetCharacterSelectPage()
Arguments
None.
Returns
- realm
number– The realm of the shown page, 1 or 2.- page
number– The page within that realm, 1 or 2.
Details
- Outside the pregame state, or before the character select screen is set up, the function returns nothing.
- The values match the arguments of PregameSetCharacterSelectPage, so the result can be passed straight back to it.
Errors
None.
Example
From interfacecore/source/characterselectwindow.lua:
function CharacterSelectWindow.NextCharacterPage()
local rawPage = GetRawCharacterPageIndexFromRealmIndex( PregameGetCharacterSelectPage() ) + 1
if ( rawPage > GetTotalNumRawCharacterPages() )
then
rawPage = 1
end
PregameSetCharacterSelectPage( GetRealmCharacterPageIndexFromRawIndex( rawPage ) )
end
