From 501f9934731114562c3659918d9d7b39625eb7b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 10 Mar 2012 20:20:36 +0300 Subject: Allow add skills to shortcuts bar (same as for magic and script commands). --- src/itemshortcut.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/itemshortcut.cpp') 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 . */ +#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); + } } } -- cgit v1.2.3-70-g09d2