summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-01 14:18:23 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-01 14:18:23 +0300
commit2c02974d98d94f54b70434202bb2edf4cba8640f (patch)
tree9a312cdcc1d2e1b7d81d2005aef2d7a3ecdfe9b8
parentd86ad9d847d1898e199ffcb37cb398c6c2b02efc (diff)
downloadmv-2c02974d98d94f54b70434202bb2edf4cba8640f.tar.gz
mv-2c02974d98d94f54b70434202bb2edf4cba8640f.tar.bz2
mv-2c02974d98d94f54b70434202bb2edf4cba8640f.tar.xz
mv-2c02974d98d94f54b70434202bb2edf4cba8640f.zip
eathena: do not request warp name with evol plugin.
-rw-r--r--src/actormanager.cpp3
-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/serverfeatures.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.h2
6 files changed, 18 insertions, 1 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 032631d24..8222726f6 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -265,7 +265,8 @@ Being *ActorManager::createBeing(const int id,
}
else if (type == ActorType::Portal)
{
- beingHandler->requestNameById(id);
+ if (serverFeatures->haveServerWarpNames())
+ beingHandler->requestNameById(id);
}
if (type == ActorType::Player)
{
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index be55b9147..7689ebc2b 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -215,4 +215,9 @@ bool ServerFeatures::haveMovePet() const
return serverVersion >= 5;
}
+bool ServerFeatures::haveServerWarpNames() const
+{
+ return serverVersion == 0;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index d9ee23592..eff1cc439 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -105,6 +105,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveTalkPet() const override final;
bool haveMovePet() const override final;
+
+ bool haveServerWarpNames() const override final;
};
} // namespace EAthena
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 53871105f..bc860e233 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -102,6 +102,8 @@ class ServerFeatures notfinal
virtual bool haveTalkPet() const = 0;
virtual bool haveMovePet() const = 0;
+
+ virtual bool haveServerWarpNames() const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 9e68116da..be0b5ff59 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -214,4 +214,9 @@ bool ServerFeatures::haveMovePet() const
return true;
}
+bool ServerFeatures::haveServerWarpNames() const
+{
+ return false;
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index 48826f303..a570b1a52 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -105,6 +105,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveTalkPet() const override final;
bool haveMovePet() const override final;
+
+ bool haveServerWarpNames() const override final;
};
} // namespace TmwAthena