using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("BlessAllMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BlessAllMod")]
[assembly: AssemblyTitle("BlessAllMod")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
[BepInPlugin("toni.BlessAllMod", "Bless All Mod", "1.0.0")]
public class BlessAllMod : BaseUnityPlugin
{
private void Awake()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
((BaseUnityPlugin)this).Logger.LogInfo((object)"BlessAllMod geladen!");
GameObject val = new GameObject("BlessAllHook");
val.AddComponent<BlessAllBehaviour>();
Object.DontDestroyOnLoad((Object)(object)val);
}
}
public class BlessAllBehaviour : MonoBehaviour
{
private void Update()
{
if (Input.GetKeyDown((KeyCode)98))
{
BlessAllNearbyFollowers();
}
}
private void BlessAllNearbyFollowers()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Invalid comparison between Unknown and I4
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Invalid comparison between Unknown and I4
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Expected O, but got Unknown
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
float num = 5f;
List<Follower> list = new List<Follower>();
foreach (Follower follower2 in Follower.Followers)
{
if ((int)follower2.Brain.Info.CursedState != 66 && !FollowerManager.FollowerLocked(follower2.Brain.Info.ID, false, false) && Vector3.Distance(((Component)follower2).transform.position, ((Component)PlayerFarming.Instance).transform.position) < num && !follower2.Brain.Stats.ReceivedBlessing && (int)follower2.Brain.CurrentTaskType != 7)
{
list.Add(follower2);
}
}
foreach (Follower follower in list)
{
FollowerTask_ManualControl val = new FollowerTask_ManualControl();
follower.Brain.HardSwapToTask((FollowerTask)(object)val);
val.GoToAndStop(follower, ((Component)PlayerFarming.Instance).transform.position + Vector2.op_Implicit(Random.insideUnitCircle) * 1.5f, (Action)delegate
{
follower.Brain.Stats.ReceivedBlessing = true;
((MonoBehaviour)follower).StartCoroutine(((Component)follower).GetComponent<interaction_FollowerInteraction>().BlessRoutine(false));
});
}
}
}