diff options
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index b52bd698e..be49cd625 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -990,8 +990,18 @@ void BeingRecv::processMonsterHp(Net::MessageIn &msg) { Being *const dstBeing = actorManager->findBeing( msg.readBeingId("monster id")); - const int hp = msg.readInt32("hp"); - const int maxHP = msg.readInt32("max hp"); + int hp; + int maxHP; + if (msg.getVersion() >= 20100126) + { + hp = msg.readInt32("hp"); + maxHP = msg.readInt32("max hp"); + } + else + { + hp = msg.readInt16("hp"); + maxHP = msg.readInt16("max hp"); + } if (dstBeing) { dstBeing->setHP(hp); |