summaryrefslogtreecommitdiff
path: root/src/itemshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r--src/itemshortcut.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp
index 064fdbc6..eaf16889 100644
--- a/src/itemshortcut.cpp
+++ b/src/itemshortcut.cpp
@@ -20,6 +20,7 @@
*/
#include "configuration.h"
+#include "event.h"
#include "inventory.h"
#include "item.h"
#include "itemshortcut.h"
@@ -72,14 +73,12 @@ void ItemShortcut::useItem(int index)
if (item->isEquipment())
{
if (item->isEquipped())
- Net::getInventoryHandler()->unequipItem(item);
+ item->doEvent("doUnequip");
else
- Net::getInventoryHandler()->equipItem(item);
+ item->doEvent("doEquip");
}
else
- {
- Net::getInventoryHandler()->useItem(item);
- }
+ item->doEvent("doUse");
}
}
}