From 1254155e406e83035d25190dfc9f5c25a839fc0d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 1 Apr 2016 03:20:54 +0300 Subject: Add packet SMSG_BEING_ACTION2 0x02e1. --- src/net/eathena/beingrecv.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/net/eathena/beingrecv.cpp') 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( msg.readUInt8("action")); - msg.readInt32("left damage"); + if (msg.getVersion() >= 20071113) + msg.readInt32("left damage"); + else + msg.readInt16("left damage"); switch (type) { -- cgit v1.2.3-70-g09d2