public void StopCasting() { if (!Player.ExistsIn(World)) { return; } SpellCastCancelRequestEvent.Create(Bolt.GlobalTargets.OnlyServer).Send(); }
public override void OnEvent(SpellCastCancelRequestEvent spellCancelRequest) { base.OnEvent(spellCancelRequest); Player caster = World.FindPlayer(spellCancelRequest.RaisedBy); if (caster != null && caster.SpellCast.IsCasting) { caster.SpellCast.Cancel(); } }