Table of Contents

Class PlayerInventory

Namespace
DefaultNamespace
Assembly
Assembly-CSharp.dll
public class PlayerInventory : MonoBehaviour
Inheritance
PlayerInventory
Inherited Members
Extension Methods

Constructors

PlayerInventory()

public PlayerInventory()

Fields

ARTIFACT_SLOT

public const int ARTIFACT_SLOT = 3

Field Value

int

emote

public Item emote

Field Value

Item

itemsToSpawnWith

public Item[] itemsToSpawnWith

Field Value

Item[]

m_photonView

public PhotonView m_photonView

Field Value

PhotonView

m_syncedInitialState

public bool m_syncedInitialState

Field Value

bool

slots

public InventorySlot[] slots

Field Value

InventorySlot[]

Methods

Awake()

public void Awake()

Clear()

public void Clear()

GetItems()

public List<ItemDescriptor> GetItems()

Returns

List<ItemDescriptor>

LateUpdate()

public void LateUpdate()

RPC_AddToSlot(int, byte, byte[])

[PunRPC]
public void RPC_AddToSlot(int slotID, byte itemID, byte[] data)

Parameters

slotID int
itemID byte
data byte[]

RPC_ClearSlot(int)

[PunRPC]
public void RPC_ClearSlot(int slotID)

Parameters

slotID int

RPC_SyncInventoryToOthers(byte[])

[PunRPC]
public void RPC_SyncInventoryToOthers(byte[] inventory)

Parameters

inventory byte[]

SerializeInventory()

public byte[] SerializeInventory()

Returns

byte[]

SyncAddToSlot(int, ItemDescriptor)

public void SyncAddToSlot(int slotID, ItemDescriptor itemDescriptor)

Parameters

slotID int
itemDescriptor ItemDescriptor

SyncClearSlot(int)

public void SyncClearSlot(int slotID)

Parameters

slotID int

SyncInventoryToOthers()

public void SyncInventoryToOthers()

TryAddItem(ItemDescriptor)

public bool TryAddItem(ItemDescriptor item)

Parameters

item ItemDescriptor

Returns

bool

TryAddItem(ItemDescriptor, out InventorySlot)

public bool TryAddItem(ItemDescriptor item, out InventorySlot slot)

Parameters

item ItemDescriptor
slot InventorySlot

Returns

bool

TryGetFeeSlot(out InventorySlot)

public bool TryGetFeeSlot(out InventorySlot slot)

Parameters

slot InventorySlot

Returns

bool

TryGetItemInSlot(int, out ItemDescriptor)

public bool TryGetItemInSlot(int slotID, out ItemDescriptor item)

Parameters

slotID int
item ItemDescriptor

Returns

bool

TryGetSlot(int, out InventorySlot)

public bool TryGetSlot(int slotID, out InventorySlot slot)

Parameters

slotID int
slot InventorySlot

Returns

bool

TryGetSlotWithItem(Item, out InventorySlot)

public bool TryGetSlotWithItem(Item item, out InventorySlot slot)

Parameters

item Item
slot InventorySlot

Returns

bool

TryGetSlotWithItemType(ItemType, out InventorySlot)

public bool TryGetSlotWithItemType(Item.ItemType itemType, out InventorySlot slot)

Parameters

itemType Item.ItemType
slot InventorySlot

Returns

bool

TryRemoveItemFromSlot(int, out ItemDescriptor)

public bool TryRemoveItemFromSlot(int slotID, out ItemDescriptor item)

Parameters

slotID int
item ItemDescriptor

Returns

bool

TryRemoveItemOfType(Item, out InventorySlot)

public bool TryRemoveItemOfType(Item item, out InventorySlot slot)

Parameters

item Item
slot InventorySlot

Returns

bool

UpdateInventory(byte[])

public void UpdateInventory(byte[] inventory)

Parameters

inventory byte[]