Class LocationCheckHelper
- Namespace
- Archipelago.MultiClient.Net.Helpers
- Assembly
- Archipelago.MultiClient.Net.dll
public class LocationCheckHelper : ILocationCheckHelper
- Inheritance
-
LocationCheckHelper
- Implements
- Inherited Members
Properties
AllLocations
All locations of the slot that's is connected to, both already checked and unchecked
public ReadOnlyCollection<long> AllLocations { get; }
Property Value
AllLocationsChecked
All checked locations of the slot that's is connected to
public ReadOnlyCollection<long> AllLocationsChecked { get; }
Property Value
AllMissingLocations
All unchecked locations of the slot that's is connected to
public ReadOnlyCollection<long> AllMissingLocations { get; }
Property Value
Methods
CompleteLocationChecks(params long[])
Submit the provided location ids as checked locations.
public void CompleteLocationChecks(params long[] ids)
Parameters
ids
long[]Location ids which have been checked.
Exceptions
- ArchipelagoSocketClosedException
The websocket connection is not alive.
CompleteLocationChecksAsync(Action<bool>, params long[])
Submit the provided location ids as checked locations.
public void CompleteLocationChecksAsync(Action<bool> onComplete, params long[] ids)
Parameters
onComplete
Action<bool>Action to be called when the async send is completed.
ids
long[]Location ids which have been checked.
Exceptions
- ArchipelagoSocketClosedException
The websocket connection is not alive.
GetLocationIdFromName(string, string)
Get the Id of a location from its name. Useful when a game knows its locations by name but not by Archipelago Id.
public long GetLocationIdFromName(string game, string locationName)
Parameters
game
stringThe game to look up the locations from
locationName
stringThe name of the location to check the Id for. Must match the contents of the datapackage.
Returns
- long
Returns the locationId for the location name that was given or -1 if no location was found.
GetLocationNameFromId(long, string)
Get the name of a location from its id. Useful when receiving a packet and it is necessary to find the name of the location.
public string GetLocationNameFromId(long locationId, string game = null)
Parameters
locationId
longThe Id of the location to look up the name for. Must match the contents of the datapackage.
game
stringThe game to lookup the location id for, if null will look in the game the local player is connected to. Negative location ids are always looked up under the Archipelago game
Returns
- string
Returns the locationName for the provided locationId, or null if no such location is found.
ScoutLocationsAsync(Action<Dictionary<long, ScoutedItemInfo>>, HintCreationPolicy, params long[])
Ask the server for the items which are present in the provided location ids.
public void ScoutLocationsAsync(Action<Dictionary<long, ScoutedItemInfo>> callback = null, HintCreationPolicy hintCreationPolicy = HintCreationPolicy.None, params long[] ids)
Parameters
callback
Action<Dictionary<long, ScoutedItemInfo>>An action to run once the server responds to the scout packet. If the argument to the action is null then the server responded with an InvalidPacket response.
hintCreationPolicy
HintCreationPolicySpecified if and how an official hint should be created on the server.
ids
long[]The locations ids which are to be scouted.
Remarks
Repeated calls of this method before a LocationInfo packet is received will cause the stored callback to be overwritten with the most recent call. It is recommended you chain calls to this method within the callbacks themselves or call this only once.
Exceptions
- ArchipelagoSocketClosedException
The websocket connection is not alive.
ScoutLocationsAsync(Action<Dictionary<long, ScoutedItemInfo>>, bool, params long[])
Ask the server for the items which are present in the provided location ids.
public void ScoutLocationsAsync(Action<Dictionary<long, ScoutedItemInfo>> callback = null, bool createAsHint = false, params long[] ids)
Parameters
callback
Action<Dictionary<long, ScoutedItemInfo>>An action to run once the server responds to the scout packet. If the argument to the action is null then the server responded with an InvalidPacket response.
createAsHint
boolIf true, creates a free hint for these locations.
ids
long[]The locations ids which are to be scouted.
Remarks
Repeated calls of this method before a LocationInfo packet is received will cause the stored callback to be overwritten with the most recent call. It is recommended you chain calls to this method within the callbacks themselves or call this only once.
Exceptions
- ArchipelagoSocketClosedException
The websocket connection is not alive.
ScoutLocationsAsync(Action<Dictionary<long, ScoutedItemInfo>>, params long[])
Ask the server for the items which are present in the provided location ids.
public void ScoutLocationsAsync(Action<Dictionary<long, ScoutedItemInfo>> callback = null, params long[] ids)
Parameters
callback
Action<Dictionary<long, ScoutedItemInfo>>An action to run once the server responds to the scout packet. If the argument to the action is null then the server responded with an InvalidPacket response.
ids
long[]The locations ids which are to be scouted.
Remarks
Repeated calls of this method before a LocationInfo packet is received will cause the stored callback to be overwritten with the most recent call. It is recommended you chain calls to this method within the callbacks themselves or call this only once.
Exceptions
- ArchipelagoSocketClosedException
The websocket connection is not alive.
Events
CheckedLocationsUpdated
event fired when new locations are checked, this can be because a location was checked remotely checked due to an !collect or locations you checked in an earlier session
public event LocationCheckHelper.CheckedLocationsUpdatedHandler CheckedLocationsUpdated