Hi.
I cant seem to figure it out.
I have a known UID for an ItemContainer but I cant seem to access the contents of the ItemContainer. Is it even possible?
(This is code only to test it out)
private void RetrieveItems(BasePlayer player, uint UID)
{
ItemContainer TempInv = new ItemContainer();
TempInv.FindContainer(UID);
foreach (Item k in TempInv.itemList.ToArray())
{
k.MoveToContainer(player.inventory.containerBelt);
}
}
private void StoreItems(BasePlayer player)
{
ItemContainer TempInv = new ItemContainer();
TempInv.entityOwner = player;
TempInv.capacity = 100;
TempInv.isServer = true;
TempInv.allowedContents = ItemContainer.ContentsType.Generic;
TempInv.GiveUID();
foreach (Item k in player.inventory.containerBelt.itemList.ToArray()) {
k.MoveToContainer(TempInv);
}
Puts($"{TempInv.uid}");
RetrieveItems(player, TempInv.uid);
}