summaryrefslogtreecommitdiff
path: root/src/net/eathena/vendingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-23 01:42:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-23 15:04:20 +0300
commita6cd6b2374c55ff4342137d197a43d4656427365 (patch)
tree7141b86ca1f9acd4d10985ad588120d2d53984ad /src/net/eathena/vendingrecv.cpp
parent370771ff7a602498eac131f110b582ca4efbafef (diff)
downloadmv-a6cd6b2374c55ff4342137d197a43d4656427365.tar.gz
mv-a6cd6b2374c55ff4342137d197a43d4656427365.tar.bz2
mv-a6cd6b2374c55ff4342137d197a43d4656427365.tar.xz
mv-a6cd6b2374c55ff4342137d197a43d4656427365.zip
Add support for packet version 20150226 (hercules)
Diffstat (limited to 'src/net/eathena/vendingrecv.cpp')
-rw-r--r--src/net/eathena/vendingrecv.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/net/eathena/vendingrecv.cpp b/src/net/eathena/vendingrecv.cpp
index 567cc8177..ad4635078 100644
--- a/src/net/eathena/vendingrecv.cpp
+++ b/src/net/eathena/vendingrecv.cpp
@@ -38,6 +38,9 @@
#include "debug.h"
+extern int packetVersion;
+extern int serverVersion;
+
namespace EAthena
{
@@ -96,6 +99,15 @@ void VendingRecv::processItemsList(Net::MessageIn &msg)
msg.readUInt8("refine");
for (int d = 0; d < 4; d ++)
cards[d] = msg.readInt16("card");
+ if (serverVersion >= 8 && packetVersion >= 20150226)
+ {
+ for (int f = 0; f < 5; f ++)
+ {
+ msg.readInt16("rnd index");
+ msg.readInt16("rnd value");
+ msg.readUInt8("rnd param");
+ }
+ }
const ItemColor color = ItemColorManager::getColorFromCards(&cards[0]);
ShopItem *const item = mBuyDialog->addItem(itemId, type,
@@ -130,6 +142,15 @@ void VendingRecv::processOpen(Net::MessageIn &msg)
msg.readUInt8("refine");
for (int d = 0; d < 4; d ++)
msg.readInt16("card");
+ if (serverVersion >= 8 && packetVersion >= 20150226)
+ {
+ for (int f = 0; f < 5; f ++)
+ {
+ msg.readInt16("rnd index");
+ msg.readInt16("rnd value");
+ msg.readUInt8("rnd param");
+ }
+ }
}
PlayerInfo::enableVending(true);
VendingModeListener::distributeEvent(true);