summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-14 18:16:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-14 18:16:46 +0300
commit953cc467b8a9ae97c02c9b30993bf2f420de7d2a (patch)
treeac06157bed74ccdcfb3f11b3f28d269255cc9c26 /src
parente390134047945b0d669249e62f6d525698be180e (diff)
downloadmv-953cc467b8a9ae97c02c9b30993bf2f420de7d2a.tar.gz
mv-953cc467b8a9ae97c02c9b30993bf2f420de7d2a.tar.bz2
mv-953cc467b8a9ae97c02c9b30993bf2f420de7d2a.tar.xz
mv-953cc467b8a9ae97c02c9b30993bf2f420de7d2a.zip
eathena: fix updating hp.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/beinghandler.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 4420f55c8..21d527454 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1012,9 +1012,11 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg)
dstBeing->setLevel(level);
msg.readInt16("font");
- // +++ need use hp and boss flag
- msg.readInt32("max hp");
- msg.readInt32("hp");
+ const int maxHP = msg.readInt32("max hp");
+ const int hp = msg.readInt32("hp");
+ dstBeing->setMaxHP(maxHP);
+ dstBeing->setHP(hp);
+
msg.readInt8("is boss");
dstBeing->setStunMode(stunMode);
@@ -1185,9 +1187,11 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg)
dstBeing->setLevel(level);
msg.readInt16("font");
- // +++ need use hp and boss flag
- msg.readInt32("max hp");
- msg.readInt32("hp");
+ const int maxHP = msg.readInt32("max hp");
+ const int hp = msg.readInt32("hp");
+ dstBeing->setMaxHP(maxHP);
+ dstBeing->setHP(hp);
+
msg.readInt8("is boss");
dstBeing->setStunMode(stunMode);
@@ -1347,9 +1351,11 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg)
dstBeing->setLevel(level);
msg.readInt16("font");
- // +++ need use hp and boss flag
- msg.readInt32("max hp");
- msg.readInt32("hp");
+ const int maxHP = msg.readInt32("max hp");
+ const int hp = msg.readInt32("hp");
+ dstBeing->setMaxHP(maxHP);
+ dstBeing->setHP(hp);
+
msg.readInt8("is boss");
dstBeing->setStunMode(stunMode);