summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-10 12:36:08 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-10 12:38:00 +0300
commit574efa8ae89f7786239753537eb32c222686f4a1 (patch)
treedc6f15a6a2a968f459bf541b30b7ef1df71d9f8b /src/actormanager.cpp
parenta2af952c687ff666208a316d8b7b4e394df19d2f (diff)
downloadplus-574efa8ae89f7786239753537eb32c222686f4a1.tar.gz
plus-574efa8ae89f7786239753537eb32c222686f4a1.tar.bz2
plus-574efa8ae89f7786239753537eb32c222686f4a1.tar.xz
plus-574efa8ae89f7786239753537eb32c222686f4a1.zip
Impliment packets CMSG_SOLVE_CHAR_NAME and SMSG_SOLVE_CHAR_NAME.
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