API:PregameSetServerRealmBonuses
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Stores the realm bonus values of the chosen server so that the character select screen can show them.
PregameSetServerRealmBonuses(orderBonus, destructionBonus)
Arguments
- orderBonus
number– Bonus value for Order. The stock UI passes theorderBonusfield from GetServerList.- destructionBonus
number– Bonus value for Destruction. The stock UI passes thedestructionBonusfield from GetServerList.
Returns
Nothing.
Details
- Both values are converted to integers and stored. The client does not check them.
- The call only has an effect in the pregame state while the character select data is set up. Otherwise it does nothing.
- Read the values back with PregameGetServerRealmBonuses.
- The function needs at least two arguments and only reads the last two.
Errors
None besides the generic Invalid Parameters message when an argument is not a number.
Example
From interfacecore/source/serverselectwindow.lua:
-- set the realm bonus values for the server PregameSetServerRealmBonuses( server.orderBonus, server.destructionBonus ) -- and act as if this was the server that was choosen from the server select originally ServerSelectWindow.SelectServerButton()
