diff options
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r-- | src/itemshortcut.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp index 1201b23b..a32e50e0 100644 --- a/src/itemshortcut.cpp +++ b/src/itemshortcut.cpp @@ -23,9 +23,10 @@ #include "itemshortcut.h" +#include "configuration.h" +#include "inventory.h" #include "item.h" #include "localplayer.h" -#include "configuration.h" #include "utils/tostring.h" @@ -78,9 +79,8 @@ void ItemShortcut::useItem(int index) { if (mItems[index]) { - Item *item = player_node->searchForItem(mItems[index]); - if (item && item->getQuantity()) { + Item *item = player_node->getInventory()->findItem(mItems[index]); + if (item && item->getQuantity()) player_node->useItem(item); - } } } |