From 8b8efe383c502456a36d0f0faf5a2079b816243d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Sep 2016 20:53:54 +0300 Subject: Fix version for market and some other packets. --- src/net/eathena/markethandler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/net/eathena/markethandler.cpp') diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index 2aeaf6787..b5a31f344 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -29,6 +29,7 @@ #include "debug.h" extern Net::MarketHandler *marketHandler; +extern int packetVersion; namespace EAthena { @@ -41,6 +42,9 @@ MarketHandler::MarketHandler() void MarketHandler::close() const { + if (packetVersion < 20131218) + return; + createOutPacket(CMSG_NPC_MARKET_CLOSE); } @@ -49,6 +53,8 @@ void MarketHandler::buyItem(const int itemId, const ItemColor color A_UNUSED, const int amount) const { + if (packetVersion < 20131218) + return; const bool nonStack = type == ItemType::Weapon || type == ItemType::Armor || type == ItemType::PetEgg || @@ -69,6 +75,8 @@ void MarketHandler::buyItem(const int itemId, void MarketHandler::buyItems(const std::vector &items) const { + if (packetVersion < 20131218) + return; int cnt = 0; const int pairSize = 6; -- cgit v1.2.3-70-g09d2