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

BeginClaimList() public méthode

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

            List<BaseCreature> list = new List<BaseCreature>();

            for ( int i = 0; i < from.Stabled.Count; ++i )
            {
                BaseCreature pet = from.Stabled[i] as BaseCreature;

                if ( pet == null || pet.Deleted )
                {
                    pet.IsStabled = false;
                    from.Stabled.RemoveAt( i );
                    --i;
                    continue;
                }

                list.Add( pet );
            }

            if ( list.Count > 0 )
                from.SendGump( new ClaimListGump( this, from, list ) );
            else
                SayTo( from, 502671 ); // But I have no animals stabled with me at the moment!
        }

Usage Example

Exemple #1
0
            public override void OnClick()
            {
                if (!(m_Mobile is PlayerMobile))
                {
                    return;
                }

                PlayerMobile mobile = (PlayerMobile)m_Mobile;
                {
                    m_Giver.BeginClaimList(m_Mobile);
                }
            }