diff options
Diffstat (limited to 'src/gui/popups')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 16 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index e87407260..9c80415f6 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -299,6 +299,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) // TRANSLATORS: popup menu item // TRANSLATORS: attack monster mBrowserBox->addRow("/attack :'BEINGID'", _("Attack")); + addCatchPetCommands(); addGmCommands(); mBrowserBox->addRow("##3---"); @@ -394,6 +395,10 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) mBrowserBox->addRow("pet to egg", _("Return to egg")); mBrowserBox->addRow("##3---"); } + else + { + addCatchPetCommands(); + } break; case ActorType::SkillUnit: // +++ need impliment menu @@ -3154,6 +3159,17 @@ void PopupMenu::addMailCommands() #endif } +void PopupMenu::addCatchPetCommands() +{ +#ifdef EATHENA_SUPPORT + if (!serverFeatures->haveServerPets()) + return; + // TRANSLATORS: popup menu item + // TRANSLATORS: catch pet command + mBrowserBox->addRow("/catchpet :'BEINGID'", _("Taming pet")); +#endif +} + void PopupMenu::moveUp() { mBrowserBox->moveSelectionUp(); diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index 2bf253a29..5f4f6be70 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -231,6 +231,8 @@ class PopupMenu final : public Popup, public LinkHandler void addMailCommands(); + void addCatchPetCommands(); + void showGMPopup(const std::string &name); void showPlayerGMCommands(const std::string &name); |