rodecomp/Source/Network/ActorNamePacket.cpp
ragnarok-clanker 74499f1b99 Decompile fn_21633 (CGameMode::ReceiveActorNameTitle)
Batch #7028 by Bielhp: 0 byte-identical, 1 confirmed by peer review.

- fn_21633 CGameMode::ReceiveActorNameTitle: logic confirmed by peer review

Peer-reviewed-by: Lumen, Snow, Landruca
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-31 03:28:08 +00:00

32 lines
1.3 KiB
C++

#include "Client/Mode/CGameMode.h"
#include "Client/Session.h"
#include "Network/ActorNamePacket.h"
#include "UI/Edit/UIEditCtrl.h"
#include "UI/Window/UIPetInfoWnd.h"
#include "UI/Window/UIWindowMgr.h"
#include <cstdio>
#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);
}
// OFFSET: 0x00D1E3D0
// FUNCTION: fn_21633
void CGameMode::ReceiveActorNameTitle(const ActorNameTitlePacket* packet) {
this->nameCard.Set(packet->actorId, std::string(packet->name, packet->name + sizeof(packet->name)).c_str(), std::string(), std::string(), std::string(),
std::string(), packet->title, packet->groupId);
if (packet->actorId == g_session.unknown_1010) {
std::sprintf(g_session.unknown_1018, packet->name);
if (UIPetInfoWnd* window = static_cast<UIPetInfoWnd*>(g_windowMgr.window_038C)) {
window->nameEdit->SetText(packet->name);
}
}
}