Table of Contents

Interface IItemDistributionService

Namespace
Uncreated.Warfare.Util.Inventory
Assembly
Uncreated.Warfare.dll
public interface IItemDistributionService

Methods

ClearInventory(WarfarePlayer)

Clear the inventory of player.

int ClearInventory(WarfarePlayer player)

Parameters

player WarfarePlayer

Returns

int

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

ClearInventory<TState>(WarfarePlayer, TState)

Clear the inventory of player.

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(IEnumerable<IItem>, WarfarePlayer)

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

int GiveItems(IEnumerable<IItem> items, WarfarePlayer player)

Parameters

items IEnumerable<IItem>
player WarfarePlayer

Returns

int

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

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

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

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(IEnumerable<IItem>, WarfarePlayer)

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

int RestockItems(IEnumerable<IItem> items, WarfarePlayer player)

Parameters

items IEnumerable<IItem>
player WarfarePlayer

Returns

int

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

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

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

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