Class Inventories
Namespace: OblivionMp.Sdk.Serverside.Items
Assembly: OblivionMp.Sdk.Serverside.dll
Moves item stacks between the item lists of entities, worn copies last.
public sealed class Inventories
Inheritance
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Inventories()
public Inventories()
Methods
Add<T>(T, InventoryEntry)
Adds the item, merged into a matching unworn entry when there is one.
public void Add<T>(T inventory, InventoryEntry item) where T : struct, IInventory
Parameters
inventory T
item InventoryEntry
Type Parameters
T
CountCarried<T>(T, in ItemStackData)
How many items of the stack the inventory holds, not counting worn ones.
public int CountCarried<T>(T inventory, in ItemStackData stack) where T : struct, IInventory
Parameters
inventory T
stack ItemStackData
Returns
Type Parameters
T
TryMove<TFrom, TTo>(TFrom, TTo, in ItemStackData)
Moves the stack from one inventory to another, or returns false and moves nothing when the first holds too few.
public bool TryMove<TFrom, TTo>(TFrom from, TTo to, in ItemStackData stack) where TFrom : struct, IInventory where TTo : struct, IInventory
Parameters
from TFrom
to TTo
stack ItemStackData
Returns
Type Parameters
TFrom
TTo
TryTake<T>(T, in ItemStackData)
Removes the stack, worn copies last, or returns false and removes nothing when the inventory holds too few.
public bool TryTake<T>(T inventory, in ItemStackData stack) where T : struct, IInventory
Parameters
inventory T
stack ItemStackData
Returns
Type Parameters
T