How can i get a random item(item definition?)(or N random items) from the InventoryManager (this is basically the random pickup script... but i really do not want to copy my entire inventoryDB to the Inventory on the gameobjects MainCollection ...
I would like to restrict the items somewhat (maybe items that have a sell price between two values or something along those lines(more realistically on ItemLevel, or ItemRarity...) Im pretty sure i can figure this part out if I can figure out how to get a random item from the inventorymanager.
so far the best i can come up with is
but that is definitely not the item.ID, and im not sure how to use that to get a specific definition from an index...
I would like to restrict the items somewhat (maybe items that have a sell price between two values or something along those lines(more realistically on ItemLevel, or ItemRarity...) Im pretty sure i can figure this part out if I can figure out how to get a random item from the inventorymanager.
so far the best i can come up with is
Code:
uint index = (uint)Random.Range(0, InventorySystemManager.ItemDefinitionRegister.Count);
but that is definitely not the item.ID, and im not sure how to use that to get a specific definition from an index...