summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index b856bc575..baaa3eccc 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -221,6 +221,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
processMapTypeProperty(msg);
break;
+ case SMSG_MONSTER_HP:
+ processMonsterHp(msg);
+ break;
+
default:
break;
}
@@ -1047,4 +1051,17 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processBeingAction")
}
+void BeingHandler::processMonsterHp(Net::MessageIn &msg) const
+{
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readInt32("monster id"));
+ const int hp = msg.readInt32("hp");
+ const int maxHP = msg.readInt32("max hp");
+ if (dstBeing)
+ {
+ dstBeing->setHP(hp);
+ dstBeing->setMaxHP(maxHP);
+ }
+}
+
} // namespace EAthena