summaryrefslogtreecommitdiff
path: root/src/net/eathena/homunculusrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-12 17:27:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-12 17:28:30 +0300
commit84624960e3b934f9779f56e14004489320edb42f (patch)
tree8aed65819cbf66b2c667cebc347042cf9024b247 /src/net/eathena/homunculusrecv.cpp
parent2507f262167386f83b46c4726f5d66fb99dad104 (diff)
downloadmanaplus-84624960e3b934f9779f56e14004489320edb42f.tar.gz
manaplus-84624960e3b934f9779f56e14004489320edb42f.tar.bz2
manaplus-84624960e3b934f9779f56e14004489320edb42f.tar.xz
manaplus-84624960e3b934f9779f56e14004489320edb42f.zip
Add packet SMSG_HOMUNCULUS_INFO 0x09f7
Diffstat (limited to 'src/net/eathena/homunculusrecv.cpp')
-rw-r--r--src/net/eathena/homunculusrecv.cpp18
1 files changed, 14 insertions, 4 deletions
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,