summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-03 18:39:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-03 18:39:14 +0300
commit0928d201335e8c247a44a1406cfbee3921ee7901 (patch)
tree06e5d2acf36921f368ae445ba1eac8e351181f18 /src/net/eathena
parent74397044b572c323f9c6bbc6338c17ce743ee3af (diff)
downloadmanaplus-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/eathena')
-rw-r--r--src/net/eathena/beingrecv.cpp12
1 files changed, 7 insertions, 5 deletions
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)
{