From 10e1a4858db10445f4c9b3f7b5574612e28a57a5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 12 Aug 2015 19:47:30 +0300 Subject: Send equipped cards to function processBeingChangeLookContinue. --- src/net/eathena/beinghandler.cpp | 12 ++++++++---- src/net/eathena/beinghandler.h | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src/net') diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index f08344abc..90a53dd50 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -517,7 +517,7 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg) if (!localPlayer || !dstBeing) return; - processBeingChangeLookContinue(msg, dstBeing, type, id, id2); + processBeingChangeLookContinue(msg, dstBeing, type, id, id2, nullptr); } void BeingHandler::processBeingChangeLookCards(Net::MessageIn &msg) @@ -525,6 +525,8 @@ void BeingHandler::processBeingChangeLookCards(Net::MessageIn &msg) if (!actorManager) return; + uint16_t cards[4]; + Being *const dstBeing = actorManager->findBeing( msg.readBeingId("being id")); const uint8_t type = msg.readUInt8("type"); @@ -535,19 +537,21 @@ void BeingHandler::processBeingChangeLookCards(Net::MessageIn &msg) id2 = 1; for (int f = 0; f < 4; f ++) - msg.readInt16("card"); // +++ ignore cards for now + cards[f] = msg.readInt16("card"); if (!localPlayer || !dstBeing) return; - processBeingChangeLookContinue(msg, dstBeing, type, id, id2); + processBeingChangeLookContinue(msg, dstBeing, type, id, id2, &cards[0]); } void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, Being *const dstBeing, const uint8_t type, const int id, - const int id2) + const int id2, + const uint16_t *cards + A_UNUSED) { if (dstBeing->getType() == ActorType::Player) dstBeing->setOtherTime(); diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 19a3bd2dc..bc77924b9 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -88,7 +88,9 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler Being *const dstBeing, const uint8_t type, const int id, - const int id2) A_NONNULL(2); + const int id2, + const uint16_t *cards) + A_NONNULL(2); static void processBeingSpecialEffect(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2