diff options
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 |