diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/beingrecv.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 12 |
2 files changed, 10 insertions, 7 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") } diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index bb6fff382..35e983296 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1291,12 +1291,13 @@ void BeingRecv::processPlayerGuilPartyInfo(Net::MessageIn &msg) return; } - Being *const dstBeing = actorManager->findBeing( - msg.readBeingId("being id")); - + const BeingId beingId = msg.readBeingId("being id"); + const std::string name = msg.readString(24, "char name"); + actorManager->updateNameId(name, beingId); + Being *const dstBeing = actorManager->findBeing(beingId); if (dstBeing) { - dstBeing->setName(msg.readString(24, "char name")); + dstBeing->setName(name); dstBeing->setPartyName(msg.readString(24, "party name")); dstBeing->setGuildName(msg.readString(24, "guild name")); dstBeing->setGuildPos(msg.readString(24, "guild pos")); @@ -1621,8 +1622,9 @@ void BeingRecv::processNameResponse2(Net::MessageIn &msg) } const int len = msg.readInt16("len"); - const BeingId beingId = msg.readBeingId("account ic"); + const BeingId beingId = msg.readBeingId("account id"); const std::string str = msg.readString(len - 8, "name"); + actorManager->updateNameId(str, beingId); Being *const dstBeing = actorManager->findBeing(beingId); if (dstBeing) { |