public static void Postfix(UIScoutingSearchResultsWidget __instance, Person inPerson, ref bool __result)
 {
     UIScoutingFilterView.Filter filter = __instance.filterView;
     if (filter == UIScoutingFilterView.Filter.Favourites)
     {
         __result = inPerson.GetInterestedToTalkReaction(Game.instance.player.team) == Person.InterestedToTalkResponseType.InterestedToTalk;
     }
 }
            public static bool Prefix(UIScoutingSearchResultsWidget __instance)
            {
                Notification mNotificationFavourites = (Notification)AccessTools.Field(typeof(UIScoutingSearchResultsWidget), "mNotificationFavourites").GetValue(__instance);

                if (mNotificationFavourites == null)
                {
                    mNotificationFavourites = Game.instance.notificationManager.GetNotification("ScoutingScreenFavourites");
                }
                return(false);
            }
            public static void Postfix(UIScoutingSearchResultsWidget __instance)
            {
                List <Person> mList     = (List <Person>)AccessTools.Field(typeof(UIScoutingSearchResultsWidget), "mList").GetValue(__instance);
                List <Person> favorites = new List <Person>();

                for (int i = 0; i < mList.Count; i++)
                {
                    if (mList[i].isShortlisted)
                    {
                        favorites.Add(mList[i]);
                    }
                }
                for (int i = favorites.Count - 1; i >= 0; i--)
                {
                    mList.Remove(favorites[i]);
                    mList.Insert(0, favorites[i]);
                }

                AccessTools.Field(typeof(UIScoutingSearchResultsWidget), "mList").SetValue(__instance, mList);
            }
            public static bool Prefix(UIScoutingSearchResultsWidget __instance, Person inPerson)
            {
                Notification mNotificationAll = (Notification)AccessTools.Field(typeof(UIScoutingSearchResultsWidget), "mNotificationAll").GetValue(__instance);

                mNotificationAll.IncrementCount();
                if (inPerson.GetInterestedToTalkReaction(Game.instance.player.team) == Person.InterestedToTalkResponseType.InterestedToTalk)
                {
                    Notification mNotificationFavourites = (Notification)AccessTools.Field(typeof(UIScoutingSearchResultsWidget), "mNotificationFavourites").GetValue(__instance);
                    mNotificationFavourites.IncrementCount();
                }
                if (inPerson is Driver)
                {
                    Driver driver = inPerson as Driver;
                    if (driver.hasBeenScouted)
                    {
                        Notification mNotificationScouted = (Notification)AccessTools.Field(typeof(UIScoutingSearchResultsWidget), "mNotificationScouted").GetValue(__instance);
                        mNotificationScouted.IncrementCount();
                    }
                }
                return(false);
            }