From 2318cf879b40b494a63e6f070c6b31123350afe8 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Wed, 22 Jun 2005 19:27:06 +0000 Subject: Fix weapon still shown after unequipping bug. --- src/gui/inventory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp index 36bea6cf..9d2669e5 100644 --- a/src/gui/inventory.cpp +++ b/src/gui/inventory.cpp @@ -160,6 +160,15 @@ void InventoryWindow::unequipItem(int index) WFIFOW(2) = net_w_value(index); WFIFOSET(4); while ((out_size > 0)) flush(); + + // Tidy equipment directly to avoid weapon still shown bug, by instance + for (int i = 0; i < 8; i++) + { + if ( equipmentWindow->getInventoryIndex(i) == index ) + { + equipmentWindow->removeEquipment(i); + } + } } void InventoryWindow::action(const std::string &eventId) -- cgit v1.2.3-70-g09d2