Table of Contents

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

player Player
id string
defult double

Returns

double

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

id string
defult long

Returns

long

GetGameString(string, string)

Get a game scoped string save value

public static extern string GetGameString(string id, string defult = "")

Parameters

id string
defult string

Returns

string

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

player Player
id string
defult int

Returns

int

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

player Player
id string
defult string

Default value to return if the key is not found.

Returns

string

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

id string
value long
optimisticUpdate bool

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

setId string
key string
defult double
callback Action<SaveEntry>

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

setId string
offset int
limit int
callback Action<SaveEntry[]>

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

setId string
key string
value double

SetDouble(Player, string, double)

Set a double in the player's save data.

public static void SetDouble(Player player, string id, double value)

Parameters

player Player
id string
value double

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

id string
value string

SetInt(Player, string, int)

Set an int in the player's save data.

public static void SetInt(Player player, string id, int value)

Parameters

player Player
id string
value int

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

player Player
id string
value string

Remarks

Save functions may only be called from the server.