summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-19 19:55:11 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-19 19:55:11 +0300
commitda0d45775996118858b918b4e308d25ebc0ba62a (patch)
tree5b0eccba746043baab73334ca3fe5f187341f170 /src
parentb4540594501d17626f4add4171e9f621798b6a12 (diff)
downloadmv-da0d45775996118858b918b4e308d25ebc0ba62a.tar.gz
mv-da0d45775996118858b918b4e308d25ebc0ba62a.tar.bz2
mv-da0d45775996118858b918b4e308d25ebc0ba62a.tar.xz
mv-da0d45775996118858b918b4e308d25ebc0ba62a.zip
In legacy server save all online list to log with mapping name to id.
Diffstat (limited to 'src')
-rw-r--r--src/net/tmwa/playerrecv.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/tmwa/playerrecv.cpp b/src/net/tmwa/playerrecv.cpp
index fb25aad2a..530621637 100644
--- a/src/net/tmwa/playerrecv.cpp
+++ b/src/net/tmwa/playerrecv.cpp
@@ -22,6 +22,7 @@
#include "net/tmwa/playerrecv.h"
+#include "actormanager.h"
#include "configuration.h"
#include "being/beingflag.h"
@@ -212,7 +213,7 @@ void PlayerRecv::processOnlineList(Net::MessageIn &msg)
for (int f = 0; f < count; f ++)
{
- msg.readBeingId("account id");
+ const BeingId beingId = msg.readBeingId("account id");
const std::string name = msg.readString(24, "name");
const unsigned char level = msg.readUInt8("level");
const unsigned char group = msg.readUInt8("group");
@@ -237,6 +238,8 @@ void PlayerRecv::processOnlineList(Net::MessageIn &msg)
gender = Gender::UNSPECIFIED;
arr.push_back(new OnlinePlayer(name,
status, level, gender, 0));
+ if (actorManager)
+ actorManager->updateNameId(name, beingId);
}
if (whoIsOnline != nullptr)