From 9437d4943a8b299b057020ee114b230399965abd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 3 Mar 2011 23:13:07 +0200 Subject: Add colors to buy/sell dialogs. --- src/gui/buy.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/buy.cpp') diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 45bc051fb..c413fdffc 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -159,9 +159,9 @@ void BuyDialog::reset() setMoney(0); } -void BuyDialog::addItem(int id, int amount, int price) +void BuyDialog::addItem(int id, unsigned char color, int amount, int price) { - mShopItems->addItem(id, amount, price); + mShopItems->addItem(id, color, amount, price); mShopItemList->adjustSize(); } @@ -213,8 +213,9 @@ void BuyDialog::action(const gcn::ActionEvent &event) { if (mNpcId != -1) { - Net::getNpcHandler()->buyItem(mNpcId, - mShopItems->at(selectedItem)->getId(), mAmountItems); + ShopItem *item = mShopItems->at(selectedItem); + Net::getNpcHandler()->buyItem(mNpcId, item->getId(), + item->getColor(), mAmountItems); // Update money and adjust the max number of items that can be bought mMaxItems -= mAmountItems; -- cgit v1.2.3-70-g09d2