Class FallbackItemDistributionService
public class FallbackItemDistributionService : IItemDistributionService
- Inheritance
-
FallbackItemDistributionService
- Implements
- Inherited Members
Constructors
FallbackItemDistributionService(IKitItemResolver, DroppedItemTracker)
public FallbackItemDistributionService(IKitItemResolver itemResolver, DroppedItemTracker droppedItemTracker)
Parameters
itemResolverIKitItemResolverdroppedItemTrackerDroppedItemTracker
Methods
ClearInventory<TState>(WarfarePlayer, TState)
Clear the inventory of player.
public 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<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
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<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
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