Decompiled source of SpecialRefreshJump v1.0.0

plugins/SpecialRefreshJump/SpecialRefreshJump.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using GameplayEntities;
using HarmonyLib;
using LLHandlers;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SpecialRefreshJump")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SpecialRefreshJump")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("bfbe94c2-011b-4815-aefb-090c5b04f9f6")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace CrouchSpray;

[BepInPlugin("us.tedd_e.plugins.llb.SpecialRefreshJump", "SpecialRefreshJump", "1.0.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInProcess("LLBlaze.exe")]
public class Plugin : 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.LogDebug((object)"Patching effects settings...");
		Harmony val = new Harmony("us.tedd_e.plugins.llb.SpecialRefreshJump");
		val.PatchAll(typeof(AbilityEntitySpecialActivatedPatch));
	}

	private void Start()
	{
	}
}
internal class AbilityEntitySpecialActivatedPatch
{
	[HarmonyPatch(typeof(AbilityEntity), "SpecialActivated")]
	[HarmonyPrefix]
	public static bool Update_Prefix(AbilityEntity __instance, BallEntity shockwaveAtBall = null, bool loseEnergy = true, bool playVoice = true, bool noParry = true)
	{
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: 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)
		LDCBFLKPFBF.JLGCJADPPIF();
		if (loseEnergy)
		{
			__instance.ResetEnergy();
		}
		AudioHandler.PlaySfx((Sfx)63);
		if (playVoice)
		{
			((MovableEntity)__instance).PlayVoice((Voice)4);
		}
		__instance.abilityData.bufferedSpecial = false;
		if (noParry)
		{
			((AttackingData)__instance.abilityData).bufferedParry = false;
		}
		((AttackingData)__instance.abilityData).parryActiveTimer = HHBCPNCDNDH.NKKIFJJEPOL(0);
		((AttackingData)__instance.abilityData).grabGuardTimer = HHBCPNCDNDH.NKKIFJJEPOL(0);
		MovableData moveableData = ((MovableEntity)__instance).moveableData;
		moveableData.extraJumps++;
		if (((MovableEntity)__instance).moveableData.extraJumps > ((MovableEntity)__instance).extraJumpAmount)
		{
			((MovableEntity)__instance).moveableData.extraJumps = ((MovableEntity)__instance).extraJumpAmount;
		}
		return false;
	}
}