summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/beinghandler.h2
-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
-rw-r--r--src/net/tmwa/beinghandler.cpp4
-rw-r--r--src/net/tmwa/beinghandler.h2
8 files changed, 26 insertions, 1 deletions
diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h
index 4e0ac021e..81a9e5a79 100644
--- a/src/net/beinghandler.h
+++ b/src/net/beinghandler.h
@@ -37,6 +37,8 @@ class BeingHandler notfinal
virtual void requestNameById(const BeingId id) const = 0;
+ virtual void requestNameByCharId(const int id) const = 0;
+
virtual void undress(Being *const being) const = 0;
#ifdef EATHENA_SUPPORT
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);
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 2cbd41835..61da647e1 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -68,4 +68,8 @@ void BeingHandler::viewPlayerEquipment(const Being *const being A_UNUSED)
{
}
+void BeingHandler::requestNameByCharId(const int id A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index 1776ddd96..bb39983d5 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -43,6 +43,8 @@ class BeingHandler final : public Ea::BeingHandler
void requestRanks(const RankT rank A_UNUSED) const override final;
#endif
+ void requestNameByCharId(const int id) const override final;
+
protected:
void viewPlayerEquipment(const Being *const being);
};