From cf2a41b8a691e3ecfeef8289cb0a21989ceac882 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 20 Jun 2015 18:18:03 +0300 Subject: Remove from tmwa namespace checks for haveItemColors. --- src/net/tmwa/buysellhandler.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/net/tmwa/buysellhandler.cpp') diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index a85da12b2..0df127159 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -101,10 +101,7 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg) void BuySellHandler::processNpcBuy(Net::MessageIn &msg) { msg.readInt16("len"); - unsigned int sz = 11; - if (serverFeatures->haveItemColors()) - sz += 1; - const unsigned int n_items = (msg.getLength() - 4U) / sz; + const unsigned int n_items = (msg.getLength() - 4U) / 11; CREATEWIDGETV(mBuyDialog, BuyDialog, mNpcId); mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); @@ -115,8 +112,6 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg) const int type = msg.readUInt8("type"); const int itemId = msg.readInt16("item id"); uint8_t color = 1; - if (serverFeatures->haveItemColors()) - color = msg.readUInt8("item color"); mBuyDialog->addItem(itemId, type, color, 0, value); } mBuyDialog->sort(); -- cgit v1.2.3-60-g2f50