summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-11-29 19:58:41 +0000
committerIra Rice <irarice@gmail.com>2008-11-29 19:58:41 +0000
commitd628724789db142c529af8c25e115dd7ea0626a7 (patch)
treec3799c68b66c5dd29dfeb5417520c7cbd0fcffb0 /src/gui/inventorywindow.cpp
parentc6adb930edd2d0a88d7c5ca4edd58d95382a5abf (diff)
downloadmana-client-d628724789db142c529af8c25e115dd7ea0626a7.tar.gz
mana-client-d628724789db142c529af8c25e115dd7ea0626a7.tar.bz2
mana-client-d628724789db142c529af8c25e115dd7ea0626a7.tar.xz
mana-client-d628724789db142c529af8c25e115dd7ea0626a7.zip
Imported patch that Fate made on TMW which which changes the item
container to guarantee that the inventory window always reports what the player has correctly, getting rid of the stale item references that could occur from time to time.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index cbce0ee3..a8b20d40 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -73,7 +73,7 @@ InventoryWindow::InventoryWindow():
mWeightLabel->setPosition(8, 8);
mSlots = "Slots: " +
toString(player_node->getInventory()->getNumberOfSlotsUsed()) +
- "/" + toString(player_node->getInventory()->getSize());
+ "/" + toString(player_node->getInventory()->getSize() - 2);
mSlotsLabel = new TextBox();
mItemEffectLabel = new TextBox();
@@ -113,7 +113,7 @@ void InventoryWindow::logic()
mSlots = "Slots: " +
toString(player_node->getInventory()->getNumberOfSlotsUsed()) +
- "/" + toString(player_node->getInventory()->getSize());
+ "/" + toString(player_node->getInventory()->getSize() - 2);
draw();
}