From 493042b9136e55b40432b01692f4c74214e3e87b Mon Sep 17 00:00:00 2001 From: cha0s Date: Fri, 27 Sep 2024 09:06:14 -0500 Subject: [PATCH] fix: inventory --- app/ecs/components/inventory.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } }