I am replacing the entire inventory array at load, maintaining slot position. TryToAddItemToInventroy places a single item in the next available space, which would not be suitable for my future purposes.
The Server_RefreshInventorySlots event called from inside the IMC calls the private function RefreshInventorySlots whose comment says “Clear Client Inventory UI and Refresh Client UI From Server Inventory” which is exactly what I want to do.
However, the Client_ClearInventroySlotItems function fails because the IMC UserInterface variable InventoryUI returns None.(Client_ClearInventorySlotItems ->ClearInventorySlotItems)
Somehow, the InventoryUI variable in the IMC is not getting set or is getting reset and I don’t understand why. As far as I can trace the execution flow, it should be fine.
My current thought is that I have not called the refresh inventory slots function in the correct way to make it propagate down to the client. If I understand correctly, the server has no UI and therefore I suspect that the InventoryUI variable on the server would be None by default.