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
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Server.Spells.Mysticism;
|
||||
|
||||
public class NetherCycloneSpell : MysticSpell, ISpellTargetingPoint3D
|
||||
public class NetherCycloneSpell : MysticSpell, ITargetingSpell<IPoint3D>
|
||||
{
|
||||
private static readonly SpellInfo _info = new(
|
||||
"Nether Cyclone",
|
||||
|
|
@ -89,7 +89,7 @@ public class NetherCycloneSpell : MysticSpell, ISpellTargetingPoint3D
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
Caster.Target = new SpellTargetPoint3D(this);
|
||||
Caster.Target = new SpellTarget<IPoint3D>(this);
|
||||
}
|
||||
|
||||
private static void PlayEffect(Point3D p, Map map)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue