summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-14 18:34:14 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-14 18:34:14 +0300
commit2fe16d770e2d0990e74711039a15a47d6a57782d (patch)
treea9c54f8805941ddd9f7cbd0e3487493fbff0b483 /src/net/tmwa
parent7450c2b0f968a5dada1222dbbc137362d331e491 (diff)
downloadplus-2fe16d770e2d0990e74711039a15a47d6a57782d.tar.gz
plus-2fe16d770e2d0990e74711039a15a47d6a57782d.tar.bz2
plus-2fe16d770e2d0990e74711039a15a47d6a57782d.tar.xz
plus-2fe16d770e2d0990e74711039a15a47d6a57782d.zip
Use haveServerHp feature in getting hp in tmwa.
Also use haveServerHp in drawing hp bar.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 75f1e2875..5b62cafb4 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -36,8 +36,11 @@
#include "gui/windows/outfitwindow.h"
#include "gui/windows/socialwindow.h"
+#include "net/net.h"
+
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
+#include "net/tmwa/serverfeatures.h"
#include "net/tmwa/sprite.h"
#include "resources/iteminfo.h"
@@ -1102,7 +1105,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg)
uint16_t gloves;
if (dstBeing->getType() == ActorType::Monster)
{
- if (serverVersion > 0 || tmwServerVersion >= 0x0E0701)
+ if (Net::getServerFeatures()->haveServerHp())
{
const int hp = msg.readInt32("hp");
const int maxHP = msg.readInt32("max hp");
@@ -1305,7 +1308,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg)
uint16_t gloves;
if (dstBeing->getType() == ActorType::Monster)
{
- if (serverVersion > 0 || tmwServerVersion >= 0x0E0701)
+ if (Net::getServerFeatures()->haveServerHp())
{
const int hp = msg.readInt32("hp");
const int maxHP = msg.readInt32("max hp");