summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/inventory.cpp9
1 files changed, 9 insertions, 0 deletions
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)