using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using RoR2;
using RoR2.Skills;
using UnityEngine.AddressableAssets;
[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 = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ArtiSkillSwap")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ArtiSkillSwap")]
[assembly: AssemblyTitle("ArtiSkillSwap")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[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;
}
}
}
namespace ArtiSkillSwap
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("gaforb.ArtiSkillSwap", "ArtiSkillSwap", "3.1.0")]
public class ArtiSkillSwap : BaseUnityPlugin
{
public const string PluginGUID = "gaforb.ArtiSkillSwap";
public const string PluginAuthor = "gaforb";
public const string PluginName = "ArtiSkillSwap";
public const string PluginVersion = "3.1.0";
public static ConfigEntry<bool> IonUtil { get; set; }
public static ConfigEntry<bool> SnapSpec { get; set; }
public static ConfigEntry<bool> FlameSprint { get; set; }
public void Start()
{
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Expected O, but got Unknown
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_0204: Unknown result type (might be due to invalid IL or missing references)
//IL_020e: Expected O, but got Unknown
//IL_020f: Unknown result type (might be due to invalid IL or missing references)
//IL_0211: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_022e: Unknown result type (might be due to invalid IL or missing references)
//IL_0233: Unknown result type (might be due to invalid IL or missing references)
IonUtil = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Move Ion Surge", true, "Move Ion Surge to the Utility slot");
SnapSpec = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Move Snapfreeze", true, "Move Snapfreeze to the Special slot");
FlameSprint = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Flamethrower While Sprinting", true, "Allows flamethrower to be used during Ion Surge, and while sprinting. if disabled, Flamethrower will be wasted if used during Ion Surge.");
SkillFamily val = Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Mage/MageBodyUtilityFamily.asset").WaitForCompletion();
SkillFamily val2 = Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Mage/MageBodySpecialFamily.asset").WaitForCompletion();
SkillDef val3 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion();
UnlockableDef unlockableDef = Addressables.LoadAssetAsync<UnlockableDef>((object)"RoR2/Base/Mage/Skills.Mage.FlyUp.asset").WaitForCompletion();
SkillDef val4 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyWall.asset").WaitForCompletion();
SkillDef val5 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyFlamethrower.asset").WaitForCompletion();
Variant val6;
if (IonUtil.Value)
{
Array.Resize(ref val.variants, val.variants.Length + 1);
Variant[] variants = val.variants;
int num = val.variants.Length - 1;
val6 = new Variant
{
skillDef = val3,
unlockableDef = unlockableDef
};
((Variant)(ref val6)).viewableNode = new Node(val3.skillNameToken, false, (Node)null);
variants[num] = val6;
for (int i = 1; i < val2.variants.Length - 1; i++)
{
val2.variants[i] = val2.variants[i + 1];
}
Array.Resize(ref val2.variants, Math.Max(val2.variants.Length - 1, 1));
}
if (SnapSpec.Value)
{
Array.Resize(ref val2.variants, val2.variants.Length + 1);
Variant[] variants2 = val2.variants;
int num2 = val2.variants.Length - 1;
val6 = new Variant
{
skillDef = val4,
unlockableDef = null
};
((Variant)(ref val6)).viewableNode = new Node(val4.skillNameToken, false, (Node)null);
variants2[num2] = val6;
for (int j = 0; j < val.variants.Length - 1; j++)
{
val.variants[j] = val.variants[j + 1];
}
Array.Resize(ref val.variants, Math.Max(val.variants.Length - 1, 1));
}
val5.canceledFromSprinting = !FlameSprint.Value;
}
}
}