From 84624960e3b934f9779f56e14004489320edb42f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Sep 2016 17:27:38 +0300 Subject: Add packet SMSG_HOMUNCULUS_INFO 0x09f7 --- src/net/eathena/homunculusrecv.cpp | 18 ++++++++++++++---- src/net/eathena/packetsin.inc | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/homunculusrecv.cpp b/src/net/eathena/homunculusrecv.cpp index 4511d89b1..92eacb03c 100644 --- a/src/net/eathena/homunculusrecv.cpp +++ b/src/net/eathena/homunculusrecv.cpp @@ -134,10 +134,20 @@ void HomunculusRecv::processHomunculusInfo(Net::MessageIn &msg) msg.readInt16("flee")); PlayerInfo::setStatBase(Attributes::HOMUN_ATTACK_DELAY, msg.readInt16("attack speed")); - PlayerInfo::setStatBase(Attributes::HOMUN_HP, - msg.readInt16("hp")); - PlayerInfo::setStatBase(Attributes::HOMUN_MAX_HP, - msg.readInt16("max hp")); + if (msg.getVersion() >= 20150513) + { + PlayerInfo::setStatBase(Attributes::HOMUN_HP, + msg.readInt32("hp")); + PlayerInfo::setStatBase(Attributes::HOMUN_MAX_HP, + msg.readInt32("max hp")); + } + else + { + PlayerInfo::setStatBase(Attributes::HOMUN_HP, + msg.readInt16("hp")); + PlayerInfo::setStatBase(Attributes::HOMUN_MAX_HP, + msg.readInt16("max hp")); + } PlayerInfo::setStatBase(Attributes::HOMUN_MP, msg.readInt16("sp")); PlayerInfo::setStatBase(Attributes::HOMUN_MAX_MP, diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 38c61c38f..ecab39c63 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -840,6 +840,7 @@ if (packetVersion >= 20150513) packet(SMSG_BEING_SPAWN, 0x09fe, -1, &BeingRecv::processBeingSpawn, 20150513); packet(SMSG_BEING_MOVE, 0x09fd, -1, &BeingRecv::processBeingMove, 20150513); packet(SMSG_PLAYER_HEAL, 0x0a27, 8, &PlayerRecv::processPlayerHeal, 20150513); + packet(SMSG_HOMUNCULUS_INFO, 0x09f7, 75, &HomunculusRecv::processHomunculusInfo, 20150513); } // 20150805 -- cgit v1.2.3-70-g09d2