private bool AttemptToGiveTreatToHorse(Horse horse) { string type = horse.GetType().ToString(); string id = horse.id.ToString(); HorseTreat treatHandler = new HorseTreat(horse, this.Config); // Refuse a poisonous treat if (treatHandler.IsPoisonous(Game1.player.ActiveObject)) { treatHandler.RefuseTreat(true); return(false); } // Can only give a treat once per day if (this.GivenTreatToday(type, id)) { treatHandler.RefuseTreat(false); return(false); } treatHandler.GiveTreat(); this.TrackGivenTreat(type, id); return(true); }