Server.Items.Fists.EventSink_StunRequest C# (CSharp) Méthode

EventSink_StunRequest() private static méthode

private static EventSink_StunRequest ( StunRequestEventArgs e ) : void
e StunRequestEventArgs
Résultat void
		private static void EventSink_StunRequest( StunRequestEventArgs e )
		{
			Mobile m = e.Mobile;

			double anatValue = m.Skills[SkillName.Anatomy].Value;
			double wresValue = m.Skills[SkillName.Wrestling].Value;

			if ( !HasFreeHands( m ) )
			{
				m.SendLocalizedMessage( 1004031 ); // You must have your hands free to attempt to stun your opponent.
				m.StunReady = false;
			}
			else if ( anatValue >= 80.0 && wresValue >= 80.0 )
			{
				m.DisruptiveAction();
				m.StunReady = !m.StunReady;
				m.SendLocalizedMessage( m.StunReady ? 1019011 : 1019012 );
			}
			else
			{
				m.SendLocalizedMessage( 1004008 ); // You are not skilled enough to stun your opponent.
				m.StunReady = false;
			}
		}