Owner-authorized source migration: 31 helper-only translation units were merged into their callers or existing inline headers; both build manifests updated. Includes the preserved source payload, Lua configuration matching wowdecomp, and exact malloca expansion without diagnostic pragmas. 449 native units compiled locally and 449 staged units compiled by the pinned server toolchain. No previously byte-matched function regressed. Compiler mapping diagnostics remain recorded as needs_cleanup, not accepted or peer-confirmed. Existing independent review records are preserved. README.md is intentionally unchanged.
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_PARTY_PARTYINVITATION_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_PARTY_PARTYINVITATION_H
|
|
|
|
#include "Contents/ForbiddenWords.h"
|
|
#include "UI/Window/UIWindow.h"
|
|
#include "UI/Window/WindowManagerWindows.h"
|
|
|
|
#include <cstdint>
|
|
#include <cstring>
|
|
#include <string>
|
|
|
|
struct ForbiddenWords;
|
|
class WindowManagerWindows;
|
|
|
|
struct PartyInvitationContext {
|
|
ForbiddenWords& words;
|
|
WindowManagerWindows& windows;
|
|
std::string& pendingName;
|
|
};
|
|
|
|
void ReceivePartyInvitation(const void* packet, PartyInvitationContext& context);
|
|
|
|
// INLINED
|
|
inline void ReceivePartyInvitation(const void* packet, PartyInvitationContext& context) {
|
|
const auto* bytes = static_cast<const unsigned char*>(packet);
|
|
char name[25];
|
|
std::strncpy(name, reinterpret_cast<const char*>(bytes + 6), 24);
|
|
name[24] = '\0';
|
|
|
|
if (context.words.Contains(name)) {
|
|
std::string unused;
|
|
context.words.Mask(name, &unused);
|
|
}
|
|
|
|
context.pendingName.assign(name, std::strlen(name));
|
|
UIWindow* window = context.windows.EnsureWindow(35);
|
|
std::uint32_t identity;
|
|
std::memcpy(&identity, bytes + 2, sizeof(identity));
|
|
window->SendMsg(nullptr, 56, identity, reinterpret_cast<std::intptr_t>(name), 0, 0);
|
|
}
|
|
|
|
#endif
|