summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-24 00:16:55 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-24 00:16:55 +0300
commit7eabdd0b8c8281128249659c4d8e8501c10da66e (patch)
tree7d72dddb8487ce6752c97a710ff1293e1e292b9f
parent7b6e10d546402ad6820537cedbc5eba909d28fd9 (diff)
downloadmv-7eabdd0b8c8281128249659c4d8e8501c10da66e.tar.gz
mv-7eabdd0b8c8281128249659c4d8e8501c10da66e.tar.bz2
mv-7eabdd0b8c8281128249659c4d8e8501c10da66e.tar.xz
mv-7eabdd0b8c8281128249659c4d8e8501c10da66e.zip
Add into gm context menu for items command info.
-rw-r--r--src/gui/popups/popupmenu.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 8098799fa..2467c0726 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -580,6 +580,7 @@ void PopupMenu::showPopup(const int x, const int y,
mX = x;
mY = y;
mFloorItemId = floorItem->getId();
+ mItemId = floorItem->getItemId();
mType = ActorType::FloorItem;
mSubType = BeingTypeId_zero;
for (int f = 0; f < maxCards; f ++)
@@ -1450,6 +1451,7 @@ void PopupMenu::handleLink(const std::string &link,
if (item)
{
mFloorItemId = item->getId();
+ mItemId = item->getItemId();
for (int f = 0; f < maxCards; f ++)
mItemCards[f] = item->getCard(f);
showPopup(getX(), getY(), item);
@@ -1723,6 +1725,7 @@ void PopupMenu::showPopup(Window *const parent,
mBrowserBox->addRow("##3---");
addPickupFilter(mNick);
}
+ addGmCommands();
// TRANSLATORS: popup menu item
// TRANSLATORS: add item name to chat
mBrowserBox->addRow("/addchat 'ITEMID''CARDS'", _("Add to chat"));
@@ -2749,10 +2752,16 @@ void PopupMenu::showMonsterGMCommands()
void PopupMenu::showFloorItemGMCommands()
{
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: show item information
+ mBrowserBox->addRow("/iteminfo 'ITEMID'", _("Info"));
}
void PopupMenu::showItemGMCommands()
{
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: show item information
+ mBrowserBox->addRow("/iteminfo 'ITEMID'", _("Info"));
}
void PopupMenu::showGMPopup()
@@ -2771,16 +2780,16 @@ void PopupMenu::showGMPopup()
showNpcGMCommands();
break;
case ActorType::Monster:
- showMonsterGMCommands();
+ showMonsterGMCommands();
break;
case ActorType::FloorItem:
showFloorItemGMCommands();
break;
default:
+ case ActorType::Unknown:
if (mItemId != 0)
showItemGMCommands();
break;
- case ActorType::Unknown:
case ActorType::Portal:
case ActorType::LocalPet:
case ActorType::Avatar: