diff options
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r-- | src/itemshortcut.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp index fedb92257..9cce55eb7 100644 --- a/src/itemshortcut.cpp +++ b/src/itemshortcut.cpp @@ -20,13 +20,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "itemshortcut.h" + #include "configuration.h" #include "inventory.h" #include "item.h" -#include "itemshortcut.h" #include "playerinfo.h" #include "spellmanager.h" +#include "gui/skilldialog.h" + #include "net/inventoryhandler.h" #include "net/net.h" @@ -142,10 +145,14 @@ void ItemShortcut::useItem(int index) } } } - else if (spellManager) + else if (itemId < SKILL_MIN_ID && spellManager) { spellManager->useItem(itemId); } + else if (skillDialog) + { + skillDialog->useItem(itemId); + } } } |