I did something similar for my game, gotta admit it gets complicated. I will tell you what I did and get some ideas for yourself.
- Made a “Base item” actor to hold item information. Later on I made some more base items for tools, weapons, food etc (since they will have different information/actions).
- I made an enum with these names: “Inventory”, “Hotbar”, “Equipment”, “Remote Inventory”, that helped me put each item to the correct array.
- Made 3 arrays, Hotbar, Inventory, Equipment with RepNotify to update all icons and such.
- Made a small “Slot”, a UI box to hold my item icon and information. In it, I have a “Item Reference” variable with RepNotify, so each item the item changes, it updates the icon, amount of item etc.
- Then to transfer items, I made a structure with location data, the actor that owns the item, the location(from the enum with Inventory, Hotbar, Equipment), and a “Slot ID”. I send that to the server and ask to transfer the item.
Maybe are a lot more going on but these are some basics that I did, and I keep improving things, I am still in the beginning myself, making a survival game. Good luck, hope I give you a few ideas.