rodecomp/Source/Network/Packets/PartyJoinRequest.cpp
ragnarok-clanker a47d20f8be Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
2026-10-25 07:42:41 +00:00

23 lines
746 B
C++

#include "Network/Packets/PartyJoinPacket.h"
#include "UI/Party/UIRequestJoinPartyMgr.h"
#include <cstring>
// OFFSET: 0x00D3BCE0
// FUNCTION: fn_21789
void ReceivePartyJoinRequest(const void* packet) {
const auto* bytes = static_cast<const unsigned char*>(packet);
char name[25];
std::strncpy(name, reinterpret_cast<const char*>(bytes + 10), 24);
name[24] = '\0';
std::uint32_t account;
std::uint32_t character;
std::int16_t job;
std::int16_t level;
std::memcpy(&level, bytes + 36, sizeof(level));
std::memcpy(&job, bytes + 34, sizeof(job));
std::memcpy(&account, bytes + 2, sizeof(account));
std::memcpy(&character, bytes + 6, sizeof(character));
g_requestJoinPartyMgr->Add(character, account, name, job, level);
}