diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-03 18:39:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-03 18:39:14 +0300 |
commit | 0928d201335e8c247a44a1406cfbee3921ee7901 (patch) | |
tree | 06e5d2acf36921f368ae445ba1eac8e351181f18 /src/net/ea/beingrecv.cpp | |
parent | 74397044b572c323f9c6bbc6338c17ce743ee3af (diff) | |
download | manaplus-0928d201335e8c247a44a1406cfbee3921ee7901.tar.gz manaplus-0928d201335e8c247a44a1406cfbee3921ee7901.tar.bz2 manaplus-0928d201335e8c247a44a1406cfbee3921ee7901.tar.xz manaplus-0928d201335e8c247a44a1406cfbee3921ee7901.zip |
Add option for saving mapping between account id and nicks.
This information stored in separate files.
Diffstat (limited to 'src/net/ea/beingrecv.cpp')
-rw-r--r-- | src/net/ea/beingrecv.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp index cb8af0318..21e79a089 100644 --- a/src/net/ea/beingrecv.cpp +++ b/src/net/ea/beingrecv.cpp @@ -310,8 +310,11 @@ void BeingRecv::processNameResponse(Net::MessageIn &msg) } const BeingId beingId = msg.readBeingId("being id"); + const std::string name = msg.readString(24, "name"); Being *const dstBeing = actorManager->findBeing(beingId); + actorManager->updateNameId(name, beingId); + if (dstBeing) { if (beingId == localPlayer->getId()) @@ -320,7 +323,6 @@ void BeingRecv::processNameResponse(Net::MessageIn &msg) } else { - const std::string name = msg.readString(24, "name"); if (dstBeing->getType() != ActorType::Portal) { dstBeing->setName(name); @@ -357,7 +359,6 @@ void BeingRecv::processNameResponse(Net::MessageIn &msg) return; } } - msg.readString(24, "name"); BLOCK_END("BeingRecv::processNameResponse") } |