summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/net/eathena/beinghandler.cpp7
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 8 insertions, 2 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");
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 6775691f1..5483cf138 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -130,7 +130,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
// #0x0440
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index aa1ed94c2..12e307846 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -108,6 +108,7 @@
#define SMSG_PLAYER_STATUS_CHANGE 0x0119
#define SMSG_PLAYER_GUILD_PARTY_INFO 0x0195
#define SMSG_BEING_STATUS_CHANGE 0x0983
+#define SMSG_BEING_STATUS_CHANGE2 0x043f
#define SMSG_NPC_MESSAGE 0x00b4
#define SMSG_NPC_NEXT 0x00b5