Table of Contents

Class KitLayoutService

Namespace
Uncreated.Warfare.Kits
Assembly
Uncreated.Warfare.dll
public class KitLayoutService
Inheritance
KitLayoutService
Inherited Members

Constructors

KitLayoutService(ILogger<KitLayoutService>, DroppedItemTracker, IKitsDbContext)

public KitLayoutService(ILogger<KitLayoutService> logger, DroppedItemTracker droppedItemTracker, IKitsDbContext dbContext)

Parameters

logger ILogger<KitLayoutService>
droppedItemTracker DroppedItemTracker
dbContext IKitsDbContext

Methods

ResetLayoutAsync(CSteamID, uint, CancellationToken)

Remove all item transformations for the given player for a kit.

public Task<bool> ResetLayoutAsync(CSteamID player, uint kitPrimaryKey, CancellationToken token = default)

Parameters

player CSteamID
kitPrimaryKey uint
token CancellationToken

Returns

Task<bool>

If any rows were removed.

SaveLayoutAsync(WarfarePlayer, CancellationToken)

Save the player's current inventory as the layout for their equipped kit.

public Task<bool> SaveLayoutAsync(WarfarePlayer player, CancellationToken token = default)

Parameters

player WarfarePlayer
token CancellationToken

Returns

Task<bool>

TryReverseLayoutTransformations(WarfarePlayer, Kit)

Undoes the player's inventory by moving items back to where the kit has them layed out.

public void TryReverseLayoutTransformations(WarfarePlayer player, Kit kitWithItems)

Parameters

player WarfarePlayer
kitWithItems Kit