From e899e18fa2bca908251f7f87561561a822c7fe7d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 6 Nov 2014 19:38:52 +0300 Subject: Add server feature "have map server version". --- src/net/eathena/serverfeatures.cpp | 6 ++++++ src/net/eathena/serverfeatures.h | 2 ++ src/net/serverfeatures.h | 2 ++ src/net/tmwa/serverfeatures.cpp | 5 +++++ 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 e15ea2133..943c6314e 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -24,6 +24,7 @@ #include "debug.h" +extern int serverVersion; extern Net::ServerFeatures *serverFeatures; namespace EAthena @@ -159,4 +160,9 @@ bool ServerFeatures::haveServerVersion() const return Net::getNetworkType() == ServerInfo::EVOL2; } +bool ServerFeatures::haveMapServerVersion() const +{ + return serverVersion > 0; +} + } // namespace EAthena diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index ecad6bef5..3de5c0c83 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -83,6 +83,8 @@ class ServerFeatures final : public Net::ServerFeatures bool haveBankApi() const override final; bool haveServerVersion() const override final; + + bool haveMapServerVersion() const override final; }; } // namespace EAthena diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index 75d2da955..b031bf0d1 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -80,6 +80,8 @@ class ServerFeatures notfinal virtual bool haveBankApi() const = 0; virtual bool haveServerVersion() const = 0; + + virtual bool haveMapServerVersion() const = 0; }; } // namespace Net diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index b83ef8edf..e81fe7def 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -159,4 +159,9 @@ bool ServerFeatures::haveServerVersion() const return true; } +bool ServerFeatures::haveMapServerVersion() const +{ + return false; +} + } // namespace TmwAthena diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index 2c3e1e06c..58c7aa5bd 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -83,6 +83,8 @@ class ServerFeatures final : public Net::ServerFeatures bool haveBankApi() const override final; bool haveServerVersion() const override final; + + bool haveMapServerVersion() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2