summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-07 22:05:12 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-07 22:05:12 +0300
commit91e4a003fdcaa21e7d375d3eaf92ea9f6166b841 (patch)
tree5ab1312bbe541c417df19441d30fab399ac681d3 /src/actormanager.cpp
parent6c077bb84b2b33339100382494163034ec092a0c (diff)
downloadmv-91e4a003fdcaa21e7d375d3eaf92ea9f6166b841.tar.gz
mv-91e4a003fdcaa21e7d375d3eaf92ea9f6166b841.tar.bz2
mv-91e4a003fdcaa21e7d375d3eaf92ea9f6166b841.tar.xz
mv-91e4a003fdcaa21e7d375d3eaf92ea9f6166b841.zip
Disable all legacy "magic" commands if server type not tmwa.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 471d8d72e..5feb04a59 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -48,6 +48,7 @@
#include "net/beinghandler.h"
#include "net/charserverhandler.h"
+#include "net/net.h"
#include "net/packetlimiter.h"
#include "net/playerhandler.h"
#include "net/serverfeatures.h"
@@ -1328,8 +1329,15 @@ void ActorManager::healTarget() const
void ActorManager::heal(const Being *const target) const
{
- if (!localPlayer || !chatWindow || !localPlayer->isAlive()
- || !playerHandler->canUseMagic())
+#ifdef EATHENA_SUPPORT
+ if (Net::getNetworkType() != ServerType::TMWATHENA)
+ return;
+#endif
+
+ if (!localPlayer ||
+ !chatWindow ||
+ !localPlayer->isAlive() ||
+ !playerHandler->canUseMagic())
{
return;
}
@@ -1447,8 +1455,14 @@ Being* ActorManager::findMostDamagedPlayer(const int maxTileDist) const
void ActorManager::itenplz() const
{
- if (!localPlayer || !chatWindow || !localPlayer->isAlive()
- || !playerHandler->canUseMagic())
+#ifdef EATHENA_SUPPORT
+ if (Net::getNetworkType() != ServerType::TMWATHENA)
+ return;
+#endif
+ if (!localPlayer ||
+ !chatWindow ||
+ !localPlayer->isAlive() ||
+ !playerHandler->canUseMagic())
{
return;
}