summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-05 03:41:13 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-05 03:41:13 +0300
commitd0571ca16bb4ef11a718cfa78dc29b57080fcc72 (patch)
treeadd362fa6b01bb83c608a78b3a56bf8b52136767 /src/gui/popupmenu.cpp
parent0202b0b4cdac57a04a3765f6bca893bd3b5c9812 (diff)
downloadmanaverse-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.tar.gz
manaverse-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.tar.bz2
manaverse-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.tar.xz
manaverse-d0571ca16bb4ef11a718cfa78dc29b57080fcc72.zip
Add ability to send client states to other clients.
Using for this emotes.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 0ede3d122..ad62f79a8 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -248,8 +248,23 @@ void PopupMenu::showPopup(int x, int y, Being *being)
if (player_relations.getDefault() & PlayerRelation::TRADE)
{
mBrowserBox->addRow("##3---");
- mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy")));
- mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell")));
+ if (being->isAdvanced())
+ {
+ if (being->isShopEnabled())
+ {
+ mBrowserBox->addRow(strprintf(
+ "@@buy|%s@@", _("Buy")));
+ mBrowserBox->addRow(strprintf(
+ "@@sell|%s@@", _("Sell")));
+ }
+ }
+ else
+ {
+ mBrowserBox->addRow(strprintf(
+ "@@buy|%s@@", _("Buy (?)")));
+ mBrowserBox->addRow(strprintf(
+ "@@sell|%s@@", _("Sell (?)")));
+ }
}
}
break;
@@ -428,8 +443,8 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("##3---");
if (player_relations.getDefault() & PlayerRelation::TRADE)
{
- mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy")));
- mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell")));
+ mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy (?)")));
+ mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell (?)")));
}
mBrowserBox->addRow(strprintf("@@name|%s@@", _("Add name to chat")));
@@ -652,8 +667,22 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
if (player_relations.getDefault() & PlayerRelation::TRADE)
{
mBrowserBox->addRow("##3---");
- mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy")));
- mBrowserBox->addRow(strprintf("@@sell|%s@@", _("Sell")));
+ if (being->isAdvanced())
+ {
+ if (being->isShopEnabled())
+ {
+ mBrowserBox->addRow(strprintf(
+ "@@buy|%s@@", _("Buy")));
+ mBrowserBox->addRow(strprintf(
+ "@@sell|%s@@", _("Sell")));
+ }
+ }
+ else
+ {
+ mBrowserBox->addRow(strprintf("@@buy|%s@@", _("Buy (?)")));
+ mBrowserBox->addRow(strprintf(
+ "@@sell|%s@@", _("Sell (?)")));
+ }
}
mBrowserBox->addRow("##3---");