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/inventoryhandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/net/eathena/inventoryhandler.cpp') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 062587996..342868c17 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -509,7 +509,9 @@ void InventoryHandler::insertCard(const int cardIndex, void InventoryHandler::favoriteItem(const Item *const item, const bool favorite) const { - if (!item || packetVersion < 20120410) + if (!item) + return; + if (packetVersion < 20120410) return; createOutPacket(CMSG_PLAYER_FAVORITE_ITEM); outMsg.writeInt16(CAST_S16(item->getInvIndex() @@ -539,6 +541,8 @@ int InventoryHandler::convertFromServerSlot(const int serverSlot) const void InventoryHandler::selectCart(const BeingId accountId, const int type) const { + if (packetVersion < 20150805) + return; createOutPacket(CMSG_SELECT_CART); outMsg.writeBeingId(accountId, "account id"); outMsg.writeInt8(CAST_S8(type), "type"); @@ -546,6 +550,8 @@ void InventoryHandler::selectCart(const BeingId accountId, void InventoryHandler::identifyItem(const Item *const item) const { + if (packetVersion < 20150513) + return; createOutPacket(CMSG_QUICK_IDENTIFY_ITEM); outMsg.writeInt16(CAST_S16(item->getInvIndex()), "item index"); -- cgit v1.2.3-70-g09d2