Table of Contents

Interface IKitAccessService

Namespace
Uncreated.Warfare.Kits
Assembly
Uncreated.Warfare.dll
public interface IKitAccessService

Methods

GetAccessAsync(CSteamID, uint, CancellationToken)

Get the access type a player has for a kit.

Task<KitAccessType?> GetAccessAsync(CSteamID steam64, uint primaryKey, CancellationToken token = default)

Parameters

steam64 CSteamID

The player's Steam64 ID.

primaryKey uint

The primary key of the kit.

token CancellationToken

Returns

Task<KitAccessType?>

The type of access if they have access, otherwise null.

GetOwnedKitKeysAsync(CSteamID, CancellationToken)

Get a list of the primary keys of all kits a player owns.

Task<IList<uint>> GetOwnedKitKeysAsync(CSteamID steam64, CancellationToken token = default)

Parameters

steam64 CSteamID

The player's Steam64 ID.

token CancellationToken

Returns

Task<IList<uint>>

HasAccessAsync(CSteamID, uint, CancellationToken)

Check if a player has access to a kit.

Task<bool> HasAccessAsync(CSteamID steam64, uint primaryKey, CancellationToken token = default)

Parameters

steam64 CSteamID

The player's Steam64 ID.

primaryKey uint

The primary key of the kit.

token CancellationToken

Returns

Task<bool>

true if they have access to the kit, otherwise false.

UpdateAccessAsync(CSteamID, uint, KitAccessType?, CSteamID, CancellationToken)

Set the access type a player has for a kit.

Task<bool> UpdateAccessAsync(CSteamID steam64, uint primaryKey, KitAccessType? access, CSteamID instigator, CancellationToken token = default)

Parameters

steam64 CSteamID

The player's Steam64 ID.

primaryKey uint

The primary key of the kit.

access KitAccessType?

The access to give the player. If this is null, the player's access will be removed

instigator CSteamID
token CancellationToken

Returns

Task<bool>

true if the player's access was updated, otherwise false if no changes were made.

UpdateAccessBulkAsync(CSteamID, uint[], KitAccessType?, CSteamID, CancellationToken)

Set the access type a player has for multiple kits at once.

Task<bool[]> UpdateAccessBulkAsync(CSteamID steam64, uint[] primaryKeys, KitAccessType? access, CSteamID instigator, CancellationToken token = default)

Parameters

steam64 CSteamID

The player's Steam64 ID.

primaryKeys uint[]

List of primary keys to apply changes to.

access KitAccessType?

The access to give the player. If this is null, the player's access will be removed

instigator CSteamID
token CancellationToken

Returns

Task<bool[]>

true if the player's access was updated for at least one kit, otherwise false if no changes were made.