24 lines
1.3 KiB
C++
24 lines
1.3 KiB
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#pragma once
|
|
#include "gateway/chat.hpp"
|
|
#include "gateway/legacy_stream.hpp"
|
|
#include <functional>
|
|
#include <optional>
|
|
|
|
namespace gateway {
|
|
std::optional<LegacyPacket> guild_player_joined(uint64_t guid, const std::string& name, RosterRealm realm);
|
|
std::optional<LegacyPacket> guild_notification(std::span<const uint8_t> body,
|
|
RosterRealm realm, const GuildRoster* roster, const GuildInfo* guild);
|
|
std::optional<LegacyPacket> petition_notification(uint16_t opcode,
|
|
std::span<const uint8_t> body, uint32_t realm,
|
|
const std::map<uint64_t,Guid128>& actors);
|
|
// Native petition requests (client wire numbers, TC PetitionPackets.cpp Read) -> Tortoise
|
|
// PetitionsHandler bodies. `npc` resolves a native creature GUID to its bound Source GUID (0 = none).
|
|
// Throws Error on malformed bodies; returns nullopt when the request has no truthful Source form.
|
|
std::optional<LegacyPacket> source_petition_request(uint32_t opcode,std::span<const uint8_t> body,
|
|
const std::function<uint64_t(const Bytes&)>& npc);
|
|
// Inverse of the notification charter identity: native {low item, high 3<<58} -> Source item GUID.
|
|
std::optional<uint64_t> legacy_charter_item(const Bytes& native);
|
|
std::optional<LegacyPacket> ticket_queue_notification(std::span<const uint8_t> body);
|
|
}
|