From 789aac29caf90e3eabe2f912fb0e0653ee290797 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Mar 2015 13:43:49 +0300 Subject: eathena: add partial support for packet SMSG_PLAYER_REFINE_LIST 0x0221. --- src/net/eathena/inventoryhandler.cpp | 22 ++++++++++++++++++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 5e1a7fd95..c42e31903 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -109,6 +109,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_REFINE, SMSG_PLAYER_REPAIR_LIST, SMSG_PLAYER_REPAIR_EFFECT, + SMSG_PLAYER_REFINE_LIST, 0 }; handledMessages = _messages; @@ -253,6 +254,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processPlayerRepairEffect(msg); break; + case SMSG_PLAYER_REFINE_LIST: + processPlayerRefineList(msg); + break; + default: break; } @@ -1020,4 +1025,21 @@ void InventoryHandler::processPlayerRepairEffect(Net::MessageIn &msg) msg.readUInt8("flag"); } +void InventoryHandler::processPlayerRefineList(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + const int count = (msg.readInt16("len") - 4) / 13; + + for (int f = 0; f < count; f ++) + { + msg.readInt16("item index"); + msg.readInt16("item id"); + msg.readUInt8("refine"); + for (int d = 0; d < 4; d ++) + msg.readInt16("card"); + } + menu = MenuType::WeaponeRefine; +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 5add72e20..1bd354382 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -125,6 +125,8 @@ class InventoryHandler final : public MessageHandler, static void processPlayerRepairEffect(Net::MessageIn &msg); + static void processPlayerRefineList(Net::MessageIn &msg); + static Ea::InventoryItems mCartItems; }; diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 3cd224249..7329e0229 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -85,7 +85,7 @@ int16_t packet_lengths[] = // #0x0200 26, -1, 0, 0, 18, 26, 11, 34, 0, 36, 10, 19, 10, 0, 32, 0, 22, -1, 16, 0, 42, 6, 6, 0, 0, 282, 282, 10, 10, 0, 0, 0, - -1, 122, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 19, 71, 5, + -1, -1, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 19, 71, 5, 12, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // #0x0240 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 e1fdb8bae..9b0a6da3a 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -107,6 +107,7 @@ #define SMSG_PLAYER_REPAIR_EFFECT 0x01fe #define SMSG_PLAYER_FAME_BLACKSMITH 0x021b #define SMSG_PLAYER_FAME_ALCHEMIST 0x021c +#define SMSG_PLAYER_REFINE_LIST 0x0221 #define SMSG_SKILL_FAILED 0x0110 #define SMSG_SKILL_DAMAGE 0x01de #define SMSG_SKILL_AUTO_CAST 0x0147 -- cgit v1.2.3-70-g09d2