fix: Magic NPCs now use spell range (#1870)
### Summary - Drastically streamlines the spell targeting by collapsing the target classes into a single `SpellTarget<T>` class. - Moves TargetRange to the spell itself so it can be used by MageAI. - Changes range check in MageAI to use TargetRange. This should fix target acquisition bugs
This commit is contained in:
parent
91e37fb8d4
commit
9b7fea2c20
85 changed files with 255 additions and 313 deletions
|
|
@ -10,7 +10,7 @@ public class RecallSpellTarget : Target
|
|||
private readonly IRecallSpell _spell;
|
||||
private readonly bool _toBoat;
|
||||
|
||||
public RecallSpellTarget(IRecallSpell spell, bool toBoat = true) : base(Core.ML ? 10 : 12, false, TargetFlags.None)
|
||||
public RecallSpellTarget(IRecallSpell spell, bool toBoat = true) : base(spell.TargetRange, false, TargetFlags.None)
|
||||
{
|
||||
_spell = spell;
|
||||
_toBoat = toBoat;
|
||||
|
|
@ -68,8 +68,5 @@ public class RecallSpellTarget : Target
|
|||
{
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish(Mobile from)
|
||||
{
|
||||
_spell?.FinishSequence();
|
||||
}
|
||||
protected override void OnTargetFinish(Mobile from) => _spell?.FinishSequence();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue