summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-03 19:50:26 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-03 19:50:26 +0300
commitf26d3df5feef535d3eede09f581a5cbc08cae2a1 (patch)
tree79a7776b5d22fd34a1f7e105a941a22de9ef9176 /src/net/eathena/beingrecv.cpp
parent74e3ec3edcae04931238c2e6be93c60c087571e9 (diff)
downloadplus-f26d3df5feef535d3eede09f581a5cbc08cae2a1.tar.gz
plus-f26d3df5feef535d3eede09f581a5cbc08cae2a1.tar.bz2
plus-f26d3df5feef535d3eede09f581a5cbc08cae2a1.tar.xz
plus-f26d3df5feef535d3eede09f581a5cbc08cae2a1.zip
Separate being and monster hp packets.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 86786f1fa..c1dcdbd83 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1066,10 +1066,10 @@ void BeingRecv::processBeingAction2(Net::MessageIn &msg)
BLOCK_END("BeingRecv::processBeingAction2")
}
-void BeingRecv::processMonsterHp(Net::MessageIn &msg)
+void BeingRecv::processBeingHp(Net::MessageIn &msg)
{
Being *const dstBeing = actorManager->findBeing(
- msg.readBeingId("monster id"));
+ msg.readBeingId("being id"));
int hp;
int maxHP;
if (msg.getVersion() >= 20100126)
@@ -1089,6 +1089,19 @@ void BeingRecv::processMonsterHp(Net::MessageIn &msg)
}
}
+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");
+ if (dstBeing)
+ {
+ dstBeing->setHP(hp);
+ dstBeing->setMaxHP(maxHP);
+ }
+}
+
void BeingRecv::processSkillAutoCast(Net::MessageIn &msg)
{
const int id = msg.readInt16("skill id");