diff --git a/app/ecs/components/inventory.js b/app/ecs/components/inventory.js index b9bad8a..872dfb1 100644 --- a/app/ecs/components/inventory.js +++ b/app/ecs/components/inventory.js @@ -125,6 +125,7 @@ export default class Inventory extends Component { const {$$items, slots} = instance; if (cleared) { for (const slot in cleared) { + delete $$items[slot]; delete slots[slot]; } } @@ -219,7 +220,7 @@ export default class Inventory extends Component { if (recipient.id !== this.entity && this !== recipient.Player.openInventory) { return {}; } - return super.toNet(data); + return super.toNet(recipient, data); } } }