diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-16 23:35:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-16 23:35:37 +0300 |
commit | ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f (patch) | |
tree | 1017b9434f0bf905423f22b39fc683075040ac83 /src/net/eathena/vendinghandler.cpp | |
parent | 37eb9896130e6606c93166d29c595480e02a785b (diff) | |
download | manaverse-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.tar.gz manaverse-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.tar.bz2 manaverse-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.tar.xz manaverse-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.zip |
In all places try get item color from ItemColorManager.
Diffstat (limited to 'src/net/eathena/vendinghandler.cpp')
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index 584aa1f23..1db5cd5fc 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -21,6 +21,7 @@ #include "net/eathena/vendinghandler.h" #include "actormanager.h" +#include "itemcolormanager.h" #include "shopitem.h" #include "being/localplayer.h" @@ -142,6 +143,7 @@ void VendingHandler::processItemsList(Net::MessageIn &msg) Being *const being = actorManager->findBeing(id); if (!being) return; + int cards[4]; CREATEWIDGETV(mBuyDialog, BuyDialog, being->getName()); mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); msg.readInt32("vender id"); @@ -156,9 +158,9 @@ void VendingHandler::processItemsList(Net::MessageIn &msg) msg.readUInt8("attribute"); msg.readUInt8("refine"); for (int d = 0; d < 4; d ++) - msg.readInt16("card"); + cards[d] = msg.readInt16("card"); - const ItemColor color = ItemColor_one; + const ItemColor color = ItemColorManager::getColorFromCards(&cards[0]); ShopItem *const item = mBuyDialog->addItem(itemId, type, color, amount, value); if (item) |