Server.Mobiles.AnimalTrainer.BeginStable C# (CSharp) Méthode

BeginStable() public méthode

public BeginStable ( Server.Mobile from ) : void
from Server.Mobile
Résultat void
        public void BeginStable( Mobile from )
        {
            if ( Deleted || !from.CheckAlive() )
                return;

            Container bank = from.FindBankNoCreate();

            if ( ( from.Backpack == null || from.Backpack.GetAmount( typeof( Gold ) ) < 30 ) && ( bank == null || bank.GetAmount( typeof( Gold ) ) < 30 ) )
            {
                SayTo( from, 1042556 ); // Thou dost not have enough gold, not even in thy bank account.
            }
            else
            {
                /* I charge 30 gold per pet for a real week's stable time.
                 * I will withdraw it from thy bank account.
                 * Which animal wouldst thou like to stable here?
                 */
                from.SendLocalizedMessage(1042558);

                from.Target = new StableTarget( this );
            }
        }

Usage Example

 public override void OnClick()
 {
     m_Trainer.BeginStable(m_From);
 }