Interface IDataStorageWrapper
- Namespace
- Archipelago.MultiClient.Net.Helpers
- Assembly
- Archipelago.MultiClient.Net.dll
Methods for working with read-only data storage sets
public interface IDataStorageWrapper
Methods
GetClientStatus(int?, int?)
Retrieves the client status for the specified player slot and team
ArchipelagoClientState GetClientStatus(int? slot = null, int? team = null)
Parameters
slot
int?the slot id of the player to request the status for, defaults to the current player's slot if left empty
team
int?the team id of the player to request the status for, defaults to the current player's team if left empty
Returns
- ArchipelagoClientState
The status of the client or null if the slot or team does not exist
GetClientStatusAsync(Action<ArchipelagoClientState>, int?, int?)
Retrieves the client status for the specified player slot and team
void GetClientStatusAsync(Action<ArchipelagoClientState> onStatusRetrieved, int? slot = null, int? team = null)
Parameters
onStatusRetrieved
Action<ArchipelagoClientState>the method to call with the retrieved client status
slot
int?the slot id of the player to request the status for, defaults to the current player's slot if left empty
team
int?the team id of the player to request the status for, defaults to the current player's team if left empty
GetHints(int?, int?)
Retrieves all unlocked hints for the specified player slot and team
Hint[] GetHints(int? slot = null, int? team = null)
Parameters
slot
int?the slot id of the player to request hints for, defaults to the current player's slot if left empty
team
int?the team id of the player to request hints for, defaults to the current player's team if left empty
Returns
- Hint[]
An array of unlocked hints or null if the slot or team does not exist
GetHintsAsync(Action<Hint[]>, int?, int?)
Retrieves all unlocked hints for the specified player slot and team
void GetHintsAsync(Action<Hint[]> onHintsRetrieved, int? slot = null, int? team = null)
Parameters
onHintsRetrieved
Action<Hint[]>the method to call with the retrieved hints
slot
int?the slot id of the player to request hints for, defaults to the current player's slot if left empty
team
int?the team id of the player to request hints for, defaults to the current player's team if left empty
GetItemNameGroups(string)
Retrieves the defined item name groups for the specified game
Dictionary<string, string[]> GetItemNameGroups(string game = null)
Parameters
game
stringthe game name to request item name groups for, defaults to the current player's game if left empty
Returns
- Dictionary<string, string[]>
An Dictionary with item group names for keys and an array of item names as value
GetItemNameGroupsAsync(Action<Dictionary<string, string[]>>, string)
Retrieves the defined item name groups for the specified game
void GetItemNameGroupsAsync(Action<Dictionary<string, string[]>> onItemNameGroupsRetrieved, string game = null)
Parameters
onItemNameGroupsRetrieved
Action<Dictionary<string, string[]>>the method to call with the retrieved item name groups
game
stringthe game name to request item name groups for, defaults to the current player's game if left empty
GetLocationNameGroups(string)
Retrieves the defined location name groups for the specified game
Dictionary<string, string[]> GetLocationNameGroups(string game = null)
Parameters
game
stringthe game name to request location name groups for, defaults to the current player's game if left empty
Returns
- Dictionary<string, string[]>
An Dictionary with location group names for keys and an array of location names as value
GetLocationNameGroupsAsync(Action<Dictionary<string, string[]>>, string)
Retrieves the defined location name groups for the specified game
void GetLocationNameGroupsAsync(Action<Dictionary<string, string[]>> onLocationNameGroupsRetrieved, string game = null)
Parameters
onLocationNameGroupsRetrieved
Action<Dictionary<string, string[]>>the method to call with the retrieved location name groups
game
stringthe game name to request location name groups for, defaults to the current player's game if left empty
GetRaceMode()
Retrieves the server's race mode setting. false for disabled or unavailable, true for enabled
bool GetRaceMode()
Returns
- bool
The race mode setting. false for disabled or unavailable, true for enabled
GetRaceModeAsync(Action<bool>)
Retrieves the server's race mode setting. false for disabled or unavailable, true for enabled
void GetRaceModeAsync(Action<bool> onRaceModeRetrieved)
Parameters
GetSlotData(int?)
Retrieves the custom slot data for the specified slot
Dictionary<string, object> GetSlotData(int? slot = null)
Parameters
slot
int?the slot id of the player to request slot data for, defaults to the current player's slot if left empty
Returns
- Dictionary<string, object>
An Dictionary with string keys, and custom defined values, the keys and values differ per game
GetSlotDataAsync(Action<Dictionary<string, object>>, int?)
Retrieves the custom slot data for the specified slot
void GetSlotDataAsync(Action<Dictionary<string, object>> onSlotDataRetrieved, int? slot = null)
Parameters
onSlotDataRetrieved
Action<Dictionary<string, object>>the method to call with the retrieved slot data
slot
int?the slot id of the player to request slot data for, defaults to the current player's slot if left empty
GetSlotDataAsync<T>(Action<T>, int?)
Retrieves the custom slot data for the specified slot
void GetSlotDataAsync<T>(Action<T> onSlotDataRetrieved, int? slot = null) where T : class
Parameters
onSlotDataRetrieved
Action<T>the method to call with the retrieved slot data
slot
int?the slot id of the player to request slot data for, defaults to the current player's slot if left empty
Type Parameters
T
The type to convert the slot data to
GetSlotData<T>(int?)
Retrieves the custom slot data for the specified slot
T GetSlotData<T>(int? slot = null) where T : class
Parameters
slot
int?The slot ID of the player ot request slot data for, defaults to the current player's slot if left empty
Returns
- T
The slot data, converted to a modeled object of the specified type
Type Parameters
T
The type to convert the slot data to
TrackClientStatus(Action<ArchipelagoClientState>, bool, int?, int?)
Sets a callback to be called with all updates to the client status for the specified player slot and team
void TrackClientStatus(Action<ArchipelagoClientState> onStatusUpdated, bool retrieveCurrentClientStatus = true, int? slot = null, int? team = null)
Parameters
onStatusUpdated
Action<ArchipelagoClientState>the method to call with the updated hints
retrieveCurrentClientStatus
boolshould the current status be retrieved or just the updates
slot
int?the slot id of the player to request the status for, defaults to the current player's slot if left empty
team
int?the team id of the player to request the status for, defaults to the current player's team if left empty
TrackHints(Action<Hint[]>, bool, int?, int?)
Sets a callback to be called with all updates to the unlocked hints for the specified player slot and team
void TrackHints(Action<Hint[]> onHintsUpdated, bool retrieveCurrentlyUnlockedHints = true, int? slot = null, int? team = null)
Parameters
onHintsUpdated
Action<Hint[]>the method to call with the updated hints
retrieveCurrentlyUnlockedHints
boolshould the currently unlocked hints be retrieved or just the updates
slot
int?the slot id of the player to request hints for, defaults to the current player's slot if left empty
team
int?the team id of the player to request hints for, defaults to the current player's team if left empty