diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-20 18:18:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-20 18:18:03 +0300 |
commit | cf2a41b8a691e3ecfeef8289cb0a21989ceac882 (patch) | |
tree | 4074a3935525877ca5e01bab48714ea5f930d541 /src/net/tmwa/buysellhandler.cpp | |
parent | a111555bd7dbb939673f25f1e8a1f211f61250ad (diff) | |
download | manaverse-cf2a41b8a691e3ecfeef8289cb0a21989ceac882.tar.gz manaverse-cf2a41b8a691e3ecfeef8289cb0a21989ceac882.tar.bz2 manaverse-cf2a41b8a691e3ecfeef8289cb0a21989ceac882.tar.xz manaverse-cf2a41b8a691e3ecfeef8289cb0a21989ceac882.zip |
Remove from tmwa namespace checks for haveItemColors.
Diffstat (limited to 'src/net/tmwa/buysellhandler.cpp')
-rw-r--r-- | src/net/tmwa/buysellhandler.cpp | 7 |
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(); |