summaryrefslogtreecommitdiff
path: root/src/itemshortcut.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-08-26 16:55:05 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-08-26 16:55:05 +0200
commit6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d (patch)
tree4e6e178095ac8cf89dc0dba4f532913891305436 /src/itemshortcut.cpp
parentee8f131b49bb9b1d66cac3840b3c566eb49bcf3f (diff)
downloadmana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.gz
mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.bz2
mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.xz
mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.zip
Merged testing branch into master.
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r--src/itemshortcut.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp
index eaf16889..ef4f6387 100644
--- a/src/itemshortcut.cpp
+++ b/src/itemshortcut.cpp
@@ -29,6 +29,8 @@
#include "net/inventoryhandler.h"
#include "net/net.h"
+#include "resources/iteminfo.h"
+
#include "utils/stringutils.h"
ItemShortcut *itemShortcut;
@@ -70,7 +72,7 @@ void ItemShortcut::useItem(int index)
Item *item = PlayerInfo::getInventory()->findItem(mItems[index]);
if (item && item->getQuantity())
{
- if (item->isEquipment())
+ if (item->getInfo().getEquippable())
{
if (item->isEquipped())
item->doEvent("doUnequip");
@@ -78,7 +80,9 @@ void ItemShortcut::useItem(int index)
item->doEvent("doEquip");
}
else
+ {
item->doEvent("doUse");
+ }
}
}
}