From 7450c2b0f968a5dada1222dbbc137362d331e491 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Sep 2014 18:26:03 +0300 Subject: Add server feature haveServerHp. --- src/net/eathena/serverfeatures.cpp | 5 +++++ src/net/eathena/serverfeatures.h | 2 ++ src/net/serverfeatures.h | 2 ++ src/net/tmwa/serverfeatures.cpp | 6 ++++++ src/net/tmwa/serverfeatures.h | 2 ++ 5 files changed, 17 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index a6c52491f..98deca54f 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -47,4 +47,9 @@ bool ServerFeatures::haveChangePartyLeader() const return true; } +bool ServerFeatures::haveServerHp() const +{ + return true; +} + } // namespace EAthena diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index bca6f8f50..9e297b25e 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -39,6 +39,8 @@ class ServerFeatures final : public Net::ServerFeatures bool havePartyNickInvite() const override final; bool haveChangePartyLeader() const override final; + + bool haveServerHp() const override final; }; } // namespace EAthena diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index 504a5dbae..a653e2679 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -36,6 +36,8 @@ class ServerFeatures notfinal virtual bool havePartyNickInvite() const = 0; virtual bool haveChangePartyLeader() const = 0; + + virtual bool haveServerHp() const = 0; }; } // namespace Net diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index 547803354..aeb514bb1 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -23,6 +23,7 @@ #include "debug.h" extern int serverVersion; +extern int tmwServerVersion; extern Net::ServerFeatures *serverFeatures; namespace TmwAthena @@ -48,4 +49,9 @@ bool ServerFeatures::haveChangePartyLeader() const return false; } +bool ServerFeatures::haveServerHp() const +{ + return serverVersion > 0 || tmwServerVersion >= 0x0E0701; +} + } // namespace TmwAthena diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index 4fad87256..0ce0b507a 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -39,6 +39,8 @@ class ServerFeatures final : public Net::ServerFeatures bool havePartyNickInvite() const override final; bool haveChangePartyLeader() const override final; + + bool haveServerHp() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2