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

EndClaimList() public méthode

public EndClaimList ( Server.Mobile from, BaseCreature pet ) : void
from Server.Mobile
pet BaseCreature
Résultat void
        public void EndClaimList( Mobile from, BaseCreature pet )
        {
            if ( pet == null || pet.Deleted || from.Map != this.Map || !from.Stabled.Contains( pet ) || !from.CheckAlive() )
                return;

            if ( !from.InRange( this, 14 ) )
            {
                from.SendLocalizedMessage( 500446 ); // That is too far away.
                return;
            }

            if ( CanClaim( from, pet ) )
            {
                DoClaim( from, pet );

                from.Stabled.Remove( pet );

                if ( from is PlayerMobile )
                    ((PlayerMobile)from).AutoStabled.Remove( pet );
            }
            else
            {
                SayTo( from, 1049612, pet.Name ); // ~1_NAME~ remained in the stables because you have too many followers.
            }
        }

Usage Example

Exemple #1
0
 public override void OnResponse(NetState state, int index)
 {
     if (index >= 0 && index < m_List.Count)
     {
         m_Trainer.EndClaimList(m_From, m_List[index]);
     }
 }
All Usage Examples Of Server.Mobiles.AnimalTrainer::EndClaimList