Ejemplo n.º 1
0
        public override void OnCast()
        {
            if (Caster is BaseCreature && ((BaseCreature)Caster).ControlMaster != null)
            {
                var master = ((BaseCreature)Caster).ControlMaster;

                if (Caster.CanSee(master) && Caster.InRange(master.Location, 8))
                {
                    SpellHelper.Turn(Caster, master);
                    OnTarget(master);
                }
            }
            else
            {
                Caster.BeginTarget(8, false, Server.Targeting.TargetFlags.None, (m, o) =>
                {
                    if (!Caster.CanSee(o))
                    {
                        Caster.SendLocalizedMessage(500237);     // Target can not be seen.
                    }
                    else
                    {
                        SpellHelper.Turn(Caster, o);
                        OnTarget(o);
                    }
                });
            }
        }
Ejemplo n.º 2
0
 public override void OnCast()
 {
     Caster.BeginTarget(8, false, Server.Targeting.TargetFlags.None, (m, o) =>
     {
         if (!Caster.CanSee(o))
         {
             Caster.SendLocalizedMessage(500237);     // Target can not be seen.
         }
         else
         {
             SpellHelper.Turn(Caster, o);
             OnTarget(o);
         }
     });
 }