From 1b57518ca97c670174f89c5af28659b6ad0c3d42 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Feb 2011 03:36:52 +0200 Subject: Implement receiving item color from server. --- src/gui/trade.cpp | 13 +++++++------ src/gui/trade.h | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/gui') diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index f7b16d6ae..be4891103 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -151,21 +151,22 @@ void TradeWindow::setMoney(int amount) mMoneyLabel->adjustSize(); } -void TradeWindow::addItem(int id, bool own, int quantity, int refine) +void TradeWindow::addItem(int id, bool own, int quantity, + int refine, unsigned char color) { if (own) - mMyInventory->addItem(id, quantity, refine); + mMyInventory->addItem(id, quantity, refine, color); else - mPartnerInventory->addItem(id, quantity, refine); + mPartnerInventory->addItem(id, quantity, refine, color); } void TradeWindow::addItem(int id, bool own, int quantity, - int refine, bool equipment) + int refine, unsigned char color, bool equipment) { if (own) - mMyInventory->addItem(id, quantity, refine, equipment); + mMyInventory->addItem(id, quantity, refine, color, equipment); else - mPartnerInventory->addItem(id, quantity, refine, equipment); + mPartnerInventory->addItem(id, quantity, refine, color, equipment); } void TradeWindow::changeQuantity(int index, bool own, int quantity) diff --git a/src/gui/trade.h b/src/gui/trade.h index c316e2354..fcaa2f6ac 100644 --- a/src/gui/trade.h +++ b/src/gui/trade.h @@ -63,7 +63,8 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener /** * Add an item to the trade window. */ - void addItem(int id, bool own, int quantity, int refine); + void addItem(int id, bool own, int quantity, + int refine, unsigned char color); /** * Reset both item containers @@ -73,8 +74,8 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener /** * Add an item to the trade window. */ - void addItem(int id, bool own, int quantity, - int refine, bool equipment); + void addItem(int id, bool own, int quantity, int refine, + unsigned char color, bool equipment); /** * Change quantity of an item. -- cgit v1.2.3-70-g09d2