summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/buysellhandler.cpp')
-rw-r--r--src/net/tmwa/buysellhandler.cpp7
1 files changed, 1 insertions, 6 deletions
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();