From c5a5274c86201b74325a8b84ab4543c73959c5d5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 4 Nov 2016 20:19:53 +0300 Subject: Dont send some packets with unsupported server versions. --- src/net/eathena/buyingstorehandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/net/eathena/buyingstorehandler.cpp') diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 010a4a969..0540f8eec 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -48,6 +48,8 @@ void BuyingStoreHandler::create(const std::string &name, const bool flag, const std::vector &items) const { + if (packetVersion < 20100303) + return; createOutPacket(CMSG_BUYINGSTORE_CREATE); outMsg.writeInt16(CAST_S16(89 + items.size() * 8), "len"); outMsg.writeInt32(maxMoney, "limit money"); @@ -74,6 +76,8 @@ void BuyingStoreHandler::open(const Being *const being) const { if (!being) return; + if (packetVersion < 20100420) + return; createOutPacket(CMSG_BUYINGSTORE_OPEN); outMsg.writeBeingId(being->getId(), "account id"); } @@ -83,7 +87,9 @@ void BuyingStoreHandler::sell(const Being *const being, const Item *const item, const int amount) const { - if (!being || !item || packetVersion < 20100420) + if (!being || !item) + return; + if (packetVersion < 20100420) return; createOutPacket(CMSG_BUYINGSTORE_SELL); -- cgit v1.2.3-60-g2f50