KyrahAbattoir / KyrahGame-public
Public repository, readme and wiki.
Page History

Container

Kyrah Abattoir edited this page on 16 Sep 2017

Clone this wiki locally

Containers are an Item Subgroup that has its own inventory.

Because Items are not directly networked, the client has two "special" inventory storage tied to the left and right hand.

These inventory storage are set by the server through syncListStructs whenever an item of the subtype "container" is set for that hand slot.

Example:

  • Player picks up cardboard box (server command pick up )
  • Server sets active hand slot to ItemContainer matching itemID, server delete world object and set Item into Inventory slot.
  • Server looks up ItemContainer.Content and populates the relevant Player Subinventory.

Note: This method makes a few things easier because of the use of syncliststructs, however it is NOT private and that could be an issue of telling too much informations to other players.