From 2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 12 Jun 2008 09:06:01 +0000 Subject: Merged revisions 3738 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3738 | b_lindeijer | 2007-11-16 00:44:01 +0100 (Fri, 16 Nov 2007) | 3 lines Moved item icon from ItemInfo class to the Item class, so that it can be loaded on demand. Results in faster startup time and reduced memory usage. ........ --- src/itemshortcut.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/itemshortcut.cpp') 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); - } } } -- cgit v1.2.3-70-g09d2