API:RemoveTomeAlert
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Removes an entry from the player's list of recent Tome of Knowledge alerts.
RemoveTomeAlert(alertId)
Arguments
- alertId
number– ID of the alert, as given in the tome alert data (alertData.idin the stock UI).
Returns
Nothing.
Details
- The client keeps the 20 most recent tome alerts. If
alertIdis in that list, it is removed and the later entries move up. If it is not in the list, nothing happens. - When an alert is removed:
- the updated list is sent to the server;
GameData.Player.tomeAlertsDirtyis set totrue;SystemData.Events.TOME_ALERTS_UPDATEDis raised twice in a row.
- Nothing happens if the player object does not exist yet.
- Exactly one argument must be passed.
Errors
None besides the generic Invalid Parameters message when the argument is missing or not a number.
Example
Clearing all alerts, from default/ea_tomeofknowledge/source/tomewindow_titlepage.lua:
-- Clear all of the Tome Alerts
for index, id in ipairs( ids )
do
RemoveTomeAlert( id )
end
