Decompile fn_21632 (CGameMode::ReceiveActorNameAll)

Batch #1591 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_21632 CGameMode::ReceiveActorNameAll: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
Adds to the build: Source/Network/ActorNamePacket.cpp
This commit is contained in:
ragnarok-clanker 2026-10-28 19:42:41 +00:00
commit 1ebead0e33
4 changed files with 39 additions and 0 deletions

View file

@ -9,6 +9,7 @@
#include <string>
class CView;
struct ActorNameAllPacket;
struct WorldScene;
class CGameMode : public CMode {
@ -27,6 +28,7 @@ public:
std::string MapName();
void WorldCell(float x, float z, int& column, int& row) const;
void PlayerCell(int* column, int* row) const;
void ReceiveActorNameAll(const ActorNameAllPacket* packet);
};
#if defined(_WIN32) && !defined(_WIN64)

View file

@ -0,0 +1,13 @@
#include "Client/Mode/CGameMode.h"
#include "Network/ActorNamePacket.h"
#include <string>
// OFFSET: 0x00D1DFB0
// FUNCTION: fn_21632
void CGameMode::ReceiveActorNameAll(const ActorNameAllPacket* packet) {
this->nameCard.Set(packet->actorId, std::string(packet->name, packet->name + sizeof(packet->name)).c_str(),
std::string(packet->partyName, packet->partyName + sizeof(packet->partyName)).c_str(),
std::string(packet->guildName, packet->guildName + sizeof(packet->guildName)).c_str(),
std::string(packet->positionName, packet->positionName + sizeof(packet->positionName)).c_str(), std::string(), std::string(), 0);
}

View file

@ -0,0 +1,23 @@
#ifndef RAGNAROK_SOURCE_NETWORK_ACTORNAMEPACKET_H
#define RAGNAROK_SOURCE_NETWORK_ACTORNAMEPACKET_H
#include <cstddef>
#include <cstdint>
#pragma pack(push, 1)
struct ActorNameAllPacket {
/* 0000 */ std::int16_t id;
/* 0002 */ std::uint32_t actorId;
/* 0006 */ char name[24];
/* 001E */ char partyName[24];
/* 0036 */ char guildName[24];
/* 004E */ char positionName[24];
};
#pragma pack(pop)
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(ActorNameAllPacket, positionName) == 0x4E);
static_assert(sizeof(ActorNameAllPacket) == 0x66);
#endif
#endif

View file

@ -447,6 +447,7 @@
"Source/File/MapName.cpp": 1,
"Source/File/ResourcePath.cpp": 1,
"Source/File/ShortcutFilename.cpp": 1,
"Source/Network/ActorNamePacket.cpp": 0,
"Source/Network/ClientKeepalive.cpp": 0,
"Source/Network/ClientOptionPacket.cpp": 0,
"Source/Network/Connection/Connection.cpp": 0,