using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("DisableRaids")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("DisableRaids")]
[assembly: AssemblyTitle("DisableRaids")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace DisableRaids;
[BepInPlugin("com.joryjuky.disableraids", "DisableRaids", "1.0.0")]
public class DisableRaids : BaseUnityPlugin
{
private const string pluginGUID = "com.joryjuky.disableraids";
private const string pluginName = "DisableRaids";
private const string pluginVersion = "1.0.0";
private void Awake()
{
Harmony.CreateAndPatchAll(typeof(DisableRaids), (string)null);
}
[HarmonyPostfix]
[HarmonyPatch(typeof(RandEventSystem), "Awake")]
private static void EditAttributes(ref RandEventSystem __instance)
{
__instance.m_eventChance = -1f;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(RandEventSystem), "StartRandomEvent")]
private static bool DisableStartRandomEvent()
{
return false;
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "DisableRaids";
public const string PLUGIN_NAME = "DisableRaids";
public const string PLUGIN_VERSION = "1.0.0";
}