21std::optional<Errand>
Oath(
const Content& content, uint32_t faction,
22 const protocol::World& seen,
int land) {
23 const auto found = content.
factions.find(faction);
24 if (found == content.
factions.end()) {
27 const uint32_t kind = found->second.herald();
29 std::ranges::find(seen.npcs(), kind, &protocol::Npc::kind);
30 if (herald != seen.npcs().end()) {
34 .herald = herald->id()};
37 for (
const npcs::Spawn& spawn : content.
npcs.
spawns) {
38 if (spawn.kind() == kind &&
LandNamed(spawn.land()) == land) {
std::map< uint32_t, factions::Faction > factions
By id.