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:
parent
9c0b57213a
commit
b8ad5c671d
80 changed files with 201 additions and 406 deletions
|
|
@ -91,8 +91,6 @@ namespace Server.Spells.Fourth
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -101,8 +101,6 @@ namespace Server.Spells.Fourth
|
|||
DoHurtFizzle();
|
||||
}
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ public class FireFieldSpell : MagerySpell, ISpellTargetingPoint3D
|
|||
new FireFieldItem(itemID, targetLoc, Caster, Caster.Map, duration, i);
|
||||
}
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ namespace Server.Spells.Fourth
|
|||
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
|
||||
m.PlaySound(0x202);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ namespace Server.Spells.Fourth
|
|||
|
||||
SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ namespace Server.Spells.Fourth
|
|||
|
||||
HarmfulSpell(m);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
|
|
|
|||
|
|
@ -101,8 +101,6 @@ namespace Server.Spells.Fourth
|
|||
Caster.MoveToWorld(loc, map);
|
||||
Caster.PlaySound(0x1FC);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public override void GetCastSkills(out double min, out double max)
|
||||
|
|
@ -130,6 +128,7 @@ namespace Server.Spells.Fourth
|
|||
else
|
||||
{
|
||||
Effect(m_Entry.Location, m_Entry.Map, true);
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue