diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-21 17:43:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-21 17:43:19 +0300 |
commit | e3ad003fe09ff90524ffa5deae844e6721b903b2 (patch) | |
tree | 756f8cae3ee12060548384ece6750a25bee4ab45 /src/net/eathena/tradehandler.cpp | |
parent | 4ab7d38fe9033695e23042e97b55999b26f00fd7 (diff) | |
download | mv-e3ad003fe09ff90524ffa5deae844e6721b903b2.tar.gz mv-e3ad003fe09ff90524ffa5deae844e6721b903b2.tar.bz2 mv-e3ad003fe09ff90524ffa5deae844e6721b903b2.tar.xz mv-e3ad003fe09ff90524ffa5deae844e6721b903b2.zip |
Set cards from net code.
Diffstat (limited to 'src/net/eathena/tradehandler.cpp')
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 45310761f..921d2f88b 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -187,10 +187,9 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) const uint8_t identify = msg.readUInt8("identify"); msg.readUInt8("attribute"); const uint8_t refine = msg.readUInt8("refine"); - msg.readInt16("card 0"); - msg.readInt16("card 1"); - msg.readInt16("card 2"); - msg.readInt16("card 3"); + int cards[4]; + for (int f = 0; f < 4; f++) + cards[f] = msg.readInt16("card"); if (tradeWindow) { @@ -200,7 +199,9 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) } else { - tradeWindow->addItem2(type, false, amount, + tradeWindow->addItem2(type, + cards, 4, + false, amount, refine, 1, identify != 0, false, false, false); } } |