public CheckControlChance ( Server.Mobile m ) : bool | ||
m | Server.Mobile | |
Результат | bool |
public virtual bool CheckControlChance( Mobile m )
{
if ( GetControlChance( m ) > Utility.RandomDouble() )
{
Loyalty += 1;
return true;
}
PlaySound( GetAngerSound() );
if ( Body.IsAnimal )
Animate( 10, 5, 1, true, false, 0 );
else if ( Body.IsMonster )
Animate( 18, 5, 1, true, false, 0 );
Loyalty -= 3;
return false;
}
private void DoClaim(Mobile from, BaseCreature pet, PetClaimTicket petClaimTicket) { pet.SetControlMaster(from); pet.ControlTarget = from; pet.ControlOrder = OrderType.Follow; pet.MoveToWorld(from.Location, from.Map); pet.IsStabled = false; pet.StabledBy = null; petClaimTicket.Stabled = null; petClaimTicket.Delete(); pet.CheckControlChance(from); }