Interface IItemDistributionService
public interface IItemDistributionService
Methods
ClearInventory(WarfarePlayer)
Clear the inventory of player.
int ClearInventory(WarfarePlayer player)
Parameters
playerWarfarePlayer
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
playerWarfarePlayerstateTStateAllows 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
itemsIEnumerable<IItem>playerWarfarePlayer
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
itemsIEnumerable<IItem>playerWarfarePlayerstateTStateAllows 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
itemsIEnumerable<IItem>playerWarfarePlayer
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
itemsIEnumerable<IItem>playerWarfarePlayerstateTStateAllows 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