diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-11-04 20:19:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-11-04 21:16:31 +0300 |
commit | c5a5274c86201b74325a8b84ab4543c73959c5d5 (patch) | |
tree | dfc3e7a8e584a2f42e1dcd70a8ce9837ac448549 /src/net/eathena/cashshophandler.cpp | |
parent | cb6572ebd60ecc525c5a236a26eefc673841f056 (diff) | |
download | plus-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.gz plus-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.bz2 plus-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.xz plus-c5a5274c86201b74325a8b84ab4543c73959c5d5.zip |
Dont send some packets with unsupported server versions.
Diffstat (limited to 'src/net/eathena/cashshophandler.cpp')
-rw-r--r-- | src/net/eathena/cashshophandler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index 56b6b3fbf..a25fa310a 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -27,6 +27,7 @@ #include "debug.h" extern Net::CashShopHandler *cashShopHandler; +extern int packetVersion; namespace EAthena { @@ -42,6 +43,8 @@ void CashShopHandler::buyItem(const int points, const ItemColor color A_UNUSED, const int amount) const { + if (packetVersion < 20101124) + return; createOutPacket(CMSG_NPC_CASH_SHOP_BUY); outMsg.writeInt16(10 + 4, "len"); outMsg.writeInt32(points, "points"); @@ -58,22 +61,30 @@ void CashShopHandler::buyItems(const std::vector<ShopItem*> &items A_UNUSED) void CashShopHandler::close() const { + if (packetVersion < 20110718) + return; createOutPacket(CMSG_NPC_CASH_SHOP_CLOSE); } void CashShopHandler::requestPoints() const { + if (packetVersion < 20110718) + return; createOutPacket(CMSG_NPC_CASH_SHOP_OPEN); } void CashShopHandler::requestTab(const int tab) const { + if (packetVersion < 20110718) + return; createOutPacket(CMSG_NPC_CASH_SHOP_REQUEST_TAB); outMsg.writeInt16(CAST_S16(tab), "tab"); } void CashShopHandler::schedule() const { + if (packetVersion < 20110614) + return; createOutPacket(CMSG_NPC_CASH_SHOP_SCHEDULE); } |