Server.Multis.BaseBoat.StartCourse C# (CSharp) Méthode

StartCourse() public méthode

public StartCourse ( bool single, bool message ) : bool
single bool
message bool
Résultat bool
		public bool StartCourse( bool single, bool message )
		{
			if ( CheckDecay() )
				return false;

			if ( Anchored )
			{
				if ( message && TillerMan != null )
					TillerMan.Say( 501419 ); // Ar, the anchor is down sir!

				return false;
			}
			else if ( MapItem == null || MapItem.Deleted )
			{
				if ( message && TillerMan != null )
					TillerMan.Say( 502513 ); // I have seen no map, sir.

				return false;
			}
			else if ( this.Map != MapItem.Map || !this.Contains( MapItem.GetWorldLocation() ) )
			{
				if ( message && TillerMan != null )
					TillerMan.Say( 502514 ); // The map is too far away from me, sir.

				return false;
			}
			else if ( this.Map != Map.Felucca || NextNavPoint < 0 || NextNavPoint >= MapItem.Pins.Count )
			{
				if ( message && TillerMan != null )
					TillerMan.Say( 1042551 ); // I don't see that navpoint, sir.

				return false;
			}

			Speed = FastSpeed;
			Order = single ? BoatOrder.Single : BoatOrder.Course;

			if ( m_MoveTimer != null )
				m_MoveTimer.Stop();

			m_MoveTimer = new MoveTimer( this, FastInterval, false );
			m_MoveTimer.Start();

			if ( message && TillerMan != null )
				TillerMan.Say( 501429 ); // Aye aye sir.

			return true;
		}

Same methods

BaseBoat::StartCourse ( string navPoint, bool single, bool message ) : bool

Usage Example

 public static void ResetNavPoints(BaseBoat boat)
 {
     boat.NextNavPoint = 0;
     boat.StartCourse(false, false);
 }