From ad04cbfc166ac5166d8967165bddb719a970fe5f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Nov 2014 22:29:38 +0300 Subject: Add server feature haveNpcSex. --- src/net/eathena/serverfeatures.cpp | 5 +++++ 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, 16 insertions(+) (limited to 'src') diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index 911bacbe3..596623fbb 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -165,4 +165,9 @@ bool ServerFeatures::haveMapServerVersion() const return serverVersion > 0; } +bool ServerFeatures::haveNpcGender() const +{ + return serverVersion >= 3; +} + } // namespace EAthena diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index 3de5c0c83..735e19913 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -85,6 +85,8 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerVersion() const override final; bool haveMapServerVersion() const override final; + + bool haveNpcGender() const override final; }; } // namespace EAthena diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index b031bf0d1..599d7e54d 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -82,6 +82,8 @@ class ServerFeatures notfinal virtual bool haveServerVersion() const = 0; virtual bool haveMapServerVersion() const = 0; + + virtual bool haveNpcGender() const = 0; }; } // namespace Net diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index e81fe7def..7068638fa 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -164,4 +164,9 @@ bool ServerFeatures::haveMapServerVersion() const return false; } +bool ServerFeatures::haveNpcGender() const +{ + return serverVersion > 0; +} + } // namespace TmwAthena diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index 58c7aa5bd..7a449b268 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -85,6 +85,8 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerVersion() const override final; bool haveMapServerVersion() const override final; + + bool haveNpcGender() const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2