summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/inventorywindow.cpp11
-rw-r--r--src/resources/itemdb.cpp1
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 9c8e860c..c6b93723 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -251,9 +251,16 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
if (event.getSource() == mItems && item && isDoubleClick(item->getInvIndex()))
{
-
if (isMainInventory() && item->getInfo().getActivatable())
- action(gcn::ActionEvent(mUseButton, mUseButton->getActionEventId()));
+ {
+ action(gcn::ActionEvent(mUseButton,
+ mUseButton->getActionEventId()));
+ }
+ else if (isMainInventory() && item->getInfo().getEquippable())
+ {
+ action(gcn::ActionEvent(mEquipButton,
+ mEquipButton->getActionEventId()));
+ }
}
if (event.getButton() == gcn::MouseEvent::RIGHT)
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 95fdae2f..4db7b085 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -355,6 +355,7 @@ void TaItemDB::load()
// Everything not unusable or usable is equippable by the Ta type system.
itemInfo->mEquippable = itemInfo->mType != ITEM_UNUSABLE
&& itemInfo->mType != ITEM_USABLE;
+ itemInfo->mActivatable = itemInfo->mType == ITEM_USABLE;
// Load nano description
std::vector<std::string> effect;