Class Save
- Namespace
- AO
- Assembly
- CoreAssembly.dll
Save is a core engine system to work with persistent data for the game.
public static class Save
- Inheritance
-
Save
- Inherited Members
Methods
ForceSavePlayer(Player)
Force save a player's data.
public static void ForceSavePlayer(Player player)
Parameters
player
Player
Remarks
Save functions may only be called from the server.
GetDouble(Player, string, double)
Get a double from the player's save data.
public static double GetDouble(Player player, string id, double defult = 0)
Parameters
Returns
Remarks
Save functions may only be called from the server.
GetGameInt(string, long)
Get the latest fetched value of a game scoped int
public static extern long GetGameInt(string id, long defult = 0)
Parameters
Returns
GetGameString(string, string)
Get a game scoped string save value
public static extern string GetGameString(string id, string defult = "")
Parameters
Returns
GetInt(Player, string, int)
Get an int from the player's save data.
public static int GetInt(Player player, string id, int defult = 0)
Parameters
Returns
Remarks
Save functions may only be called from the server.
GetString(Player, string, string)
Get a string from the player's save data.
public static string GetString(Player player, string id, string defult = "")
Parameters
Returns
Remarks
Save functions may only be called from the server.
IncrementGameInt(string, long, bool)
Increment a game scoped int (atomic) Negative values are allowed
public static extern void IncrementGameInt(string id, long value, bool optimisticUpdate = true)
Parameters
OrderedGet(string, string, double, Action<SaveEntry>)
Get a value for specific key in an ordered set.
public static extern void OrderedGet(string setId, string key, double defult, Action<SaveEntry> callback)
Parameters
OrderedGetAll(string, int, int, Action<SaveEntry[]>)
Get all values in an ordered set.
public static extern void OrderedGetAll(string setId, int offset, int limit, Action<SaveEntry[]> callback)
Parameters
OrderedSet(string, string, double)
Set a value for specific key in an ordered set.
public static extern void OrderedSet(string setId, string key, double value)
Parameters
SetDouble(Player, string, double)
Set a double in the player's save data.
public static void SetDouble(Player player, string id, double value)
Parameters
Remarks
Save functions may only be called from the server.
SetGameString(string, string)
Set a game scoped string save value. (note) strings are not atomic, so you can get a different value than you set
public static extern void SetGameString(string id, string value)
Parameters
SetInt(Player, string, int)
Set an int in the player's save data.
public static void SetInt(Player player, string id, int value)
Parameters
Remarks
Save functions may only be called from the server.
SetString(Player, string, string)
Set a string in the player's save data.
public static void SetString(Player player, string id, string value)
Parameters
Remarks
Save functions may only be called from the server.