diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-10 20:20:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-10 20:20:36 +0300 |
commit | 501f9934731114562c3659918d9d7b39625eb7b5 (patch) | |
tree | afefc8debeff97d40141a342135da8e7ab5cb9bb /src/itemshortcut.cpp | |
parent | 307818fecbd1f258c668a1667e76e950e9d22622 (diff) | |
download | manaverse-501f9934731114562c3659918d9d7b39625eb7b5.tar.gz manaverse-501f9934731114562c3659918d9d7b39625eb7b5.tar.bz2 manaverse-501f9934731114562c3659918d9d7b39625eb7b5.tar.xz manaverse-501f9934731114562c3659918d9d7b39625eb7b5.zip |
Allow add skills to shortcuts bar (same as for magic and script commands).
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); + } } } |