summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-26 18:25:58 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-26 18:25:58 +0300
commit2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c (patch)
tree33145fb3c8cb2471efb0424b7ccfdf0c05a03d36 /src/gui/shopwindow.cpp
parent4d8ed7fdb14bea874a9385a6808d27caced9802a (diff)
downloadManaVerse-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.tar.gz
ManaVerse-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.tar.bz2
ManaVerse-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.tar.xz
ManaVerse-2e7bfc350d38e16b3d340f8e4ea69e6ff6748f5c.zip
Add auction buttons in shop window for send buy or sell list to auction bot.
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r--src/gui/shopwindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 4311a04d2..0988ef759 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -119,9 +119,11 @@ ShopWindow::ShopWindow():
mBuyAddButton = new Button(_("Add"), "add buy", this);
mBuyDeleteButton = new Button(_("Delete"), "delete buy", this);
mBuyAnnounceButton = new Button(_("Announce"), "announce buy", this);
+ mBuyAuctionButton = new Button(_("Auction"), "auction buy", this);
mSellAddButton = new Button(_("Add"), "add sell", this);
mSellDeleteButton = new Button(_("Delete"), "delete sell", this);
mSellAnnounceButton = new Button(_("Announce"), "announce sell", this);
+ mSellAuctionButton = new Button(_("Auction"), "auction sell", this);
mAnnounceLinks = new CheckBox(_("Show links in announce"), false,
this, "link announce");
@@ -135,9 +137,11 @@ ShopWindow::ShopWindow():
place(0, 6, mBuyAddButton);
place(1, 6, mBuyDeleteButton);
place(3, 6, mBuyAnnounceButton);
+ place(4, 6, mBuyAuctionButton);
place(8, 6, mSellAddButton);
place(9, 6, mSellDeleteButton);
place(11, 6, mSellAnnounceButton);
+ place(12, 6, mSellAuctionButton);
place(0, 7, mAnnounceLinks, 8);
place(15, 7, mCloseButton);
@@ -207,6 +211,16 @@ void ShopWindow::action(const gcn::ActionEvent &event)
{
announce(mSellShopItems, SELL);
}
+ else if (event.getId() == "auction buy" && mBuyShopItems
+ && mBuyShopItems->getNumberOfElements() > 0)
+ {
+ Net::getChatHandler()->privateMessage("AuctionBot", "!pull4144 seek");
+ }
+ else if (event.getId() == "auction sell" && mSellShopItems
+ && mSellShopItems->getNumberOfElements() > 0)
+ {
+ Net::getChatHandler()->privateMessage("AuctionBot", "!pull4144 offer");
+ }
if (mSelectedItem < 1)
return;