summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp29
-rw-r--r--src/actions/commands.h2
2 files changed, 31 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
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 4f701de37..ce07d3b03 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -142,6 +142,8 @@ namespace Actions
decHandler(mailTo);
decHandler(adoptChild);
decHandler(showSkillLevels);
+ decHandler(showSkillType);
+ decHandler(selectSkillType);
} // namespace Actions
#undef decHandler