Example #1
0
            private static void Postfix_IsSuitableTarget(Brain __instance, GameObject who, ref bool __result)
            {
                if (__result || !__instance.IsPlayerLed() || who.HasEffect <Asleep>() || !who.IsHostileTowards(__instance.PartyLeader) || !__instance.CheckPerceptionOf(who))
                {
                    return;
                }

                var parent = __instance.ParentObject;

                if (__instance.PartyLeader.DistanceTo(who) <= 10)
                {
                    __result = true;
                }
            }