127 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
41 lines
1.8 KiB
C++
41 lines
1.8 KiB
C++
#pragma once
|
|
#include "gateway/protocol.hpp"
|
|
#include <optional>
|
|
namespace gateway {
|
|
// Pinned Tortoise Group.h / Protocol/Opcodes_1_12_1.h source identities,
|
|
// deliberately separate from Forever party/loot enums and packet layouts.
|
|
constexpr uint16_t turtle_group_list_opcode=0x7D;
|
|
enum class TurtleGroupType : uint8_t { normal=0,raid=1 };
|
|
enum class TurtleGroupLootMethod : uint8_t {
|
|
free_for_all=0,round_robin=1,master=2,group=3,need_before_greed=4
|
|
};
|
|
struct TurtleGroupMember {
|
|
std::string name;
|
|
uint64_t guid=0;
|
|
// Group.h declares every bit of this byte, including reserved UNK3=0x20.
|
|
// Preserve source status; do not invent online/connected combinations.
|
|
uint8_t status=0;
|
|
uint8_t flags=0; // subgroup0..7 | assistant0x80; no other source bits.
|
|
};
|
|
struct TurtleGroupLootPolicy {
|
|
TurtleGroupLootMethod method=TurtleGroupLootMethod::free_for_all;
|
|
uint64_t master=0; // Literal0 for all methods except MASTER_LOOT.
|
|
uint8_t threshold=0; // Source ItemQualities0..6, not a modern quality enum.
|
|
uint8_t difficulty=0; // Group::SendUpdate writes literal0.
|
|
};
|
|
struct TurtleGroupList {
|
|
// Only RemoveMember/Disband's exact24 zero bytes establish explicit solo.
|
|
// A normal14-byte group-of-one snapshot has members.empty(), a real leader,
|
|
// and no loot-policy tail; it must never clear membership as "solo".
|
|
bool explicit_solo=false;
|
|
TurtleGroupType type=TurtleGroupType::normal;
|
|
uint8_t own_flags=0;
|
|
std::vector<TurtleGroupMember> members; // Other members; receiver omitted.
|
|
uint64_t leader=0;
|
|
std::optional<TurtleGroupLootPolicy> loot;
|
|
};
|
|
// Pure bounded source snapshot. No connection, native UI, loot authorization,
|
|
// or implicit membership for this client is created by successful parsing.
|
|
TurtleGroupList turtle_group_list(std::span<const uint8_t>);
|
|
}
|