summaryrefslogtreecommitdiff
path: root/src/net/eathena/cashshoprecv.cpp
diff options
context:
space:
mode:
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");