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/inventoryhandler.cpp | |
parent | cb6572ebd60ecc525c5a236a26eefc673841f056 (diff) | |
download | manaverse-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.gz manaverse-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.bz2 manaverse-c5a5274c86201b74325a8b84ab4543c73959c5d5.tar.xz manaverse-c5a5274c86201b74325a8b84ab4543c73959c5d5.zip |
Dont send some packets with unsupported server versions.
Diffstat (limited to 'src/net/eathena/inventoryhandler.cpp')
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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"); |