summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-06-22 19:27:06 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-06-22 19:27:06 +0000
commit2318cf879b40b494a63e6f070c6b31123350afe8 (patch)
tree7f3c21877bd97aabd83317a543fd0bfda092026e /src/gui
parent522ddd6b8789f471d27670d6ea21a48371944709 (diff)
downloadmana-2318cf879b40b494a63e6f070c6b31123350afe8.tar.gz
mana-2318cf879b40b494a63e6f070c6b31123350afe8.tar.bz2
mana-2318cf879b40b494a63e6f070c6b31123350afe8.tar.xz
mana-2318cf879b40b494a63e6f070c6b31123350afe8.zip
Fix weapon still shown after unequipping bug.
Diffstat (limited to 'src/gui')
-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)