summaryrefslogtreecommitdiff
path: root/src/actions/pets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/pets.cpp')
-rw-r--r--src/actions/pets.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 061a7dd6d..7e2c849ac 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -31,12 +31,15 @@
#include "gui/chatconsts.h"
+#include "listeners/inputactionreplaylistener.h"
+
#include "net/chathandler.h"
#include "net/net.h"
#include "net/pethandler.h"
#include "net/serverfeatures.h"
#include "utils/chatutils.h"
+#include "utils/gettext.h"
#include "utils/stringutils.h"
#include "debug.h"
@@ -85,7 +88,15 @@ impHandler(setPetName)
{
const std::string args = event.args;
if (args.empty())
+ {
+ const Being *const pet = getPet();
+ if (!pet)
+ return false;
+ inputActionReplayListener.openDialog(_("Rename your pet"),
+ pet->getName(),
+ InputAction::PET_SET_NAME);
return false;
+ }
petHandler->setName(args);
return true;