Table of Contents

Class FallbackItemDistributionService

Namespace
Uncreated.Warfare.Util.Inventory
Assembly
Uncreated.Warfare.dll
public class FallbackItemDistributionService : IItemDistributionService
Inheritance
FallbackItemDistributionService
Implements
Inherited Members

Constructors

FallbackItemDistributionService(IKitItemResolver, DroppedItemTracker)

public FallbackItemDistributionService(IKitItemResolver itemResolver, DroppedItemTracker droppedItemTracker)

Parameters

itemResolver IKitItemResolver
droppedItemTracker DroppedItemTracker

Methods

ClearInventory<TState>(WarfarePlayer, TState)

Clear the inventory of player.

public int ClearInventory<TState>(WarfarePlayer player, TState state) where TState : IItemClearState

Parameters

player WarfarePlayer
state TState

Allows for intercepting clearing specific items.

Returns

int

The number of items and clothes removed from the player's inventory.

Type Parameters

TState

GiveItems<TState>(IEnumerable<IItem>, WarfarePlayer, TState)

Equip a player with a set of items after clearing it.

public int GiveItems<TState>(IEnumerable<IItem> items, WarfarePlayer player, TState state) where TState : IItemDistributionState

Parameters

items IEnumerable<IItem>
player WarfarePlayer
state TState

Allows for intercepting adding specific items and modifying their contents.

Returns

int

The number of items and clothes added to the player's inventory.

Type Parameters

TState

RestockItems<TState>(IEnumerable<IItem>, WarfarePlayer, TState)

Give new items and update the states of existing items but don't clear any.

public int RestockItems<TState>(IEnumerable<IItem> items, WarfarePlayer player, TState state) where TState : IItemDistributionState

Parameters

items IEnumerable<IItem>
player WarfarePlayer
state TState

Allows for intercepting adding specific items and modifying their contents.

Returns

int

The number of items and clothes modified or added to the player's inventory.

Type Parameters

TState