diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-06 19:38:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-06 19:38:52 +0300 |
commit | e899e18fa2bca908251f7f87561561a822c7fe7d (patch) | |
tree | bbb44d78a389b53cef26b60492cf7e5350b5d49e | |
parent | ef5ed949e3a05620f6211515d7a950743b39babe (diff) | |
download | mv-e899e18fa2bca908251f7f87561561a822c7fe7d.tar.gz mv-e899e18fa2bca908251f7f87561561a822c7fe7d.tar.bz2 mv-e899e18fa2bca908251f7f87561561a822c7fe7d.tar.xz mv-e899e18fa2bca908251f7f87561561a822c7fe7d.zip |
Add server feature "have map server version".
-rw-r--r-- | src/net/eathena/serverfeatures.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.h | 2 | ||||
-rw-r--r-- | src/net/serverfeatures.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/serverfeatures.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/serverfeatures.h | 2 |
5 files changed, 17 insertions, 0 deletions
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 |