Server.Targeting.Target.Cancel C# (CSharp) Méthode

Cancel() public static méthode

public static Cancel ( Mobile m ) : void
m Mobile
Résultat void
        public static void Cancel( Mobile m )
        {
            NetState ns = m.NetState;

            if ( ns != null )
                ns.Send( CancelTarget.Instance );

            Target targ = m.Target;

            if ( targ != null )
                targ.OnTargetCancel( m, TargetCancelType.Canceled );
        }

Same methods

Target::Cancel ( Mobile from, TargetCancelType type ) : void

Usage Example

 public void Timeout(Mobile from)
 {
     this.CancelTimeout();
     from.ClearTarget();
     Target.Cancel(from);
     this.OnTargetCancel(from, TargetCancelType.Timeout);
     this.OnTargetFinish(from);
 }
All Usage Examples Of Server.Targeting.Target::Cancel