Table of Contents

Class KitPlayerComponent

Namespace
Uncreated.Warfare.Kits
Assembly
Uncreated.Warfare.dll
public class KitPlayerComponent : IPlayerComponent
Inheritance
KitPlayerComponent
Implements
Inherited Members

Properties

ActiveBranch

The branch of the player's current kit.

public Branch ActiveBranch { get; }

Property Value

Branch

ActiveClass

The class of the player's current kit.

public Class ActiveClass { get; }

Property Value

Class

ActiveKitId

The internal name of the player's current kit.

public string? ActiveKitId { get; }

Property Value

string

ActiveKitKey

The primary key of the player's current kit.

public uint? ActiveKitKey { get; }

Property Value

uint?

CachedKit

Get a copy of the kit from the kit cache if it's added. Use GetActiveKitAsync(KitInclude, CancellationToken) to get an up-to-date copy.

public Kit? CachedKit { get; }

Property Value

Kit

Remarks

Guaranteed to have Giveable data.

HasKit

If the player has a kit equipped.

public bool HasKit { get; }

Property Value

bool

HasLowAmmo

If the player's current kit was equipped with low ammo.

public bool HasLowAmmo { get; }

Property Value

bool

LoadoutComparer

Comparer used to sort cached loadouts.

public IComparer<Kit?> LoadoutComparer { get; }

Property Value

IComparer<Kit>

Loadouts

Ordered list of all loadouts including the Cached include level.

public IReadOnlyList<Kit> Loadouts { get; }

Property Value

IReadOnlyList<Kit>

Player

public WarfarePlayer Player { get; }

Property Value

WarfarePlayer

Methods

GetActiveKitAsync(KitInclude, CancellationToken)

Get an up-to-date copy of the actively equipped kit.

public Task<Kit?> GetActiveKitAsync(KitInclude include, CancellationToken token = default)

Parameters

include KitInclude
token CancellationToken

Returns

Task<Kit>

IsKitAccessible(uint)

public bool IsKitAccessible(uint kitPk)

Parameters

kitPk uint

Returns

bool

IsKitFavorited(uint)

public bool IsKitFavorited(uint kitPk)

Parameters

kitPk uint

Returns

bool