Decompile fn_21675 (CGameMode::ReceiveActorMessage34)

Batch #8969 by pedrao: 0 byte-identical, 1 confirmed by peer review.

- fn_21675 CGameMode::ReceiveActorMessage34: logic confirmed by peer review

Peer-reviewed-by: gordaoprogramas, KWDev, dori
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-31 23:39:53 +00:00
commit 73a99b3d73
2 changed files with 28 additions and 0 deletions

View file

@ -271,6 +271,7 @@ public:
void IgnoreRemovedPacket2(const unsigned char* packet);
void ReceiveBillingInfo(const unsigned char* packet);
void ReceiveActorMessage32(const unsigned char* packet);
void ReceiveActorMessage34(const unsigned char* packet);
void ReceiveStatusNotice(const unsigned char* packet);
void ReceivePartyBookingRegisterResult(const unsigned char* packet);
void ReceivePartyBookingSearchResult(const unsigned char* packet);

View file

@ -7388,3 +7388,30 @@ void CGameMode::AddMiniMapEffectMarker(const unsigned char* packet) {
g_miniMapEffectMarkers.emplace(marker->key, MiniMapEffectMarker{0x78, marker->x, marker->y});
}
struct ActorMessage32 {
/* 0000 */ std::string text;
/* 0018 */ std::string extra;
/* 0030 */ int unknown_0030;
/* 0034 */ int unknown_0034;
/* 0038 */ int unknown_0038;
/* 003C */ int unknown_003C;
};
// OFFSET: 0x00D25AC0
// FUNCTION: fn_21675
void CGameMode::ReceiveActorMessage34(const unsigned char* packet) {
this->unknown_01AC[*reinterpret_cast<const std::uint32_t*>(packet + 8)] = *reinterpret_cast<const std::uint32_t*>(packet + 4);
ActorMessage32 message;
message.text.assign(reinterpret_cast<const char*>(packet + 17), *reinterpret_cast<const std::int16_t*>(packet + 2) - 17);
message.unknown_0030 = packet[16];
message.unknown_0034 = *reinterpret_cast<const std::int16_t*>(packet + 14);
message.unknown_0038 = *reinterpret_cast<const std::int16_t*>(packet + 12);
message.unknown_003C = *reinterpret_cast<const int*>(packet + 8);
if (message.text.size() > 60) {
message.text.resize(60);
}
UIWindow* window = g_windowMgr.EnsureWindow(0x1C);
window->SendMsg(nullptr, 0x22, reinterpret_cast<std::intptr_t>(&message), 0, 0, 0);
}