summaryrefslogtreecommitdiff
path: root/src/gui/popups/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-20 00:41:19 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-20 00:41:19 +0300
commitcefe3bc037ccbf3f82b387d0484e9c81bed670f3 (patch)
tree8c953d209d8a0940f27af4e4c0ad4ff2177c7dc2 /src/gui/popups/popupmenu.cpp
parent32485e465199c587f73700f70a5a912ab5661205 (diff)
downloadplus-cefe3bc037ccbf3f82b387d0484e9c81bed670f3.tar.gz
plus-cefe3bc037ccbf3f82b387d0484e9c81bed670f3.tar.bz2
plus-cefe3bc037ccbf3f82b387d0484e9c81bed670f3.tar.xz
plus-cefe3bc037ccbf3f82b387d0484e9c81bed670f3.zip
Add adopt child into players context menu.
Diffstat (limited to 'src/gui/popups/popupmenu.cpp')
-rw-r--r--src/gui/popups/popupmenu.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 811efc881..1ab1f4243 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -565,6 +565,7 @@ void PopupMenu::showPlayerPopup(const std::string &nick)
mBrowserBox->addRow("##3---");
const PartyMember *const o = party->getMember(
localPlayer->getName());
+ showAdoptCommands();
if (o && member->getMap() == o->getMap())
{
// TRANSLATORS: popup menu item
@@ -2568,6 +2569,7 @@ void PopupMenu::addPartyName(const std::string &partyName)
// TRANSLATORS: popup menu item
// TRANSLATORS: kick player from party
mBrowserBox->addRow("/kickparty 'NAME'", _("Kick from party"));
+ showAdoptCommands();
}
mBrowserBox->addRow("##3---");
}
@@ -2592,6 +2594,7 @@ void PopupMenu::addParty(const std::string &nick)
// TRANSLATORS: popup menu item
// TRANSLATORS: kick player from party
mBrowserBox->addRow("/kickparty 'NAME'", _("Kick from party"));
+ showAdoptCommands();
}
mBrowserBox->addRow("##3---");
}
@@ -3198,6 +3201,17 @@ void PopupMenu::addCatchPetCommands()
#endif
}
+void PopupMenu::showAdoptCommands()
+{
+#ifdef EATHENA_SUPPORT
+ if (!serverFeatures->haveFamily())
+ return;
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: adopt child command
+ mBrowserBox->addRow("/adoptchild 'NAME'", _("Adopt child"));
+#endif
+}
+
void PopupMenu::moveUp()
{
mBrowserBox->moveSelectionUp();