Example #1
0
        public void StopCasting()
        {
            if (!Player.ExistsIn(World))
            {
                return;
            }

            SpellCastCancelRequestEvent.Create(Bolt.GlobalTargets.OnlyServer).Send();
        }
Example #2
0
        public override void OnEvent(SpellCastCancelRequestEvent spellCancelRequest)
        {
            base.OnEvent(spellCancelRequest);

            Player caster = World.FindPlayer(spellCancelRequest.RaisedBy);

            if (caster != null && caster.SpellCast.IsCasting)
            {
                caster.SpellCast.Cancel();
            }
        }