20 lines
841 B
C#
20 lines
841 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace NeonSprawl.Server.Game.Npc;
|
|
|
|
/// <summary>
|
|
/// Session in-memory aggro holder store keyed by prototype NPC instance id (NEO-92).
|
|
/// HTTP projection lands in NEO-94; NEO-93 reads holder for behavior state transitions.
|
|
/// </summary>
|
|
public interface IThreatStateStore
|
|
{
|
|
/// <summary>Reads threat for a known prototype NPC instance. Lazy-initializes an empty holder row.</summary>
|
|
bool TryGet(string? npcInstanceId, [NotNullWhen(true)] out ThreatStateSnapshot snapshot);
|
|
|
|
/// <summary>Sets or clears the aggro holder for a known prototype NPC instance.</summary>
|
|
bool TrySetHolder(string? npcInstanceId, string? playerIdLowercaseOrNull);
|
|
|
|
/// <summary>Clears the aggro holder for a known prototype NPC instance.</summary>
|
|
bool TryClearHolder(string? npcInstanceId);
|
|
}
|