From 16a57526fbe271bd067cfa4ec44f2da9494bfa1f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Mar 2015 18:23:50 +0300 Subject: eathena: add partial support for packet SMSG_ITEM_DAMAGED 0x02bb. --- 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 4cbe83027..63799f8db 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -113,6 +113,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_STORAGE_PASSWORD, SMSG_PLAYER_STORAGE_PASSWORD_RESULT, SMSG_PLAYER_COOKING_LIST, + SMSG_ITEM_DAMAGED, 0 }; handledMessages = _messages; @@ -273,6 +274,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processPlayerCookingList(msg); break; + case SMSG_ITEM_DAMAGED: + processItemDamaged(msg); + break; + default: break; } @@ -1082,4 +1087,12 @@ void InventoryHandler::processPlayerCookingList(Net::MessageIn &msg) msg.readInt16("item id"); } +void InventoryHandler::processItemDamaged(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + msg.readInt16("position"); + msg.readInt32("account id"); +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 8cf69408a..0f2363f24 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -133,6 +133,8 @@ class InventoryHandler final : public MessageHandler, static void processPlayerCookingList(Net::MessageIn &msg); + static void processItemDamaged(Net::MessageIn &msg); + static Ea::InventoryItems mCartItems; }; diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index f65552728..01dbbbb5f 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -96,7 +96,7 @@ int16_t packet_lengths[] = 0, 0, 0, 6, 14, 0, 0, -1, 0, 12, 18, 0, 0, 0, 4, 0, 4, 4, 0, 70, 10, 0, 0, 0, 8, 6, 0, 80, 0, -1, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -1, -1, 107, 6, -1, 0, 7, 22, 191, 0, 0, 0, 0, 0, 0, + 0, -1, -1, 107, 6, -1, 0, 7, 22, 191, 0, 8, 0, 0, 0, 0, // #0x02C0 0, -1, 0, 0, 0, 30, 30, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 434620bc6..a14e46421 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -159,6 +159,7 @@ #define SMSG_STARS_KILL 0x020e #define SMSG_GLADIATOR_FEEL_REQUEST 0x0253 #define SMSG_BOSS_MAP_INFO 0x0293 +#define SMSG_ITEM_DAMAGED 0x02bb #define SMSG_PLAYER_STATUS_CHANGE 0x0229 #define SMSG_PLAYER_STATUS_CHANGE2 0x028a -- cgit v1.2.3-70-g09d2