Interface IMagicCommands
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
Casting spells, and asking beforehand whether a cast would be accepted.
public interface IMagicCommands
Properties
IsCasting
Whether the client is still working on a request that blocks a new cast. EvaluateGate(uint) reports Busy while this is true.
bool IsCasting { get; }
Property Value
LastCompletion
How the most recent cast ended. Its revision counter rises each time a cast completes, so a caller can tell a fresh outcome from a repeat of the last one; the default value means nothing has completed yet.
PluginCastCompletion LastCompletion { get; }
Property Value
Methods
Cast(uint)
Casts the spell at the current selection. True only when the request went out on the wire; use RequestCast(uint) to learn why it did not.
bool Cast(uint spellId)
Parameters
spellIduint
Returns
Cast(uint, uint)
Selects the given object, then casts the spell at it. False when the object cannot be selected or the cast was not sent.
bool Cast(uint spellId, uint targetObjectId)
Parameters
Returns
EvaluateGate(uint)
Whether casting this spell at the current selection would be accepted, and if not, why.
PluginCastGate EvaluateGate(uint spellId)
Parameters
spellIduint
Returns
EvaluateGate(uint, uint)
Whether casting this spell at a particular object would be accepted. Reports Refused when that object cannot be selected at all.
PluginCastGate EvaluateGate(uint spellId, uint targetObjectId)
Parameters
Returns
HasComponents(uint)
Whether the character is carrying everything the spell's formula consumes. True when the host cannot tell.
bool HasComponents(uint spellId)
Parameters
spellIduint
Returns
RequestCast(uint)
Casts the spell at the current selection and reports what happened.
PluginCastRequestResult RequestCast(uint spellId)
Parameters
spellIduint
Returns
RequestCast(uint, uint)
Selects the given object, casts the spell at it, and reports what happened. Reports IncompatibleTarget when the object cannot be selected.
PluginCastRequestResult RequestCast(uint spellId, uint targetObjectId)