public override bool OnMoveOver(Mobile m) { if (m is BaseCreature) { BaseCreature bc = m as BaseCreature; TrainingProfile profile = PetTrainingHelper.GetTrainingProfile(bc); if (bc.Controlled && bc.ControlMaster != null && bc.ControlMaster.InRange(bc.Location, 25) && profile != null && profile.HasBegunTraining && profile.TrainingProgress < profile.TrainingProgressMax) { profile.TrainingProgress = profile.TrainingProgressMax; bc.FixedEffect(0x375A, 10, 30); if (bc.ControlMaster is PlayerMobile) { NewAnimalLoreGump gump = bc.ControlMaster.FindGump <NewAnimalLoreGump>(); if (gump != null) { gump.Refresh(); } else { BaseGump.SendGump(new NewAnimalLoreGump((PlayerMobile)bc.ControlMaster, bc)); } } } } return(true); }
public override bool OnMoveOver(Mobile m) { if (m is BaseCreature bc) { TrainingProfile profile = PetTrainingHelper.GetTrainingProfile(bc); if (bc.Controlled && bc.ControlMaster != null && bc.ControlMaster.InRange(bc.Location, 25) && !bc.IsBonded) { bc.IsBonded = true; bc.FixedEffect(0x375A, 10, 30); } } return(true); }