summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 00:11:30 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 00:11:30 +0300
commit0fd358d0ebeb02f232f51eb669959c4d210f15cb (patch)
treeaa108b3cc60caafb9e57b3ab991bf9cd10e3728b
parent6cd9fbf483eedbdc782688c3a0507e23930c4d5b (diff)
downloadmanaplus-0fd358d0ebeb02f232f51eb669959c4d210f15cb.tar.gz
manaplus-0fd358d0ebeb02f232f51eb669959c4d210f15cb.tar.bz2
manaplus-0fd358d0ebeb02f232f51eb669959c4d210f15cb.tar.xz
manaplus-0fd358d0ebeb02f232f51eb669959c4d210f15cb.zip
eathena: read whole packet in processBeingChangeLook.
-rw-r--r--src/net/eathena/beinghandler.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 7104298a8..31cc4fc6a 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -264,9 +264,6 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg) const
Being *const dstBeing = actorManager->findBeing(
msg.readInt32("being id"));
- if (!dstBeing)
- return;
-
const uint8_t type = msg.readUInt8("type");
int id = 0;
unsigned int id2 = 0U;
@@ -281,13 +278,14 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg) const
else
{ // SMSG_BEING_CHANGE_LOOKS2
id = msg.readInt16("id1");
- if (type == 2)
- id2 = msg.readInt16("id2");
- else
+ id2 = msg.readInt16("id2");
+ if (type != 2)
id2 = 1;
-// color.clear();
}
+ if (!dstBeing)
+ return;
+
if (dstBeing->getType() == ActorType::PLAYER)
dstBeing->setOtherTime();