Server.Items.BaseExplosionPotion.Drink C# (CSharp) Méthode

Drink() public méthode

public Drink ( Server.Mobile from ) : void
from Server.Mobile
Résultat void
		public override void Drink( Mobile from )
		{
			ThrowTarget targ = from.Target as ThrowTarget;
			this.Stackable = false; // Scavenged explosion potions won't stack with those ones in backpack, and still will explode.

			if ( targ != null && targ.Potion == this )
				return;

			from.RevealingAction();

			if ( m_Users == null )
				m_Users = new ArrayList();

			if ( !m_Users.Contains( from ) )
				m_Users.Add( from );

			from.Target = new ThrowTarget( this );

			if ( m_Timer == null )
			{
				from.SendLocalizedMessage( 500236 ); // You should throw it now!

				m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 2.6 seconds explosion delay
			}
		}