diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-14 19:25:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-14 19:25:00 +0300 |
commit | 8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f (patch) | |
tree | bda5dc8f66925aed8a1671a9d806a407af7bef3f /src/actions/commands.cpp | |
parent | f3781554bf946a22ac307d1c8fe6154db05bbf2e (diff) | |
download | ManaVerse-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.gz ManaVerse-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.bz2 ManaVerse-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.xz ManaVerse-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.zip |
Add skill cast type option in skills window.
Can be changed, but for now unused.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r-- | src/actions/commands.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 0d3111b59..98a66df0e 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -33,6 +33,8 @@ #include "being/homunculusinfo.h" #include "being/playerinfo.h" +#include "enums/resources/skill/casttype.h" + #include "gui/viewport.h" #include "gui/popups/popupmenu.h" @@ -1592,4 +1594,31 @@ impHandler(showSkillLevels) return true; } +impHandler(showSkillType) +{ + const std::string args = event.args; + if (args.empty()) + return false; + const SkillInfo *restrict const skill = skillDialog->getSkill( + atoi(args.c_str())); + if (!skill) + return false; + popupMenu->showSkillTypePopup(skill); + return true; +} + +impHandler(selectSkillType) +{ + int skill = 0; + int type = 0; + + if (skillDialog && parse2Int(event.args, skill, type)) + { + skillDialog->selectSkillCastType(skill, + static_cast<CastTypeT>(type)); + return true; + } + return false; +} + } // namespace Actions |