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 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/net/eathena/beinghandler.cpp') 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, -- cgit v1.2.3-60-g2f50