From 650ed453901c51b75234523fd70bd3d07d2244bc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 12 Aug 2015 19:24:16 +0300 Subject: With equipped items read cards (hercules). Changed client version to 9. --- src/net/eathena/beinghandler.cpp | 28 ++++++++++++++++++++++++++++ src/net/eathena/beinghandler.h | 2 ++ src/net/eathena/network.h | 2 +- src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 5 files changed, 33 insertions(+), 2 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index d12941fcd..f08344abc 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -86,6 +86,7 @@ BeingHandler::BeingHandler(const bool enableSync) : SMSG_BEING_SOUND_EFFECT, SMSG_BEING_EMOTION, SMSG_BEING_CHANGE_LOOKS2, + SMSG_BEING_CHANGE_LOOKS_CARDS, SMSG_BEING_NAME_RESPONSE, SMSG_BEING_NAME_RESPONSE2, SMSG_PLAYER_GUILD_PARTY_INFO, @@ -221,6 +222,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) processBeingChangeLook2(msg); break; + case SMSG_BEING_CHANGE_LOOKS_CARDS: + processBeingChangeLookCards(msg); + break; + case SMSG_BEING_NAME_RESPONSE: processNameResponse(msg); break; @@ -515,6 +520,29 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg) processBeingChangeLookContinue(msg, dstBeing, type, id, id2); } +void BeingHandler::processBeingChangeLookCards(Net::MessageIn &msg) +{ + if (!actorManager) + return; + + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); + const uint8_t type = msg.readUInt8("type"); + + const int id = msg.readInt16("id1"); + unsigned int id2 = msg.readInt16("id2"); + if (type != 2) + id2 = 1; + + for (int f = 0; f < 4; f ++) + msg.readInt16("card"); // +++ ignore cards for now + + if (!localPlayer || !dstBeing) + return; + + processBeingChangeLookContinue(msg, dstBeing, type, id, id2); +} + void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, Being *const dstBeing, const uint8_t type, diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index cb8707218..19a3bd2dc 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -54,6 +54,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler static void processBeingChangeLook2(Net::MessageIn &msg); + static void processBeingChangeLookCards(Net::MessageIn &msg); + static void processBeingVisible(Net::MessageIn &msg); static void processBeingMove(Net::MessageIn &msg); diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h index 89bd5f816..0d25bbf38 100644 --- a/src/net/eathena/network.h +++ b/src/net/eathena/network.h @@ -29,7 +29,7 @@ * Protocol version, reported to the eAthena char and mapserver who can adjust * the protocol accordingly. */ -#define CLIENT_PROTOCOL_VERSION 8 +#define CLIENT_PROTOCOL_VERSION 9 namespace EAthena { diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 51639545d..f88571130 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -282,7 +282,7 @@ int16_t packet_lengths[] = //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0B00 16, -1, 10, -1, -1, -1, -1, 0, 27, 0, -1, -1, 0, 0, 0, 0, - -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, 0, 0, 0, 0, -1, 19, 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, // #0x0B40 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index a8cea65a4..79910fa95 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -154,6 +154,7 @@ packet(SMSG_BEING_REMOVE, 0x0080); packet(SMSG_BEING_REMOVE_SKILL, 0x0120); packet(SMSG_BEING_CHANGE_LOOKS_OUTDATED, 0x00c3); packet(SMSG_BEING_CHANGE_LOOKS2, 0x01d7); +packet(SMSG_BEING_CHANGE_LOOKS_CARDS, 0x0b17); packet(SMSG_BEING_SELFEFFECT, 0x019b); packet(SMSG_BEING_SPECIAL_EFFECT, 0x01f3); packet(SMSG_BEING_SPECIAL_EFFECT_NUM, 0x0284); -- cgit v1.2.3-70-g09d2