From f9e82c92f796efe40ebf9bf7477690784f77d3b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Mar 2015 13:47:35 +0300 Subject: eathena: add partial support for packet SMSG_PLAYER_FAVORITE_ITEM 0x0908. --- src/net/eathena/inventoryhandler.cpp | 13 +++++++++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 820f9f71a..b0dbab786 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -114,6 +114,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_STORAGE_PASSWORD_RESULT, SMSG_PLAYER_COOKING_LIST, SMSG_ITEM_DAMAGED, + SMSG_PLAYER_FAVORITE_ITEM, 0 }; handledMessages = _messages; @@ -278,6 +279,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processItemDamaged(msg); break; + case SMSG_PLAYER_FAVORITE_ITEM: + processFavoriteItem(msg); + break; + default: break; } @@ -1095,4 +1100,12 @@ void InventoryHandler::processItemDamaged(Net::MessageIn &msg) msg.readInt32("account id"); } +void InventoryHandler::processFavoriteItem(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + msg.readInt16("item index"); + msg.readUInt8("favorite (0 - favorite)"); +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 0f2363f24..f53050ccd 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -135,6 +135,8 @@ class InventoryHandler final : public MessageHandler, static void processItemDamaged(Net::MessageIn &msg); + static void processFavoriteItem(Net::MessageIn &msg); + static Ea::InventoryItems mCartItems; }; diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 4306953f3..dcdf08998 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -237,7 +237,7 @@ int16_t packet_lengths[] = //0 1 2 3 4 5 6 7 8 9 a b c d e f //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0900 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 75f0a9ecb..cbd4585c6 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -117,6 +117,7 @@ #define SMSG_PLAYER_COOKING_LIST 0x025a #define SMSG_PLAYER_READ_BOOK 0x0294 #define SMSG_PLAYER_EQUIP_TICK_ACK 0x02d9 +#define SMSG_PLAYER_FAVORITE_ITEM 0x0908 #define SMSG_SKILL_FAILED 0x0110 #define SMSG_SKILL_DAMAGE 0x01de #define SMSG_SKILL_AUTO_CAST 0x0147 -- cgit v1.2.3-70-g09d2