summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-12 21:45:09 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-12 21:45:09 +0300
commit051e3f455bd4bd9f8ed2bfbb5c3ac4243d983147 (patch)
treeb2bb3653bb90fe35337516546a6d75eeb203eb26
parente8c3f1b99afc36383abe8c5441a75ae47929831a (diff)
downloadplus-051e3f455bd4bd9f8ed2bfbb5c3ac4243d983147.tar.gz
plus-051e3f455bd4bd9f8ed2bfbb5c3ac4243d983147.tar.bz2
plus-051e3f455bd4bd9f8ed2bfbb5c3ac4243d983147.tar.xz
plus-051e3f455bd4bd9f8ed2bfbb5c3ac4243d983147.zip
Fix version for packet CMSG_PLAYER_FAVORITE_ITEM.
-rw-r--r--src/net/eathena/inventoryhandler.cpp2
-rw-r--r--src/net/eathena/packetsout.inc3
2 files changed, 3 insertions, 2 deletions
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