summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-06 00:26:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:58 +0300
commitc1b0e49636cbc2a08f7690c33a6367542f6857b3 (patch)
tree5d0476e658d6dc5bc5cc10d49c72405954a940f6 /src/net/eathena/beinghandler.cpp
parent1ec5a1847a7c226d6dfee2a5d46c121a9a037161 (diff)
downloadplus-c1b0e49636cbc2a08f7690c33a6367542f6857b3.tar.gz
plus-c1b0e49636cbc2a08f7690c33a6367542f6857b3.tar.bz2
plus-c1b0e49636cbc2a08f7690c33a6367542f6857b3.tar.xz
plus-c1b0e49636cbc2a08f7690c33a6367542f6857b3.zip
eathena: add packet SMSG_BEING_STATUS_CHANGE2 0x043f.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index baaa3eccc..bff076502 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -83,6 +83,7 @@ BeingHandler::BeingHandler(const bool enableSync) :
SMSG_PLAYER_MOVE_TO_ATTACK,
SMSG_PLAYER_STATUS_CHANGE,
SMSG_BEING_STATUS_CHANGE,
+ SMSG_BEING_STATUS_CHANGE2,
SMSG_BEING_RESURRECT,
SMSG_SOLVE_CHAR_NAME,
SMSG_BEING_SPAWN,
@@ -194,6 +195,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_BEING_STATUS_CHANGE:
+ case SMSG_BEING_STATUS_CHANGE2:
processBeingStatusChange(msg);
break;
@@ -903,11 +905,14 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const
return;
}
+ const bool status1 = msg.getId() == SMSG_BEING_STATUS_CHANGE;
+
// Status change
const uint16_t status = msg.readInt16("status");
const int id = msg.readInt32("being id");
const bool flag = msg.readUInt8("flag: 0: stop, 1: start");
- msg.readInt32("total");
+ if (status1)
+ msg.readInt32("total");
msg.readInt32("left");
msg.readInt32("val1");
msg.readInt32("val2");