Create an Enumerator for Item Types. Weapon, Attachment, Gear[bp,vest,helmet], Consumables, Ammo, Throwables etc.
Create a Parent class for loot items. Add an Enum for Item Type and a Name var for the specific item ID.
Create a Data Table for each Item Type, use the “Name” var as the “Row Name”. Having type dependent data tables will reduce seek times. You can then use Switch (Item Type] → Get Data Table Row[name] to retrieve item data locally. If you’re heading down the PubG path, then you’ll want this type of separation. They have roughly 127 different loot items and counting.
Also, anything spawned in the world is a simple static mesh class. I don’t drop or spawn full data SK weapons on the ground. For weapons (guns) I have a sm variant class that holds a class reference var for the sk variant and vice versa.
My Items are broken down into the Type structure (enum item type). I derive a child class from the parent for each. So Parent → Weapon, Parent-> attachment etc.
Loot item parent class is abstract. All derived child parents are abstract.
Loot item → Weapon_sm : WepSM_M416, WepSM_Beryl…
Loot item → Weapon_sk : WepSK_M416, WepSK_Beryl…
Loot item → Attachment : Att_reddot, Att_holo…
Loot item → Gear : Gr_vest-l1, Gr_vest-l2, Gr_vest-l3…
etc
All authoritative management of inventory happens on the server. Server adds, drops, spawns, destroys. client proxies only animate the process.
Hope this was helpful.