From 051e3f455bd4bd9f8ed2bfbb5c3ac4243d983147 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Sep 2016 21:45:09 +0300 Subject: Fix version for packet CMSG_PLAYER_FAVORITE_ITEM. --- src/net/eathena/inventoryhandler.cpp | 2 +- src/net/eathena/packetsout.inc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index c010f4b0f..5c6e641a9 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -508,7 +508,7 @@ void InventoryHandler::insertCard(const int cardIndex, void InventoryHandler::favoriteItem(const Item *const item, const bool favorite) const { - if (!item) + if (!item || packetVersion < 20120410) return; createOutPacket(CMSG_PLAYER_FAVORITE_ITEM); outMsg.writeInt16(CAST_S16(item->getInvIndex() diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index 4f406a0d6..a8571f361 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -88,7 +88,6 @@ packet(CMSG_PLAYER_USE_CARD, 0x017a, 4, clif->pUseCard); packet(CMSG_PLAYER_INSERT_CARD, 0x017c, 6, clif->pInsertCard); packet(CMSG_PLAYER_VIEW_EQUIPMENT, 0x02d6, 6, clif->pViewPlayerEquip); packet(CMSG_PLAYER_SET_EQUIPMENT_VISIBLE, 0x02d8, 10, clif->pEquipTick); -packet(CMSG_PLAYER_FAVORITE_ITEM, 0x0907, 5, clif->pMoveItem); packet(CMSG_ITEM_PICKUP, 0x009f, 6, clif->pTakeItem); packet(CMSG_PLAYER_CHANGE_DIR, 0x009b, 5, clif->pChangeDir); @@ -291,6 +290,7 @@ packet(CMSG_BANK_CHECK, 0x0000, 0, nullptr); packet(CMSG_BANK_OPEN, 0x0000, 0, nullptr); packet(CMSG_BANK_CLOSE, 0x0000, 0, nullptr); packet(CMSG_REQUEST_RANKS, 0x0000, 0, nullptr); +packet(CMSG_PLAYER_FAVORITE_ITEM, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -637,6 +637,7 @@ if (packetVersion >= 20120410) packet(CMSG_MOVE_FROM_STORAGE, 0x08a6, 8, clif->pMoveFromKafra); packet(CMSG_HOMUNCULUS_MENU, 0x0885, 5, clif->pHomMenu); packet(CMSG_SKILL_USE_BEING, 0x083c, 10, clif->pUseSkillToId); + packet(CMSG_PLAYER_FAVORITE_ITEM, 0x0907, 5, clif->pMoveItem); } // 20120418 -- cgit v1.2.3-60-g2f50