summaryrefslogtreecommitdiff
path: root/src/net
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
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')
-rw-r--r--src/net/eathena/homunculusrecv.cpp18
-rw-r--r--src/net/eathena/packetsin.inc1
2 files changed, 15 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,
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