fix: Fixes double calls with Target cancel and spell sequences (#1840)

### Summary
- Cleans up target cancellation being called incorrectly.
- An invalid target type (which should never happen), now calls `OnTargetUntargetable` instead of `OnTargetCanceled`
- Removes double calls to `FinishSequence` in Spells.
This commit is contained in:
Kamron Batman 2024-06-17 15:19:06 -07:00 • committed by GitHub
parent 9c0b57213a
commit b8ad5c671d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 201 additions and 406 deletions

View file

@ -29,10 +29,14 @@ namespace Server.Spells.Fourth
public void Target(IPoint3D p)
{
if (Caster.Map == null)
{
return;
}
if (CheckSequence())
{
SpellHelper.Turn(Caster, p);
SpellHelper.GetSurfaceTop(ref p);
var loc = new Point3D(p);
@ -42,12 +46,6 @@ namespace Server.Spells.Fourth
Effects.PlaySound(loc, Caster.Map, 0x299);
}
if (Caster.Map == null)
{
FinishSequence();
return;
}
using var targets = PooledRefQueue<Mobile>.Create();
foreach (var m in Caster.Map.GetMobilesInRange(loc, Core.AOS ? 2 : 3))
{
@ -92,8 +90,6 @@ namespace Server.Spells.Fourth
}
}
}
FinishSequence();
}
public override void OnCast()