API:BuyBankSlots
From RoR Wiki
UI Lua API · Item functions
Version: WAR 1.4.8
Asks the server to sell the player the next set of bank slots.
BuyBankSlots()
Arguments
None.
Returns
Nothing.
Details
- The request is only sent when all of these are true:
- there is a player object;
- the player still has bank slots left to buy;
- the cost of the next set of bank slots is not more than the player's money as the client last received it.
- Otherwise the call does nothing. No message is shown.
- The client sends the cost it knows for the purchase with the request. The new slots appear when the server answers.
- There is no confirmation in the client. The stock bank window shows a confirmation dialog and checks
GameData.Player.moneyitself before calling. - Any arguments are ignored.
Errors
None.
Example
From default/ea_bankwindow/source/bankwindow.lua:
if( GameData.Player.money < newSlotsCost )
then
DialogManager.MakeOneButtonDialog( GetString( StringTables.Default.DIALOG_CANNOT_BUY_BANK_SLOTS), GetString( StringTables.Default.LABEL_OKAY ) )
return
end
BuyBankSlots()
