summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 46e68ef8..ef90e674 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -175,13 +175,13 @@ void EquipmentWindow::action(const gcn::ActionEvent &event)
if (event.getId() == "unequip" && mSelected > -1)
{
#ifdef TMWSERV_SUPPORT // TODO: merge these!
- player_node->unequipItem(mSelected);
+ Item *item = mEquipment->getEquipment(mSelected);
#else
- Item* item = (mSelected != EQUIP_AMMO_SLOT) ?
+ Item *item = (mSelected != EQUIP_AMMO_SLOT) ?
mInventory->getItem(mEquipment->getEquipment(mSelected)) :
mInventory->getItem(mEquipment->getArrows());
- player_node->unequipItem(item);
#endif
+ player_node->unequipItem(item);
mSelected = -1;
}
}