summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-01 03:20:54 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-01 03:20:54 +0300
commit1254155e406e83035d25190dfc9f5c25a839fc0d (patch)
tree8c60b172445d1feff8eb2393ff1b0e8065cddbf2 /src/net/eathena/beingrecv.cpp
parent0e1fefa2a4319738f7ab2a8a0e10be8a9e2b6ebc (diff)
downloadmv-1254155e406e83035d25190dfc9f5c25a839fc0d.tar.gz
mv-1254155e406e83035d25190dfc9f5c25a839fc0d.tar.bz2
mv-1254155e406e83035d25190dfc9f5c25a839fc0d.tar.xz
mv-1254155e406e83035d25190dfc9f5c25a839fc0d.zip
Add packet SMSG_BEING_ACTION2 0x02e1.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index a70c68bd8..3a1438c15 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -921,13 +921,20 @@ void BeingRecv::processBeingAction2(Net::MessageIn &msg)
msg.readInt32("tick");
const int srcSpeed = msg.readInt32("src speed");
msg.readInt32("dst speed");
- const int param1 = msg.readInt32("damage");
- if (serverVersion == 0 || serverVersion >= 11)
+ int param1;
+ if (msg.getVersion() >= 20071113)
+ param1 = msg.readInt32("damage");
+ else
+ param1 = msg.readInt16("damage");
+ if (msg.getVersion() >= 20131223)
msg.readUInt8("is sp damaged");
msg.readInt16("count");
const AttackTypeT type = static_cast<AttackTypeT>(
msg.readUInt8("action"));
- msg.readInt32("left damage");
+ if (msg.getVersion() >= 20071113)
+ msg.readInt32("left damage");
+ else
+ msg.readInt16("left damage");
switch (type)
{