summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-05 23:34:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-06 00:07:18 +0300
commitbcdbc39b6efe7391866c81ef82a2e9358b6c3ff4 (patch)
treec296c08021c602687e3632b1f4c3f87033c99d34 /src/actions
parent8b392d9c4a1c177c1207d297c75c1a4a06142245 (diff)
downloadplus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.tar.gz
plus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.tar.bz2
plus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.tar.xz
plus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.zip
Add menu for selected skill for now with item only "set skill level".s20160706
Also add chat command /showskilllevels SKILL
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp16
-rw-r--r--src/actions/commands.h1
2 files changed, 16 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index b25600835..98db8d57f 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -37,6 +37,8 @@
#include "gui/viewport.h"
+#include "gui/popups/popupmenu.h"
+
#ifdef EATHENA_SUPPORT
#include "gui/shortcut/emoteshortcut.h"
@@ -1174,7 +1176,6 @@ impHandler(skill)
}
else
{
- logger->log("text: " + text);
skillDialog->useSkill(skillId,
AutoTarget_true,
level,
@@ -1621,4 +1622,17 @@ impHandlerE(adoptChild)
#endif
}
+impHandler(showSkillLevels)
+{
+ 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->showSkillLevelPopup(skill);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index ea7e7d278..4f701de37 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -141,6 +141,7 @@ namespace Actions
decHandler(commandGuildRecall);
decHandler(mailTo);
decHandler(adoptChild);
+ decHandler(showSkillLevels);
} // namespace Actions
#undef decHandler