diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-03 23:13:07 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-03 23:13:07 +0200 |
commit | 9437d4943a8b299b057020ee114b230399965abd (patch) | |
tree | 54e8d1bca3c2f5457db8402fcdfe1b9e04df54f7 /src/gui/buy.cpp | |
parent | bb73cadd0afdc9fa55ea66ecedd8be53a6f3198e (diff) | |
download | manaplus-9437d4943a8b299b057020ee114b230399965abd.tar.gz manaplus-9437d4943a8b299b057020ee114b230399965abd.tar.bz2 manaplus-9437d4943a8b299b057020ee114b230399965abd.tar.xz manaplus-9437d4943a8b299b057020ee114b230399965abd.zip |
Add colors to buy/sell dialogs.
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r-- | src/gui/buy.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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; |