Server.Regions.GuardedRegion.CallGuards C# (CSharp) Méthode

CallGuards() public méthode

public CallGuards ( Server.Point3D p ) : void
p Server.Point3D
Résultat void
		public void CallGuards( Point3D p )
		{
			if ( IsDisabled() )
				return;

			IPooledEnumerable eable = Map.GetMobilesInRange( p, 14 );

			foreach ( Mobile m in eable )
			{
				if ( IsGuardCandidate( m ) && ( ( !AllowReds && m.Kills >= 5 && m.Region.IsPartOf( this ) ) || m_GuardCandidates.ContainsKey( m ) ) )
				{
					GuardTimer timer = null;
					m_GuardCandidates.TryGetValue( m, out timer );

					if ( timer != null )
					{
						timer.Stop();
						m_GuardCandidates.Remove( m );
					}

					MakeGuard( m );
					m.SendLocalizedMessage( 502276 ); // Guards can no longer be called on you.
					break;
				}
			}

			eable.Free();
		}