diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-12 19:24:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-12 19:24:16 +0300 |
commit | 650ed453901c51b75234523fd70bd3d07d2244bc (patch) | |
tree | 8f967a3d869c8b849dc5a3b732d1b2e73d47ed1a /src/net/eathena/beinghandler.cpp | |
parent | 0a7c70b7dc3a25fb0435b8b6fb60a3263b5c57bb (diff) | |
download | manaplus-650ed453901c51b75234523fd70bd3d07d2244bc.tar.gz manaplus-650ed453901c51b75234523fd70bd3d07d2244bc.tar.bz2 manaplus-650ed453901c51b75234523fd70bd3d07d2244bc.tar.xz manaplus-650ed453901c51b75234523fd70bd3d07d2244bc.zip |
With equipped items read cards (hercules).
Changed client version to 9.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
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, |