Table of Contents

Interface IEnchantmentAutomation

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

Tracks how long the spell effects the client has seen cast will last, so a plugin can decide when to re-cast. This is the client's own bookkeeping from casts it observed, not an authoritative list from the server.

public interface IEnchantmentAutomation

Methods

Capture(uint)

Lists the still-running effects tracked for one target, ordered by spell family and then spell id. Lapsed entries are discarded first. Returns an empty list for object id zero, for a target with nothing tracked, or on a host that does not provide this surface.

IReadOnlyList<PluginTrackedEnchantment> Capture(uint targetObjectId)

Parameters

targetObjectId uint

Returns

IReadOnlyList<PluginTrackedEnchantment>

ForgetReported(uint)

Forget locally inferred timers; zero clears every reported target.

void ForgetReported(uint targetObjectId = 0)

Parameters

targetObjectId uint

ReportCast(uint, uint, double)

Records a cast the client did not observe itself, so its effect shows up in Capture(uint) for the duration given. Keeps whichever expiry is later if the same spell is already tracked on that target. Returns false for a zero target or spell id, a duration that is not a finite positive number, a spell the client's spell table does not know, or a host that does not provide this surface.

bool ReportCast(uint targetObjectId, uint spellId, double durationSeconds)

Parameters

targetObjectId uint
spellId uint
durationSeconds double

Returns

bool