diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-06-22 19:27:06 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-06-22 19:27:06 +0000 |
commit | 2318cf879b40b494a63e6f070c6b31123350afe8 (patch) | |
tree | 7f3c21877bd97aabd83317a543fd0bfda092026e /src/gui/inventory.cpp | |
parent | 522ddd6b8789f471d27670d6ea21a48371944709 (diff) | |
download | mana-client-2318cf879b40b494a63e6f070c6b31123350afe8.tar.gz mana-client-2318cf879b40b494a63e6f070c6b31123350afe8.tar.bz2 mana-client-2318cf879b40b494a63e6f070c6b31123350afe8.tar.xz mana-client-2318cf879b40b494a63e6f070c6b31123350afe8.zip |
Fix weapon still shown after unequipping bug.
Diffstat (limited to 'src/gui/inventory.cpp')
-rw-r--r-- | src/gui/inventory.cpp | 9 |
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) |