summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-25 13:54:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-25 13:54:01 +0300
commitfabdb839728e5a625b67bae1f278952ddabb1844 (patch)
tree8af6017325cd8d6c003664e893d9f1fb03d53a00 /src/gui/popups/popupmenu.cpp
parent0ef4d8b885bf98735dbf800fc7385f625f18a9e4 (diff)
downloadplus-fabdb839728e5a625b67bae1f278952ddabb1844.tar.gz
plus-fabdb839728e5a625b67bae1f278952ddabb1844.tar.bz2
plus-fabdb839728e5a625b67bae1f278952ddabb1844.tar.xz
plus-fabdb839728e5a625b67bae1f278952ddabb1844.zip
Add in context menu for mercenary and homunculus command "move to master"
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index ab50d8701..a33de2b83 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -70,6 +70,7 @@
#include "net/buysellhandler.h"
#include "net/chathandler.h"
#include "net/guildhandler.h"
+#include "net/homunculushandler.h"
#include "net/inventoryhandler.h"
#include "net/mercenaryhandler.h"
#include "net/net.h"
@@ -306,10 +307,17 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
case ActorType::Mercenary:
// TRANSLATORS: popup menu item
// TRANSLATORS: fire mercenary
+ mBrowserBox->addRow("mercenary to master", _("Move to master"));
+ mBrowserBox->addRow("##3---");
mBrowserBox->addRow("fire mercenary", _("Fire"));
mBrowserBox->addRow("##3---");
break;
+ case ActorType::Homunculus:
+ mBrowserBox->addRow("homunculus to master", _("Move to master"));
+ mBrowserBox->addRow("##3---");
+ break;
+
case ActorType::Pet:
// TRANSLATORS: popup menu item
// TRANSLATORS: feed pet
@@ -1858,6 +1866,14 @@ void PopupMenu::handleLink(const std::string &link,
{
mercenaryHandler->fire();
}
+ else if (link == "mercenary to master")
+ {
+ mercenaryHandler->moveToMaster();
+ }
+ else if (link == "homunculus to master")
+ {
+ homunculusHandler->moveToMaster();
+ }
else if (link == "pet feed")
{
petHandler->feed();