namespace XFE.SeAgent.Plugin.Performance
{
// A single applied owner, not a per-owner cache: the engine stores one flag on each block.
public sealed class AccessStamp
{
private bool valid;
private long owner, generation, frame;
private bool admin, factions;
public bool Matches(long ownerId, long currentGeneration, long currentFrame, bool adminAccess, bool showFactions)
=> valid && owner == ownerId && generation == currentGeneration && frame == currentFrame
&& admin == adminAccess && factions == showFactions;
public void Record(long ownerId, long currentGeneration, long currentFrame, bool adminAccess, bool showFactions)
{
owner = ownerId; generation = currentGeneration; frame = currentFrame;
admin = adminAccess; factions = showFactions; valid = true;
}
}
}
namespace XFE.SeAgent.Plugin.Performance
{
// A single applied owner, not a per-owner cache: the engine stores one flag on each block.
public sealed class AccessStamp
{
private bool valid;
private long owner, generation, frame;
private bool admin, factions;
public bool Matches(long ownerId, long currentGeneration, long currentFrame, bool adminAccess, bool showFactions)
=> valid && owner == ownerId && generation == currentGeneration && frame == currentFrame
&& admin == adminAccess && factions == showFactions;
public void Record(long ownerId, long currentGeneration, long currentFrame, bool adminAccess, bool showFactions)
{
owner = ownerId; generation = currentGeneration; frame = currentFrame;
admin = adminAccess; factions = showFactions; valid = true;
}
}
}