summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-22 21:30:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-22 21:30:10 +0300
commit05099e035729878893845b0598e20109f0c734fe (patch)
tree7058923ca824049151442942fc513c5961055af4 /src/gui
parent6394aa39611ce2730f4030a8ac45088ae6f20460 (diff)
downloadplus-05099e035729878893845b0598e20109f0c734fe.tar.gz
plus-05099e035729878893845b0598e20109f0c734fe.tar.bz2
plus-05099e035729878893845b0598e20109f0c734fe.tar.xz
plus-05099e035729878893845b0598e20109f0c734fe.zip
Show popup menu pet control commands only for pet owner.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 9a998214f..7816b6887 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -334,20 +334,23 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
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---");
+ if (being->getOwner() == localPlayer)
+ {
+ // 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: