summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index ef4eac8c6..fd7f51368 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -191,6 +191,9 @@ ActorManager::ActorManager() :
mActors(),
mDeleteActors(),
mBlockedBeings(),
+#ifdef EATHENA_SUPPORT
+ mChars(),
+#endif
mMap(nullptr),
mSpellHeal1(serverConfig.getValue("spellHeal1", "#lum")),
mSpellHeal2(serverConfig.getValue("spellHeal2", "#inma")),
@@ -908,6 +911,10 @@ void ActorManager::clear()
if (localPlayer)
mActors.insert(localPlayer);
+
+#ifdef EATHENA_SUPPORT
+ mChars.clear();
+#endif
}
Being *ActorManager::findNearestPvpPlayer() const
@@ -1980,4 +1987,19 @@ void ActorManager::updateRoom(const ChatObject *const newChat)
}
}
}
+
+std::string ActorManager::findCharById(const int32_t id)
+{
+ std::map<int32_t, std::string>::const_iterator it = mChars.find(id);
+ if (it == mChars.end())
+ return std::string();
+ return (*it).second;
+}
+
+void ActorManager::addChar(const int32_t id,
+ const std::string &name)
+{
+ mChars[id] = name;
+}
+
#endif