summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-01 23:23:26 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-01 23:23:26 +0300
commit163c2b925053dadf7b431b6fc9f208d51f1dde4e (patch)
treea4873b8959c9fa29ebbc08782776d27b1aa47159 /src/actions/commands.cpp
parentd7069a3abc8da077eb7aa2c23e5f7e37f6f3ee97 (diff)
downloadplus-163c2b925053dadf7b431b6fc9f208d51f1dde4e.tar.gz
plus-163c2b925053dadf7b431b6fc9f208d51f1dde4e.tar.bz2
plus-163c2b925053dadf7b431b6fc9f208d51f1dde4e.tar.xz
plus-163c2b925053dadf7b431b6fc9f208d51f1dde4e.zip
Add to context menu action for rename homunculus.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 9e70c55de..e10d31d43 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -30,12 +30,15 @@
#include "being/flooritem.h"
#include "being/localplayer.h"
#include "being/playerrelations.h"
+#ifdef EATHENA_SUPPORT
+#include "being/homunculusinfo.h"
+#include "being/playerinfo.h"
+#endif
#include "gui/viewport.h"
#ifdef EATHENA_SUPPORT
#include "gui/shortcut/emoteshortcut.h"
-
#endif
#include "gui/windows/chatwindow.h"
@@ -49,6 +52,10 @@
#include "input/inputactionoperators.h"
+#ifdef EATHENA_SUPPORT
+#include "listeners/inputactionreplaylistener.h"
+#endif
+
#include "net/adminhandler.h"
#include "net/chathandler.h"
#include "net/guildhandler.h"
@@ -868,7 +875,17 @@ impHandler(setHomunculusName)
#ifdef EATHENA_SUPPORT
const std::string args = event.args;
if (args.empty())
+ {
+ const HomunculusInfo *const info = PlayerInfo::getHomunculus();
+ if (info)
+ {
+ // TRANSLATORS: dialog header
+ inputActionReplayListener.openDialog(_("Rename your homun"),
+ info->name,
+ InputAction::HOMUNCULUS_SET_NAME);
+ }
return false;
+ }
if (homunculusHandler)
{