summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/serverfeatures.cpp5
-rw-r--r--src/net/eathena/serverfeatures.h2
-rw-r--r--src/net/serverfeatures.h2
-rw-r--r--src/net/tmwa/guildhandler.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.h2
6 files changed, 20 insertions, 1 deletions
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index f724d663a..1e055191b 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -67,4 +67,9 @@ bool ServerFeatures::haveBrokenPlayerAttackDistance() const
return false;
}
+bool ServerFeatures::haveNativeGuilds() const
+{
+ return true;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index fcd4cc97a..6ca4df652 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -47,6 +47,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool havePlayerStatusUpdate() const override final;
bool haveBrokenPlayerAttackDistance() const override final;
+
+ bool haveNativeGuilds() const override final;
};
} // namespace EAthena
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index b3407d2b0..b90df0796 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -44,6 +44,8 @@ class ServerFeatures notfinal
virtual bool havePlayerStatusUpdate() const = 0;
virtual bool haveBrokenPlayerAttackDistance() const = 0;
+
+ virtual bool haveNativeGuilds() const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index 852dfa135..8947c7c32 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -26,6 +26,9 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
+#include "net/net.h"
+#include "net/serverfeatures.h"
+
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
@@ -83,7 +86,7 @@ GuildHandler::~GuildHandler()
void GuildHandler::handleMessage(Net::MessageIn &msg)
{
BLOCK_START("GuildHandler::handleMessage")
- if (tmwServerVersion > 0)
+ if (!Net::getServerFeatures()->haveNativeGuilds())
return;
switch (msg.getId())
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 86f679ae9..498d19249 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -69,4 +69,9 @@ bool ServerFeatures::haveBrokenPlayerAttackDistance() const
return serverVersion < 1;
}
+bool ServerFeatures::haveNativeGuilds() const
+{
+ return tmwServerVersion <= 0;
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 8bf7288b3..3aba539dd 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -47,6 +47,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool havePlayerStatusUpdate() const override final;
bool haveBrokenPlayerAttackDistance() const override final;
+
+ bool haveNativeGuilds() const override final;
};
} // namespace TmwAthena