F4MP/tiltedcode/Code/encoding/Messages/AuthenticationResponse.h
Jous99 37b16f1547 code upload
codigo original de f4mp y tilted para referencias
2026-01-06 18:45:00 +01:00

38 lines
1 KiB
C

#pragma once
#include "Message.h"
#include <Structs/Mods.h>
#include <Structs/ServerSettings.h>
struct AuthenticationResponse final : ServerMessage
{
static constexpr ServerOpcode Opcode = kAuthenticationResponse;
enum class ResponseType : uint8_t
{
kAccepted,
kWrongVersion,
kModsMismatch,
kClientModsDisallowed,
kWrongPassword,
kServerFull
};
AuthenticationResponse()
: ServerMessage(Opcode)
{
}
void SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept override;
void DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept override;
bool operator==(const AuthenticationResponse& achRhs) const noexcept { return GetOpcode() == achRhs.GetOpcode() && Type == achRhs.Type && UserMods == achRhs.UserMods && Settings == achRhs.Settings && PlayerId == achRhs.PlayerId; }
ResponseType Type;
bool SKSEActive{false};
bool MO2Active{false};
String Version;
Mods UserMods{};
ServerSettings Settings{};
uint32_t PlayerId{};
};