summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/ea/adminhandler.cpp15
-rw-r--r--src/net/ea/adminhandler.h2
-rw-r--r--src/net/eathena/adminhandler.cpp6
-rw-r--r--src/net/eathena/adminhandler.h2
-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/adminhandler.cpp7
-rw-r--r--src/net/tmwa/adminhandler.h2
-rw-r--r--src/net/tmwa/serverfeatures.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.h2
11 files changed, 17 insertions, 33 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp
index d02d0ceda..a5bfeea27 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/ea/adminhandler.cpp
@@ -22,8 +22,6 @@
#include "net/ea/adminhandler.h"
-#include "game.h"
-
#include "net/serverfeatures.h"
#include "utils/gmfunctions.h"
@@ -72,19 +70,6 @@ void AdminHandler::createItems(const int id,
strprintf("%d %d", id, amount));
}
-void AdminHandler::slide(const int x, const int y) const
-{
- if (serverFeatures->haveSlide())
- {
- Gm::runCommand("slide",
- strprintf("%d %d", x, y));
- }
- else
- {
- warp(Game::instance()->getCurrentMapName(), x, y);
- }
-}
-
void AdminHandler::spawn(const std::string &name) const
{
Gm::runCommand("spawn", name);
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h
index 2577c0322..f300fda55 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -53,8 +53,6 @@ class AdminHandler notfinal : public Net::AdminHandler
void ipcheckName(const std::string &name) const override final;
- void slide(const int x, const int y) const override final;
-
void createItems(const int id,
const ItemColor color,
const int amount) const override final;
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index a2aa38734..e063f2f01 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -367,4 +367,10 @@ void AdminHandler::guildRecall(const std::string &name) const
Gm::runCommand("guildrecall", name);
}
+void AdminHandler::slide(const int x, const int y) const
+{
+ Gm::runCommand("slide",
+ strprintf("%d %d", x, y));
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index 5c632a88b..0c9e25e72 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -154,6 +154,8 @@ class AdminHandler final : public Ea::AdminHandler
void guildRecall(const std::string &name) const override final;
+ void slide(const int x, const int y) const override final;
+
protected:
static std::string mStatsName;
};
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index 2c7896eed..9849f0811 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -136,11 +136,6 @@ bool ServerFeatures::haveExtendedRiding() const
return serverVersion > 0;
}
-bool ServerFeatures::haveSlide() const
-{
- return true;
-}
-
bool ServerFeatures::haveExtendedDropsPosition() const
{
return serverVersion >= 12;
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index 509807adf..308cca255 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -74,8 +74,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveExtendedRiding() const override final;
- bool haveSlide() const override final;
-
bool haveExtendedDropsPosition() const override final;
bool haveSecureTrades() const override final;
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 5c8fc87f9..3e8fdce99 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -76,8 +76,6 @@ class ServerFeatures notfinal
virtual bool haveExtendedRiding() const = 0;
- virtual bool haveSlide() const = 0;
-
virtual bool haveExtendedDropsPosition() const = 0;
virtual bool haveSecureTrades() const = 0;
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index 9323f7b04..514c53090 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -22,6 +22,8 @@
#include "net/tmwa/adminhandler.h"
+#include "game.h"
+
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocolout.h"
@@ -287,4 +289,9 @@ void AdminHandler::guildRecall(const std::string &name A_UNUSED) const
{
}
+void AdminHandler::slide(const int x, const int y) const
+{
+ warp(Game::instance()->getCurrentMapName(), x, y);
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h
index b43d5fd0c..7cbf7c0f8 100644
--- a/src/net/tmwa/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -167,6 +167,8 @@ class AdminHandler final : public Ea::AdminHandler
void breakGuild(const std::string &name) const override final A_CONST;
void guildRecall(const std::string &name) const override final A_CONST;
+
+ void slide(const int x, const int y) const override final;
};
} // namespace TmwAthena
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 4613d55ed..f6fc06671 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -134,11 +134,6 @@ bool ServerFeatures::haveExtendedRiding() const
return false;
}
-bool ServerFeatures::haveSlide() const
-{
- return false;
-}
-
bool ServerFeatures::haveExtendedDropsPosition() const
{
return false;
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 453ab9b35..7f2efbf64 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -74,8 +74,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveExtendedRiding() const override final A_CONST;
- bool haveSlide() const override final A_CONST;
-
bool haveExtendedDropsPosition() const override final A_CONST;
bool haveSecureTrades() const override final A_CONST;