diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-23 16:04:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-23 16:04:34 +0300 |
commit | 6cfe8e5db32c869ac6a8c3fc29999b3f6551f354 (patch) | |
tree | 43b0424299fcf12278b517245d0181345d34a856 /src/gui/popups | |
parent | f3fb75f3dfe916b95a0407fc7f680b954ba77504 (diff) | |
download | plus-6cfe8e5db32c869ac6a8c3fc29999b3f6551f354.tar.gz plus-6cfe8e5db32c869ac6a8c3fc29999b3f6551f354.tar.bz2 plus-6cfe8e5db32c869ac6a8c3fc29999b3f6551f354.tar.xz plus-6cfe8e5db32c869ac6a8c3fc29999b3f6551f354.zip |
Add implimented pet commands into pet context menu.
feed, drop look, return to egg, unequip.
Diffstat (limited to 'src/gui/popups')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 6cfecae78..ab50d8701 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -75,6 +75,7 @@ #include "net/net.h" #include "net/npchandler.h" #include "net/partyhandler.h" +#include "net/pethandler.h" #include "net/serverfeatures.h" #include "net/tradehandler.h" @@ -309,6 +310,23 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) mBrowserBox->addRow("##3---"); break; + case ActorType::Pet: + // TRANSLATORS: popup menu item + // TRANSLATORS: feed pet + mBrowserBox->addRow("pet feed", _("Feed")); + // TRANSLATORS: popup menu item + // TRANSLATORS: pet drop loot + mBrowserBox->addRow("pet drop loot", _("Drop loot")); + // TRANSLATORS: popup menu item + // TRANSLATORS: pet unequip item + mBrowserBox->addRow("pet unequip", _("Unequip")); + mBrowserBox->addRow("##3---"); + // TRANSLATORS: popup menu item + // TRANSLATORS: pet return to egg + mBrowserBox->addRow("pet to egg", _("Return to egg")); + mBrowserBox->addRow("##3---"); + break; + case ActorType::Avatar: case ActorType::Unknown: case ActorType::FloorItem: @@ -1840,6 +1858,22 @@ void PopupMenu::handleLink(const std::string &link, { mercenaryHandler->fire(); } + else if (link == "pet feed") + { + petHandler->feed(); + } + else if (link == "pet drop loot") + { + petHandler->dropLoot(); + } + else if (link == "pet to egg") + { + petHandler->returnToEgg(); + } + else if (link == "pet unequip") + { + petHandler->unequip(); + } else if (!link.compare(0, 10, "guild-pos-")) { if (localPlayer) |