When moving the same kind of an item to another, or picking it up, it should be possible that the item is automatically stacked up to it's maximum amount on one item slot. I'm not sure if that works for move on the official servers, but it would be nice to have even when not.
Example (move):
Move health potion to another health potion -> They are getting merged on one item slot up to 3 pieces
Example (pickup):
Pick up a health potion off the ground, having another health potion in the inventory -> They are getting merged on one item slot up to 3 pieces
The amount of the stacked item is transmitted to the game client in the same field as the durability. Durability is usually only relevant for equippable items - stackable items are not equippable -> works.
It's probably required to extend the ItemDefintion by a flag 'Stackable' or a field 'MaxmiumNumberOfPieces' to be able to define this for a certain kind of item.
When moving the same kind of an item to another, or picking it up, it should be possible that the item is automatically stacked up to it's maximum amount on one item slot. I'm not sure if that works for move on the official servers, but it would be nice to have even when not.
Example (move):
Move health potion to another health potion -> They are getting merged on one item slot up to 3 pieces
Example (pickup):
Pick up a health potion off the ground, having another health potion in the inventory -> They are getting merged on one item slot up to 3 pieces
The amount of the stacked item is transmitted to the game client in the same field as the durability. Durability is usually only relevant for equippable items - stackable items are not equippable -> works.
It's probably required to extend the ItemDefintion by a flag 'Stackable' or a field 'MaxmiumNumberOfPieces' to be able to define this for a certain kind of item.