summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actormanager.cpp6
-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, 22 insertions, 0 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index d920d63ac..ae57b4d6d 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -50,6 +50,7 @@
#include "net/charserverhandler.h"
#include "net/packetlimiter.h"
#include "net/playerhandler.h"
+#include "net/serverfeatures.h"
#include "resources/iteminfo.h"
@@ -253,6 +254,11 @@ Being *ActorManager::createBeing(const int id,
if (localPlayer)
localPlayer->checkNewName(being);
}
+ else if (type == ActorType::Monster)
+ {
+ if (serverFeatures->haveMonsterName())
+ beingHandler->requestNameById(id);
+ }
else if (type == ActorType::Portal)
{
beingHandler->requestNameById(id);
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index 00357e65f..f7bd1fe09 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -137,4 +137,9 @@ bool ServerFeatures::haveCharRename() const
return true;
}
+bool ServerFeatures::haveMonsterName() const
+{
+ return true;
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index 5c37cc066..813e2e53e 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -70,6 +70,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveMonsterAttackRange() const override final;
+ bool haveMonsterName() const override final;
+
bool haveEmailOnRegister() const override final;
bool haveEightDirections() const override final;
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 464ee7a8f..c16d11f99 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -67,6 +67,8 @@ class ServerFeatures notfinal
virtual bool haveMonsterAttackRange() const = 0;
+ virtual bool haveMonsterName() const = 0;
+
virtual bool haveEmailOnRegister() const = 0;
virtual bool haveEightDirections() const = 0;
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 3c603f245..c94c093a4 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -139,4 +139,9 @@ bool ServerFeatures::haveCharRename() const
return false;
}
+bool ServerFeatures::haveMonsterName() const
+{
+ return false;
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index adddbd964..97c42d1e4 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -70,6 +70,8 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveMonsterAttackRange() const override final;
+ bool haveMonsterName() const override final;
+
bool haveEmailOnRegister() const override final;
bool haveEightDirections() const override final;