summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beinghandler.cpp6
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/eathena/beingrecv.cpp8
-rw-r--r--src/net/eathena/beingrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc2
5 files changed, 18 insertions, 1 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index ddee2d6fa..2d4686786 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -73,4 +73,10 @@ void BeingHandler::viewPlayerEquipment(const Being *const being)
outMsg.writeBeingId(being->getId(), "account id");
}
+void BeingHandler::requestNameByCharId(const int id) const
+{
+ createOutPacket(CMSG_SOLVE_CHAR_NAME);
+ outMsg.writeInt32(id, "character id");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index 6780e9bc3..11d2250ff 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -41,6 +41,8 @@ class BeingHandler final : public Ea::BeingHandler
void requestRanks(const RankT rank) const override final;
+ void requestNameByCharId(const int id) const override final;
+
protected:
void viewPlayerEquipment(const Being *const being);
};
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 2aaf6be7e..31a7bd371 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1672,4 +1672,12 @@ void BeingRecv::processSkillCancel(Net::MessageIn &msg)
msg.readInt32("id?");
}
+void BeingRecv::processSolveCharName(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32("char id");
+ const std::string name = msg.readString(24, "name");
+ if (actorManager)
+ actorManager->addChar(id, name);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/beingrecv.h b/src/net/eathena/beingrecv.h
index 95f7b50eb..31b35d5a3 100644
--- a/src/net/eathena/beingrecv.h
+++ b/src/net/eathena/beingrecv.h
@@ -110,6 +110,7 @@ namespace EAthena
void processPvpSet(Net::MessageIn &msg);
void processNameResponse2(Net::MessageIn &msg);
void processSkillCancel(Net::MessageIn &msg);
+ void processSolveCharName(Net::MessageIn &msg);
Being *createBeing2(Net::MessageIn &msg,
const BeingId id,
const int16_t job,
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 7d463d043..a2ffcfcbe 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -399,7 +399,7 @@ packet(SMSG_SKILL_NO_DAMAGE, 0x011a, 15, &Ea::BeingRecv::processS
packet(SMSG_SKILL_SNAP, 0x08d2, 10, &SkillRecv::processSkillSnap);
packet(SMSG_SKILL_UNIT_UPDATE, 0x01ac, 6, &SkillRecv::processSkillUnitUpdate);
packet(SMSG_SKILL_WARP_POINT, 0x011c, 68, &SkillRecv::processSkillWarpPoint);
-packet(SMSG_SOLVE_CHAR_NAME, 0x0194, 30, nullptr);
+packet(SMSG_SOLVE_CHAR_NAME, 0x0194, 30, &BeingRecv::processSolveCharName);
packet(SMSG_SPIRIT_BALLS, 0x01d0, 8, &BeingRecv::processSpiritBalls);
packet(SMSG_SPIRIT_BALL_SINGLE, 0x01e1, 8, &BeingRecv::processSpiritBallSingle);
packet(SMSG_STARS_KILL, 0x020e, 32, &BeingRecv::processStarsKill);