summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
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");