summaryrefslogtreecommitdiff
path: root/src/net/eathena/cashshoprecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-01 19:07:21 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-01 19:30:21 +0300
commit5f4a9b697438f38629a9839105e7a284b39e0cde (patch)
tree17fddc69ab0021d41d436b3434e49842348da237 /src/net/eathena/cashshoprecv.cpp
parent5279e8de2799308ad6365562d812f6f23946dc80 (diff)
downloadplus-5f4a9b697438f38629a9839105e7a284b39e0cde.tar.gz
plus-5f4a9b697438f38629a9839105e7a284b39e0cde.tar.bz2
plus-5f4a9b697438f38629a9839105e7a284b39e0cde.tar.xz
plus-5f4a9b697438f38629a9839105e7a284b39e0cde.zip
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src/net/eathena/cashshoprecv.cpp')
-rw-r--r--src/net/eathena/cashshoprecv.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net/eathena/cashshoprecv.cpp b/src/net/eathena/cashshoprecv.cpp
index b427fd5df..0e868cda3 100644
--- a/src/net/eathena/cashshoprecv.cpp
+++ b/src/net/eathena/cashshoprecv.cpp
@@ -30,6 +30,8 @@
#include "debug.h"
+extern int packetVersion;
+
namespace EAthena
{
@@ -40,13 +42,18 @@ namespace CashShopRecv
void CashShopRecv::processCashShopOpen(Net::MessageIn &msg)
{
- const int count = (msg.readInt16("len") - 12) / 11;
+ int count;
+ if (packetVersion >= 20070711)
+ count = (msg.readInt16("len") - 12) / 11;
+ else
+ count = (msg.readInt16("len") - 8) / 11;
CREATEWIDGETV(mBuyDialog, BuyDialog, fromInt(BuyDialog::Cash, BeingId));
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
msg.readInt32("cash points");
- msg.readInt32("kafra points");
+ if (packetVersion >= 20070711)
+ msg.readInt32("kafra points");
for (int f = 0; f < count; f ++)
{
msg.readInt32("price");