跳到主要内容
版本:Next

Struct ContainerTemplate

Namespace: OblivionMp.Sdk.Serverside.Archetypes
Assembly: OblivionMp.Sdk.Serverside.dll

A container's record from the game files, kept on the server only.

public readonly struct ContainerTemplate : IArchetype, IArchetypeQueryable, IEntityShape

Implements​

IArchetype, IArchetypeQueryable, IEntityShape

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties​

BarterGold​

public int BarterGold { get; set; }

Property Value​

int

IsOwnedByMerchant​

public bool IsOwnedByMerchant { get; set; }

Property Value​

bool

IsRollPending​

public bool IsRollPending { get; set; }

Property Value​

bool

IsValid​

public bool IsValid { get; }

Property Value​

bool

ItemsCount​

public int ItemsCount { get; }

Property Value​

int

MerchantRefId​

public uint MerchantRefId { get; set; }

Property Value​

uint

RefId​

public uint RefId { get; set; }

Property Value​

uint

Respawns​

public bool Respawns { get; set; }

Property Value​

bool

Methods​

AddItems(in BaseContainerItem)​

public void AddItems(in BaseContainerItem value)

Parameters​

value BaseContainerItem

As<T>()​

public T As<T>() where T : struct, IArchetypeQueryable

Returns​

T

Type Parameters​

T

ClearItems()​

public void ClearItems()

ContainsItems(in BaseContainerItem)​

public bool ContainsItems(in BaseContainerItem value)

Parameters​

value BaseContainerItem

Returns​

bool

GetItems()​

public NativeList<BaseContainerItem>.ReadOnly GetItems()

Returns​

NativeList<BaseContainerItem>.ReadOnly

GetItems(int)​

public BaseContainerItem GetItems(int index)

Parameters​

index int

Returns​

BaseContainerItem

InsertItems(int, in BaseContainerItem)​

public void InsertItems(int index, in BaseContainerItem value)

Parameters​

index int

value BaseContainerItem

Is<T>()​

public bool Is<T>() where T : struct, IArchetypeQueryable

Returns​

bool

Type Parameters​

T

Keep()​

This entity, which it already is: a loop over this shape hands over the shape itself.

public ContainerTemplate Keep()

Returns​

ContainerTemplate

Remarks​

Here so taking something out of a loop reads the same whichever way the loop walks. Whether a shape is walked by chunk follows from what it includes, which the call site cannot see and which changes when an include does.

RemoveAtItems(int)​

public BaseContainerItem RemoveAtItems(int index)

Parameters​

index int

Returns​

BaseContainerItem

SetItems(in NativeList<BaseContainerItem>)​

public void SetItems(in NativeList<BaseContainerItem> value)

Parameters​

value NativeList<BaseContainerItem>

SetItems(int, in BaseContainerItem)​

public void SetItems(int index, in BaseContainerItem value)

Parameters​

index int

value BaseContainerItem

TryAs<T>(out T)​

public bool TryAs<T>(out T archetype) where T : struct, IArchetypeQueryable

Parameters​

archetype T

Returns​

bool

Type Parameters​

T

  • Properties
    • BarterGold
    • IsOwnedByMerchant
    • IsRollPending
    • IsValid
    • ItemsCount
    • MerchantRefId
    • RefId
    • Respawns
  • Methods
    • AddItems(in BaseContainerItem)
    • As<T>()
    • ClearItems()
    • ContainsItems(in BaseContainerItem)
    • GetItems()
    • GetItems(int)
    • InsertItems(int, in BaseContainerItem)
    • Is<T>()
    • Keep()
    • RemoveAtItems(int)
    • SetItems(in NativeList<BaseContainerItem>)
    • SetItems(int, in BaseContainerItem)
    • TryAs<T>(out T)