Decompiled source of VRisingControllerVibration v1.0.0

VRisingControllerVibration.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
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 BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using BepInEx.Unity.IL2CPP.Utils.Collections;
using HarmonyLib;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.Injection;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppSystem.Collections.Generic;
using Microsoft.CodeAnalysis;
using ProjectM;
using ProjectM.UI;
using Stunlock.Core;
using Unity.Collections;
using Unity.Entities;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
using VRisingControllerVibration.Helpers;
using VRisingControllerVibration.Vibrators;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("VRisingControllerVibration")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+16f5471c0e528b123fbf8edc13f1de3563e38e79")]
[assembly: AssemblyProduct("My second plugin")]
[assembly: AssemblyTitle("VRisingControllerVibration")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[CompilerGenerated]
internal delegate void <>f__AnonymousDelegate0<T1, T2, T3, T4>(T1 arg1, T2 arg2, T3 arg3, T4 arg4 = 0f);
[CompilerGenerated]
internal delegate void <>f__AnonymousDelegate1<T1, T2, T3, T4, T5, T6>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6 = 60);
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 VRisingControllerVibration
{
	[BepInPlugin("VRisingControllerVibration", "VRisingControllerVibration", "1.0.0")]
	public class Plugin : BasePlugin
	{
		internal static ManualLogSource Logger;

		internal static ConfigEntry<bool> LoggingEnabledConfig;

		internal static Harmony Harmony = new Harmony("VRisingControllerVibration");

		internal static bool LoggingEnabled => LoggingEnabledConfig?.Value ?? false;

		internal static void Info(string msg)
		{
			if (LoggingEnabled)
			{
				Logger.LogInfo((object)msg);
			}
		}

		internal static void Warning(string msg)
		{
			Logger.LogWarning((object)msg);
		}

		internal static void Error(string msg)
		{
			Logger.LogError((object)msg);
		}

		public override void Load()
		{
			Logger = ((BasePlugin)this).Log;
			LoggingEnabledConfig = ((BasePlugin)this).Config.Bind<bool>("Debug", "EnableInfoLogging", false, "Enable info-level logging. Useful for diagnosing issues; disable for cleaner logs.");
			Info("VRisingControllerVibration loaded!");
			ClassInjector.RegisterTypeInIl2Cpp<CoroutineHelper>();
			GameState.Init();
			Harmony.PatchAll();
		}

		public override bool Unload()
		{
			Gamepad current = Gamepad.current;
			if (current != null)
			{
				current.ResetHaptics();
			}
			Harmony.UnpatchSelf();
			return true;
		}
	}
}
namespace VRisingControllerVibration.Vibrators
{
	internal static class VibrationController
	{
		[CompilerGenerated]
		private sealed class <PulseCoroutine>d__2 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Gamepad gp;

			public float low;

			public float high;

			public float duration;

			public float delay;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <PulseCoroutine>d__2(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_007e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0088: Expected O, but got Unknown
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (delay > 0f)
					{
						<>2__current = (object)new WaitForSeconds(delay);
						<>1__state = 1;
						return true;
					}
					goto IL_005f;
				case 1:
					<>1__state = -1;
					goto IL_005f;
				case 2:
					{
						<>1__state = -1;
						gp.ResetHaptics();
						return false;
					}
					IL_005f:
					gp.SetMotorSpeeds(low, high);
					<>2__current = (object)new WaitForSeconds(duration);
					<>1__state = 2;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <RampCoroutine>d__3 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Gamepad gp;

			public float lowStart;

			public float highStart;

			public float lowEnd;

			public float highEnd;

			public float duration;

			public int steps;

			private float <stepTime>5__1;

			private int <i>5__2;

			private float <t>5__3;

			private float <low>5__4;

			private float <high>5__5;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <RampCoroutine>d__3(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00be: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<stepTime>5__1 = duration / (float)steps;
					<i>5__2 = 0;
					break;
				case 1:
					<>1__state = -1;
					<i>5__2++;
					break;
				}
				if (<i>5__2 < steps)
				{
					<t>5__3 = (float)<i>5__2 / (float)(steps - 1);
					<low>5__4 = Mathf.Lerp(lowStart, lowEnd, <t>5__3);
					<high>5__5 = Mathf.Lerp(highStart, highEnd, <t>5__3);
					gp.SetMotorSpeeds(<low>5__4, <high>5__5);
					<>2__current = (object)new WaitForSeconds(<stepTime>5__1);
					<>1__state = 1;
					return true;
				}
				gp.ResetHaptics();
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static void Pulse(float low, float high, float duration, float delay = 0f)
		{
			Gamepad current = Gamepad.current;
			if (current != null)
			{
				((MonoBehaviour)CoroutineHelper.Instance).StartCoroutine(CollectionExtensions.WrapToIl2Cpp(PulseCoroutine(current, low, high, duration, delay)));
			}
		}

		public static void Ramp(float lowStart, float highStart, float lowEnd, float highEnd, float duration, int steps = 60)
		{
			Gamepad current = Gamepad.current;
			if (current != null)
			{
				((MonoBehaviour)CoroutineHelper.Instance).StartCoroutine(CollectionExtensions.WrapToIl2Cpp(RampCoroutine(current, lowStart, highStart, lowEnd, highEnd, duration, steps)));
			}
		}

		[IteratorStateMachine(typeof(<PulseCoroutine>d__2))]
		private static IEnumerator PulseCoroutine(Gamepad gp, float low, float high, float duration, float delay)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <PulseCoroutine>d__2(0)
			{
				gp = gp,
				low = low,
				high = high,
				duration = duration,
				delay = delay
			};
		}

		[IteratorStateMachine(typeof(<RampCoroutine>d__3))]
		private static IEnumerator RampCoroutine(Gamepad gp, float lowStart, float highStart, float lowEnd, float highEnd, float duration, int steps)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <RampCoroutine>d__3(0)
			{
				gp = gp,
				lowStart = lowStart,
				highStart = highStart,
				lowEnd = lowEnd,
				highEnd = highEnd,
				duration = duration,
				steps = steps
			};
		}
	}
}
namespace VRisingControllerVibration.Patches
{
	[HarmonyPatch]
	internal static class AbilityRunScriptsSystem_ClientPatch
	{
		private static bool HasWeaponEquipped()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			if (!PlayerState.HasComponent<Equipment>())
			{
				return false;
			}
			Equipment component = PlayerState.GetComponent<Equipment>();
			return ((Equipment)(ref component)).IsEquipped((EquipmentType)2);
		}

		[HarmonyPatch(typeof(AbilityRunScriptsSystem_Client), "OnUpdate")]
		[HarmonyPostfix]
		private static void OnUpdatePostfix(AbilityRunScriptsSystem_Client __instance)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			Gamepad current = Gamepad.current;
			if (current == null || !PlayerState.EnsurePlayerCache())
			{
				return;
			}
			EntityManager entityManager = PlayerState.GameWorld.EntityManager;
			EntityQuery val = ((EntityManager)(ref entityManager)).CreateEntityQuery((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<AbilityCastStartedEvent>() });
			NativeArray<AbilityCastStartedEvent> val2 = ((EntityQuery)(ref val)).ToComponentDataArray<AbilityCastStartedEvent>(AllocatorHandle.op_Implicit((Allocator)2));
			<>f__AnonymousDelegate0<float, float, float, float> <>f__AnonymousDelegate = VibrationController.Pulse;
			<>f__AnonymousDelegate1<float, float, float, float, float, int> <>f__AnonymousDelegate2 = VibrationController.Ramp;
			try
			{
				for (int i = 0; i < val2.Length; i++)
				{
					if (val2[i].Character != PlayerState.Character)
					{
						continue;
					}
					Entity abilityGroup = val2[i].AbilityGroup;
					if (!((EntityManager)(ref entityManager)).HasComponent<AbilityGroupState>(abilityGroup))
					{
						continue;
					}
					AbilityGroupState componentData = ((EntityManager)(ref entityManager)).GetComponentData<AbilityGroupState>(abilityGroup);
					switch (componentData.SlotIndex)
					{
					case 0:
						if (!HasWeaponEquipped())
						{
							<>f__AnonymousDelegate(0f, 0.5f, 0.15f, 0.2f);
						}
						else
						{
							<>f__AnonymousDelegate(0.25f, 0.5f, 0.25f, 0.3f);
						}
						break;
					case 1:
						<>f__AnonymousDelegate(0.5f, 0.1f, 1f);
						break;
					case 2:
						<>f__AnonymousDelegate(0.15f, 0.25f, 0.15f);
						break;
					case 4:
						<>f__AnonymousDelegate(0.5f, 0.5f, 0.3f);
						break;
					case 5:
						<>f__AnonymousDelegate(0.5f, 0.1f, 0.3f);
						break;
					case 6:
						<>f__AnonymousDelegate(0.5f, 0.1f, 0.3f);
						break;
					case 7:
						<>f__AnonymousDelegate(0.5f, 0.5f, 0.3f);
						break;
					case 23:
						<>f__AnonymousDelegate2(0f, 0f, 0f, 0.25f, 1f);
						break;
					case 25:
						FeedInteractionProgressSystemPatch.EndFeedingHeartbeat();
						break;
					case 52:
						<>f__AnonymousDelegate2(0f, 0f, 0f, 0.25f, 1f);
						break;
					case 55:
						<>f__AnonymousDelegate2(0f, 0f, 0f, 0.25f, 1f);
						break;
					default:
						<>f__AnonymousDelegate(0f, 0.25f, 0.15f);
						break;
					}
				}
			}
			finally
			{
				val2.Dispose();
			}
		}
	}
	[HarmonyPatch]
	internal static class BuffPollingPatch
	{
		private struct BuffHaptic
		{
			public int Guid;

			public float Low;

			public float High;

			public float Duration;

			public string Label;

			public bool WasActive;

			public bool FallingEdge;
		}

		private const int BUFF_BAT_TAKEFLIGHT = 1205505492;

		private const int BUFF_BAT_LANDING_TRAVEL = -371745443;

		private const int BUFF_BAT_LANDING_TRAVEL_END = -2001733587;

		private const int BUFF_WOLF = -351718282;

		private const int BUFF_BEAR = -1569370346;

		private const int BUFF_TOAD = -1038422434;

		private const int BUFF_RAT = 902394170;

		private const int BUFF_SPIDER = 124832551;

		private const int BUFF_HUMAN = -53860211;

		private const int BUFF_GRANDMA = -434940480;

		private const int BUFF_BLACKFANG_CARVERBOSS_BODYSLAM_GRABBED = 957938484;

		private const int BUFF_BLACKFANG_CARVERBOSS_BODYSLAM_PIN = 434680966;

		private const int BUFF_BLACKFANG_CARVERBOSS_CHOPLEAP_STABTARGET = 1629292845;

		private const int BUFF_BLACKFANG_CARVERBOSS_CORRUPTIONSPILL = 1472320596;

		private const int BUFF_BLACKFANG_CARVERBOSS_ULTRAMEGACHOPLEAP_PREVIOUSTARGET = -2070186195;

		private const int BUFF_BLACKFANG_LIVITH_AGGROPLAYERS_AGGRO = 1976120182;

		private const int BUFF_BLACKFANG_LIVITH_CLONENINJUTSU_SCREEN = -1828369565;

		private const int BUFF_BLACKFANG_LIVITH_STEALTH_AGGRO = 505048937;

		private const int BUFF_BLACKFANG_MORGANA_CORRUPTIONFOUNTAIN_HIT = 257901187;

		private const int BUFF_BLACKFANG_MORGANA_CROSSWINDSLASH_LEFT_FOLLOWUPHIT = -1430472663;

		private const int BUFF_BLACKFANG_MORGANA_CROSSWINDSLASH_LEFT_INITIALHIT = -1812098607;

		private const int BUFF_BLACKFANG_MORGANA_CROSSWINDSLASH_RIGHT_FOLLOWUPHIT = 961740099;

		private const int BUFF_BLACKFANG_MORGANA_CROSSWINDSLASH_RIGHT_INITIALHIT = 1727302918;

		private const int BUFF_BLACKFANG_MORGANA_DOWNHORIZONTALSLASH_LEFT_FOLLOWUPHIT = -718813882;

		private const int BUFF_BLACKFANG_MORGANA_DOWNHORIZONTALSLASH_LEFT_INITIALHIT = -1286355674;

		private const int BUFF_BLACKFANG_MORGANA_DOWNHORIZONTALSLASH_RIGHT_FOLLOWUPHIT = -1980410717;

		private const int BUFF_BLACKFANG_MORGANA_DOWNHORIZONTALSLASH_RIGHT_INITIALHIT = 1021234102;

		private const int BUFF_BLACKFANG_MORGANA_EYEOFTHECORRUPTION_HIT = -638863409;

		private const int BUFF_BLACKFANG_MORGANA_GROUNDPIERCER_DOWNEDSTUN = -1746192504;

		private const int BUFF_BLACKFANG_MORGANA_GROUNDPIERCER_THROWHIT = 764467131;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALBEAM_THROWHIT = 2116092559;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALBEAM_SLOW_THROWHIT = 1353249536;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALBLAST_HIT = 1939629884;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALHELL_HIT = 2089905588;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALSNAKE_TARGET = 1995740870;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALSNAKE_FAR_TARGET = 898677408;

		private const int BUFF_BLACKFANG_MORGANA_SPECTRALSWARM_PROJECTILE_HITSLOW = -2049305989;

		private const int BUFF_BLACKFANG_MORGANASTAIL_TAILSLAM_HIT = 733131428;

		private const int BUFF_BLACKFANG_MORGANASTAIL_STINGER_THROWHIT = -311138981;

		private const int BUFF_BLACKFANG_MORGANASTAIL_STINGER_SINGLE_THROWHIT = -1542843694;

		private const int BUFF_BLACKFANG_SENTINEL_COUNTERATTACK_KICK_TRAVEL = -1749921093;

		private const int BUFF_BLACKFANG_VALYR_PHASEDUAL_TACKLE_DOWNEDSTUN = 1803245720;

		private const int BUFF_BLOODMEND = -72081294;

		private const int BUFF_BLOOD_CRIMSONBEAM_CHANNEL = 372033291;

		private const int BUFF_CASTLEMAN_GRAB_ONHITTRAVEL = 810941144;

		private const int BUFF_CASTLEMAN_THROW_LAUNCH = 1269998543;

		private const int BUFF_CASTLEMAN_THROW_STUN = -266552360;

		private const int BUFF_CHAOS_VAMPIRE_IGNITE = 348724578;

		private const int BUFF_CHURCHOFLIGHT_OVERSEER_ICERECOVERY_LAUNCH = 2030766507;

		private const int BUFF_CHURCHOFLIGHT_OVERSEER_LANCECHARGE_DOWNEDSTUN = -608251310;

		private const int BUFF_CHURCHOFLIGHT_OVERSEER_PIERCINGCHARGE_GRABBED = 1045272422;

		private const int BUFF_CHURCHOFLIGHT_OVERSEER_PIERCINGCHARGE_THROW_LAUNCH = -1142017589;

		private const int BUFF_CHURCHOFLIGHT_OVERSEER_PIERCINGCHARGE_THROW_STUN = 466039625;

		private const int BUFF_CHURCHOFLIGHT_PALADIN_MELEE_HIT = 893060518;

		private const int BUFF_CURSED_MOUNTAINBEAST_ENRAGE_SCREAMEFFECT = 1498838250;

		private const int BUFF_CURSED_MOUNTAINBEAST_HORNFLICK_LAUNCH = 363733786;

		private const int BUFF_CURSED_MOUNTAINBEAST_WHACKAVAMP_STUN = 1924509105;

		private const int BUFF_CURSED_WITCH_WITCHBOLT_CORRUPTION = 1343911070;

		private const int BUFF_DASH_DEMOUNT_ROLL = 744300418;

		private const int BUFF_DRACULA_FINAL_STAGE00_BLOODRAIN = -582698784;

		private const int BUFF_DRACULA_FINAL_STAGE05_BLOODSTORM = 741867216;

		private const int BUFF_DRACULA_FINAL_STAGE05_DAMAGEAMP = 1462199463;

		private const int BUFF_DRACULA_FINAL_STAGE05_FINALSTAGEPLAYER = -900688162;

		private const int BUFF_FEED_DASH = 1231644507;

		private const int BUFF_FEED_DASH_AWAY = -1948299363;

		private const int BUFF_FROST_VAMPIRE_FREEZE = 612319955;

		private const int BUFF_GALLOP = 1156367321;

		private const int BUFF_GENERAL_CHILL = -1974768686;

		private const int BUFF_GENERAL_CURSEOFTHEFOREST_AREA = 821183186;

		private const int BUFF_GENERAL_DAZE = 792451792;

		private const int BUFF_GENERAL_DRACULATELEPORT = -1413417542;

		private const int BUFF_GENERAL_DRACULATELEPORT_INPHASING = -1274886518;

		private const int BUFF_GENERAL_DRACULATELEPORT_OUT = -246759104;

		private const int BUFF_GENERAL_ENTANGLED = -1270359452;

		private const int BUFF_GENERAL_FADINGSNARE = 1276262777;

		private const int BUFF_GENERAL_FEAR = 695136154;

		private const int BUFF_GENERAL_FEAR_WITHOUTDAMAGECAP = 1416250466;

		private const int BUFF_GENERAL_FREEZE = -948292568;

		private const int BUFF_GENERAL_GLOOMROT_LIGHTNINGFADINGSNARE = -741376672;

		private const int BUFF_GENERAL_GLOOMROT_STATIC = -2067402784;

		private const int BUFF_GENERAL_HOLY_AREA_T02 = -621774510;

		private const int BUFF_GENERAL_IGNITE = 1533067119;

		private const int BUFF_GENERAL_IMMOBILIZE = -1548063130;

		private const int BUFF_GENERAL_INAIR_LANDING = 129112290;

		private const int BUFF_GENERAL_INCAPACITATE = -211448091;

		private const int BUFF_GENERAL_INCAPACITATE_IMPACTFX = 796254181;

		private const int BUFF_GENERAL_KNOCKBACK = -984195038;

		private const int BUFF_GENERAL_PHASING = -79611032;

		private const int BUFF_GENERAL_SILVERSICKNESS_BURN = 853298599;

		private const int BUFF_GENERAL_SPECTRAL_WEAKEN = 1224796284;

		private const int BUFF_GENERAL_STUN = 355774169;

		private const int BUFF_GENERAL_STUN_IMPACTFX = -1369764436;

		private const int BUFF_GENERAL_WEAKEN_CURSED_GHOSTS = -966736642;

		private const int BUFF_GENERAL_VAMPIRE_WOUNDED = -1992158531;

		private const int BUFF_GLOOMROT_THEPROFESSOR_DEBUFF_ELECTRICAMPLIFY = -343432994;

		private const int BUFF_GOLDGOLEM_ENRAGE_FISTSLAM_STUN = 2139290707;

		private const int BUFF_HARPY_LAUNCHER_LAUNCH = 781339893;

		private const int BUFF_IRONGOLEM_GROUNDSLAM_DOWNEDSTUN = -638330945;

		private const int BUFF_JUMPFROMCLIFFS_LANDING = 940232581;

		private const int BUFF_JUMPFROMCLIFFS_TRAVEL = 691373616;

		private const int BUFF_LEGION_BLOODPROPHET_PROJECTILEAOE = -155974681;

		private const int BUFF_LEGION_GARGOYLE_RELOCATE_FORWARDSWIPE_SLOWONHIT = 1736079539;

		private const int BUFF_LEGION_GARGOYLE_RELOCATE_FORWARD_TRAVEL_AGGRO = -759178950;

		private const int BUFF_LEGION_GUARDIAN_MINIONATTACKCHAIN_DOWN_STUN = 1774931122;

		private const int BUFF_LEGION_NIGHTMAIDEN_SEDUCE_TARGET = -398835659;

		private const int BUFF_LEGION_NIGHTMAIDEN_SEDUCE_LESSER_TARGET = -1942510877;

		private const int BUFF_LEGION_VARGULF_MAULKNOCKDOWN_STUN = 1596283104;

		private const int BUFF_LEGION_VARGULF_MAULKNOCKDOWN_STUN_LESSER = 1772748887;

		private const int BUFF_LUCIE_DEADLYINJECTION = 1950409780;

		private const int BUFF_LUCIE_PANICSHOT = 677638731;

		private const int BUFF_LUCIE_CRIPPLINGGOO_POISON = 1382025211;

		private const int BUFF_LUCIE_TOXINBOLT_TOXIN = -1470336876;

		private const int BUFF_MANTICORE_DASH_DOWNED = 146753505;

		private const int BUFF_MANTICORE_DASH_LAUNCH = -351105234;

		private const int BUFF_MANTICORE_FLAME_CHAOS_BURN_LONG = 1670636401;

		private const int BUFF_MANTICORE_FROSTVORTEX = -1067106579;

		private const int BUFF_MONSTER_FINALPROJECTILE_INCAPACITATE = 208530214;

		private const int BUFF_MONSTER_GRAB_TARGETGRABBED = -759087433;

		private const int BUFF_MONSTER_GROUNDSLAM_LAUNCH = -419794791;

		private const int BUFF_MONSTER_THROW_LAUNCH = -1510240353;

		private const int BUFF_MONSTER_THROW_STUN = 1559397587;

		private const int BUFF_MONSTER_LIGHTNINGPILLAR_AREADAMAGE = 373120229;

		private const int BUFF_MONSTER_LIGHTNINGSLAM_DOWNEDCAPACITATE = 1322041767;

		private const int BUFF_MOUNT_OWNER_HORSE = 854656674;

		private const int BUFF_MOUNT_OWNER_HORSE_VAMPIRE = -978792376;

		private const int BUFF_MOUNTLEAP_PHASE_01 = -1905167211;

		private const int BUFF_MOUNTLEAP_END = -944919011;

		private const int BUFF_MUTANT_SPITTER_POISONRAIN_POISON = -890471139;

		private const int BUFF_PURIFIER_CHAOSVOLLEY_BURN = 1163490655;

		private const int BUFF_PURIFIER_JETPUNCH_LAUNCH = 1883832448;

		private const int BUFF_PURIFIER_JETPUNCH_DOWNEDSTUN = -2071551838;

		private const int BUFF_PURIFIER_MELEE_DOWNEDSTUN = 803103305;

		private const int BUFF_SHARED_CHAOS_BURN = -1665010680;

		private const int BUFF_SKELETONGOLEM_SWALLOW_ONHITTRAVEL = -1014729642;

		private const int BUFF_SKELETONGOLEM_SWALLOW_TARGETSWALLOWED = -743287512;

		private const int BUFF_SKELETONGOLEM_SPIT_LAUNCH = 522109406;

		private const int BUFF_SKELETONGOLEM_SPIT_STUN = 209011126;

		private const int BUFF_SLAVEMASTER_KNOCKDOWN = 558996680;

		private const int BUFF_SOMMELIER_HORIZONTALBARREL_HITKNOCKDOWN = 533823656;

		private const int BUFF_SPIDER_MELEE_WEBBING_SLOW = -1831802998;

		private const int BUFF_SPIDER_RANGE_POISON = 141775141;

		private const int BUFF_SPIDER_BANELING_EXPLODE_POISON = 1314931922;

		private const int BUFF_SPIDERQUEEN_COCOONIFY_HIT = -1679785240;

		private const int BUFF_SPIDERQUEEN_COCOONIFY_COCOON = 831431517;

		private const int BUFF_SPIDERQUEEN_POISON = 154706618;

		private const int BUFF_SPIDERQUEEN_HARD_EXPLODINGPOISON = 113363813;

		private const int BUFF_SUNDAMAGE = -1315531444;

		private const int BUFF_TOADKING_SWALLOW_ONHITTRAVEL = 2092842659;

		private const int BUFF_TOADKING_SWALLOW_TARGETSWALLOWED = -915145807;

		private const int BUFF_TOADKING_SPIT_LAUNCH = 1750172438;

		private const int BUFF_TOADKING_SPIT_STUN = 41392389;

		private const int BUFF_TOADKING_POISONRAIN = 1329219727;

		private const int BUFF_TRACK_VBLOOD = -1458480041;

		private const int BUFF_VAMPIREHORSE_LEAPEND = -17369676;

		private const int BUFF_VAMPIREHORSE_LEAPTRAVEL = 307775055;

		private const int BUFF_VAMPIREHORSE_LEAPTRAVELPHASE = 1693465568;

		private const int BUFF_VAMPIRE_DRACULA_ETHERIALSWORD_TARGET = 1805805508;

		private const int BUFF_VAMPIRE_DRACULA_FEED_BLIND = 707131139;

		private const int BUFF_VAMPIRE_DRACULA_FEEDATTACK_LAUNCH = 1548355736;

		private const int BUFF_VAMPIRE_DRACULA_FEEDATTACK_STUN = -1162871510;

		private const int BUFF_VAMPIRE_DRACULA_FEEDATTACK_TARGETGRABBED = 123709251;

		private const int BUFF_VAMPIRE_DRACULA_RINGOFBLOOD_IMPRISON = 1257496824;

		private const int BUFF_VAMPIRE_DRACULA_RINGOFBLOOD_STUN = -1485064023;

		private const int BUFF_VAMPIRE_DRACULA_SHOCKWAVEFASTSLASH_INAIR = 2123856902;

		private const int BUFF_VAMPIRE_DRACULA_SHOCKWAVESLASH_INAIR = 906909424;

		private const int BUFF_VOLTAGE_ELECTRICROD_HIT_HARD = 1716523710;

		private const int BUFF_VOLTAGE_ELECTRICROD_TRAVEL_HARD = 516588505;

		private const int BUFF_WEREWOLF_BITE_BLEED = 1313262093;

		private const int BUFF_WEREWOLFCHIEF_SHADOWDASH = -986692305;

		private const int BUFF_WEREWOLFCHIEF_KNOCKDOWN_STUN = 1499693831;

		private const int BUFF_WEREWOLFCHIEF_MULTIBITE_BLEED = -1515424879;

		private const int BUFF_WINTER_YETI_THROWICICLE_STUN = -1749597248;

		private const int BUFF_YETI_FREEZE = -1743320328;

		private static BuffHaptic[] _buffHaptics = new BuffHaptic[171]
		{
			new BuffHaptic
			{
				Guid = 1205505492,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Bat Take Flight active"
			},
			new BuffHaptic
			{
				Guid = -371745443,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Bat Landing Travel active"
			},
			new BuffHaptic
			{
				Guid = -2001733587,
				Low = 0.7f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Bat Landing Travel End active"
			},
			new BuffHaptic
			{
				Guid = -351718282,
				Low = 0.4f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Wolf active"
			},
			new BuffHaptic
			{
				Guid = -1569370346,
				Low = 0.5f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Bear active"
			},
			new BuffHaptic
			{
				Guid = -1038422434,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Toad active"
			},
			new BuffHaptic
			{
				Guid = 902394170,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Rat active"
			},
			new BuffHaptic
			{
				Guid = 124832551,
				Low = 0.5f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Spider active"
			},
			new BuffHaptic
			{
				Guid = -53860211,
				Low = 0.4f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Human active"
			},
			new BuffHaptic
			{
				Guid = -434940480,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Grandma active"
			},
			new BuffHaptic
			{
				Guid = 957938484,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Carver Boss Bodyslam Grabbed active"
			},
			new BuffHaptic
			{
				Guid = 434680966,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Carver Boss Bodyslam Pin active"
			},
			new BuffHaptic
			{
				Guid = 1629292845,
				Low = 0.3f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Carver Boss Chopleap Stab Target active"
			},
			new BuffHaptic
			{
				Guid = 1472320596,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Carver Boss Corruption spill active"
			},
			new BuffHaptic
			{
				Guid = -2070186195,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Carver Boss Ultramega Chopleap Previous Target active"
			},
			new BuffHaptic
			{
				Guid = 1976120182,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Livith Aggroplayers Aggro active"
			},
			new BuffHaptic
			{
				Guid = -1828369565,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Livith Cloneninjutsu Screen active"
			},
			new BuffHaptic
			{
				Guid = 505048937,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Livith Stealth Aggro active"
			},
			new BuffHaptic
			{
				Guid = -1542843694,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana's Tail Single Throw Hit active"
			},
			new BuffHaptic
			{
				Guid = -311138981,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana's Tail Throw Hit active"
			},
			new BuffHaptic
			{
				Guid = 733131428,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana's Tail Tail Slam Hit active"
			},
			new BuffHaptic
			{
				Guid = 257901187,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Corruption Fountain Hit active"
			},
			new BuffHaptic
			{
				Guid = -1430472663,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Crosswind Slash Left Follow Up Hit active"
			},
			new BuffHaptic
			{
				Guid = -1812098607,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Crosswind Slash Left Initial Hit active"
			},
			new BuffHaptic
			{
				Guid = 961740099,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Crosswind Slash Right Follow Up Hit active"
			},
			new BuffHaptic
			{
				Guid = 1727302918,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Crosswind Slash Right Initial Hit active"
			},
			new BuffHaptic
			{
				Guid = -718813882,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Down Horizontal Slash Left Follow Up Hit active"
			},
			new BuffHaptic
			{
				Guid = -1286355674,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Down Horizontal Slash Left Initial Hit active"
			},
			new BuffHaptic
			{
				Guid = -1980410717,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Down Horizontal Slash Right Follow Up Hit active"
			},
			new BuffHaptic
			{
				Guid = 1021234102,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Down Horizontal Slash Right Initial Hit active"
			},
			new BuffHaptic
			{
				Guid = -638863409,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Eye of the Corruption Hit active"
			},
			new BuffHaptic
			{
				Guid = -1746192504,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Groundpiercer Downed Stun active"
			},
			new BuffHaptic
			{
				Guid = 764467131,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Groundpiercer Throw Hit active"
			},
			new BuffHaptic
			{
				Guid = 1353249536,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Beam Slow Throw Hit active"
			},
			new BuffHaptic
			{
				Guid = 2116092559,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Beam Throw Hit active"
			},
			new BuffHaptic
			{
				Guid = 1939629884,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Blast Hit active"
			},
			new BuffHaptic
			{
				Guid = 2089905588,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Hell Hit active"
			},
			new BuffHaptic
			{
				Guid = 898677408,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Snake Far Target active"
			},
			new BuffHaptic
			{
				Guid = 1995740870,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Snake Target active"
			},
			new BuffHaptic
			{
				Guid = -2049305989,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Blackfang Morgana Spectral Swarm Projectile Hit Slow active"
			},
			new BuffHaptic
			{
				Guid = -1749921093,
				Low = 0.2f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Blackfang Sentinel Counter Attack Kick Travel active"
			},
			new BuffHaptic
			{
				Guid = 1803245720,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Blackfang Valyr Phase Dual Tackle Downed Stun active"
			},
			new BuffHaptic
			{
				Guid = -72081294,
				Low = 0.25f,
				High = 0.5f,
				Duration = 0.2f,
				Label = "Bloodmend active"
			},
			new BuffHaptic
			{
				Guid = 372033291,
				Low = 0.25f,
				High = 0.5f,
				Duration = 0.3f,
				Label = "Crimsonbeam Channel active"
			},
			new BuffHaptic
			{
				Guid = 810941144,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Castleman Grab Travel active"
			},
			new BuffHaptic
			{
				Guid = 1269998543,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Castleman Throw Launch active"
			},
			new BuffHaptic
			{
				Guid = -266552360,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Castleman Throw Stun active"
			},
			new BuffHaptic
			{
				Guid = 348724578,
				Low = 0.25f,
				High = 0.5f,
				Duration = 0.3f,
				Label = "Chaos Ignite active"
			},
			new BuffHaptic
			{
				Guid = 2030766507,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Overseer Launch active"
			},
			new BuffHaptic
			{
				Guid = -608251310,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Overseer Stun active"
			},
			new BuffHaptic
			{
				Guid = 1045272422,
				Low = 0.4f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Overseer Piering Charge Grabbed active"
			},
			new BuffHaptic
			{
				Guid = -1142017589,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Overseer Piering Charge Launch active"
			},
			new BuffHaptic
			{
				Guid = 466039625,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Overseer Piering Charge Stun active"
			},
			new BuffHaptic
			{
				Guid = 893060518,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Paladin Melee Hit active"
			},
			new BuffHaptic
			{
				Guid = 1498838250,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Cursed Mountainbeast Enrage Scream Effect active"
			},
			new BuffHaptic
			{
				Guid = 363733786,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Cursed Mountainbeast Horn Flick Launch active"
			},
			new BuffHaptic
			{
				Guid = 1924509105,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Cursed Mountainbeast Stun active"
			},
			new BuffHaptic
			{
				Guid = 1343911070,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Cursed Witch Witchbolt Corruption active"
			},
			new BuffHaptic
			{
				Guid = 744300418,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dash Demount Roll active"
			},
			new BuffHaptic
			{
				Guid = -582698784,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Final Stage00 Bloodrain active"
			},
			new BuffHaptic
			{
				Guid = 741867216,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Final Stage05 Bloodstorm active"
			},
			new BuffHaptic
			{
				Guid = 1462199463,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Final Stage05 Damageamp active"
			},
			new BuffHaptic
			{
				Guid = -900688162,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Final Stage05 Final Stage Player active"
			},
			new BuffHaptic
			{
				Guid = 1231644507,
				Low = 0f,
				High = 0.25f,
				Duration = 0.15f,
				Label = "Feed Dash active"
			},
			new BuffHaptic
			{
				Guid = -1948299363,
				Low = 0f,
				High = 0.25f,
				Duration = 0.15f,
				Label = "Feed Dash Away active"
			},
			new BuffHaptic
			{
				Guid = 612319955,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Frost Vampire Freeze active"
			},
			new BuffHaptic
			{
				Guid = -1974768686,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Chill active"
			},
			new BuffHaptic
			{
				Guid = 821183186,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Curse of the Forest active"
			},
			new BuffHaptic
			{
				Guid = 792451792,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Daze active"
			},
			new BuffHaptic
			{
				Guid = -1413417542,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Teleport active"
			},
			new BuffHaptic
			{
				Guid = -1274886518,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Teleport In Phasing active"
			},
			new BuffHaptic
			{
				Guid = -246759104,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Dracula Teleport Out active"
			},
			new BuffHaptic
			{
				Guid = -1270359452,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Entangled active"
			},
			new BuffHaptic
			{
				Guid = 1276262777,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Fading Snare active"
			},
			new BuffHaptic
			{
				Guid = 695136154,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Fear active"
			},
			new BuffHaptic
			{
				Guid = 1416250466,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Fear Without Damage Cap active"
			},
			new BuffHaptic
			{
				Guid = -948292568,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Freeze active"
			},
			new BuffHaptic
			{
				Guid = -741376672,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Gloomrot Lightning Snare active"
			},
			new BuffHaptic
			{
				Guid = -2067402784,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Gloomrot Static active"
			},
			new BuffHaptic
			{
				Guid = -621774510,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Holy Area T02 active"
			},
			new BuffHaptic
			{
				Guid = 1533067119,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Ignite active"
			},
			new BuffHaptic
			{
				Guid = 129112290,
				Low = 0.8f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "In Air Landing active"
			},
			new BuffHaptic
			{
				Guid = -211448091,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Incapacitate active"
			},
			new BuffHaptic
			{
				Guid = 796254181,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Incapacitate ImpactFX active"
			},
			new BuffHaptic
			{
				Guid = -984195038,
				Low = 0.8f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Knockback active"
			},
			new BuffHaptic
			{
				Guid = -79611032,
				Low = 0.25f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Phasing dissipate active",
				FallingEdge = true
			},
			new BuffHaptic
			{
				Guid = 853298599,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Silversickness Burn active"
			},
			new BuffHaptic
			{
				Guid = 1224796284,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Spectral Weaken active"
			},
			new BuffHaptic
			{
				Guid = 355774169,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Stun active"
			},
			new BuffHaptic
			{
				Guid = -1369764436,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Stun ImpactFX active"
			},
			new BuffHaptic
			{
				Guid = -1992158531,
				Low = 0f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Wounded active"
			},
			new BuffHaptic
			{
				Guid = -966736642,
				Low = 0f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Weaken Cursed Ghosts active"
			},
			new BuffHaptic
			{
				Guid = -343432994,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Gloomrot The Professor Debuff Electric Amplify active"
			},
			new BuffHaptic
			{
				Guid = 2139290707,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Goldgolem Enrage Fistslam Stun active"
			},
			new BuffHaptic
			{
				Guid = 781339893,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Harpy Launcher Launch active"
			},
			new BuffHaptic
			{
				Guid = -638330945,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Irongolem Groundslam Downed Stun active"
			},
			new BuffHaptic
			{
				Guid = 940232581,
				Low = 0.8f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Jump from Cliffs Landing active"
			},
			new BuffHaptic
			{
				Guid = 691373616,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Jump from Cliffs Launch active"
			},
			new BuffHaptic
			{
				Guid = 1736079539,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Legion Gargoyle Relocate Forward Swipe active"
			},
			new BuffHaptic
			{
				Guid = -759178950,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Legion Gargoyle Relocate Forward Travel active"
			},
			new BuffHaptic
			{
				Guid = 1774931122,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Legion Guardian Minion Attack Chain Down Stun"
			},
			new BuffHaptic
			{
				Guid = -155974681,
				Low = 0f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Bloodprophet AOE active"
			},
			new BuffHaptic
			{
				Guid = -1942510877,
				Low = 0f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Nightmaiden Seduce Lesser active"
			},
			new BuffHaptic
			{
				Guid = -398835659,
				Low = 0f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Nightmaiden Seduce active"
			},
			new BuffHaptic
			{
				Guid = 1596283104,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Vargulf Knockdown active"
			},
			new BuffHaptic
			{
				Guid = 1772748887,
				Low = 0.2f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Vargulf Knockdown Lesser active"
			},
			new BuffHaptic
			{
				Guid = 1382025211,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Lucie Crippling Goo Poison active"
			},
			new BuffHaptic
			{
				Guid = 1950409780,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Lucie Deadly Injection active"
			},
			new BuffHaptic
			{
				Guid = 677638731,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Lucie Panicshot active"
			},
			new BuffHaptic
			{
				Guid = -1470336876,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Lucie Toxinbolt Toxin active"
			},
			new BuffHaptic
			{
				Guid = 146753505,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Manticore Dash Downed active"
			},
			new BuffHaptic
			{
				Guid = -351105234,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Manticore Dash Launch active"
			},
			new BuffHaptic
			{
				Guid = 1670636401,
				Low = 0f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Manticore Flame Chaos Burn Long active"
			},
			new BuffHaptic
			{
				Guid = -1067106579,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Manticore Frost Vortex active"
			},
			new BuffHaptic
			{
				Guid = 208530214,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Monster Final Projectile Incapacitate active"
			},
			new BuffHaptic
			{
				Guid = -759087433,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Monster Grab Target Grabbed active"
			},
			new BuffHaptic
			{
				Guid = -419794791,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Monster Groundslam Launch active"
			},
			new BuffHaptic
			{
				Guid = 373120229,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Monster Lightningpillar Areadamage active"
			},
			new BuffHaptic
			{
				Guid = 1322041767,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Monster Lightningslam Downed Capacitate active"
			},
			new BuffHaptic
			{
				Guid = -1510240353,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Monster Throw Launch active"
			},
			new BuffHaptic
			{
				Guid = 1559397587,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Monster Throw Stun active"
			},
			new BuffHaptic
			{
				Guid = -944919011,
				Low = 0.8f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Dismount Landing active"
			},
			new BuffHaptic
			{
				Guid = -1905167211,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Dismount Launch active"
			},
			new BuffHaptic
			{
				Guid = 854656674,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Mount Owner Horse active"
			},
			new BuffHaptic
			{
				Guid = -978792376,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Mount Owner Horse Vampire active"
			},
			new BuffHaptic
			{
				Guid = -890471139,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Mutant Spitter Poisonrain active"
			},
			new BuffHaptic
			{
				Guid = 1163490655,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Purifier Chaosvolley Burn active"
			},
			new BuffHaptic
			{
				Guid = -2071551838,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Purifier Jetpunch Stun active"
			},
			new BuffHaptic
			{
				Guid = 1883832448,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Purifier Jetpunch Launch active"
			},
			new BuffHaptic
			{
				Guid = 803103305,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Purifier Melee Stun active"
			},
			new BuffHaptic
			{
				Guid = -1665010680,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Shared Chaos Burn active"
			},
			new BuffHaptic
			{
				Guid = -1014729642,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Golem Swallow Travel active"
			},
			new BuffHaptic
			{
				Guid = -743287512,
				Low = 0.4f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Golem Swallow Target Swallowed"
			},
			new BuffHaptic
			{
				Guid = 522109406,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Golem Spit Launch active"
			},
			new BuffHaptic
			{
				Guid = 209011126,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Golem Spit Stun active"
			},
			new BuffHaptic
			{
				Guid = 558996680,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Slavemaster Knockdown active"
			},
			new BuffHaptic
			{
				Guid = 533823656,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Sommelier Horizontal Barrel Knockdown active"
			},
			new BuffHaptic
			{
				Guid = 831431517,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Spiderqueen Cocoonify Cocoon active"
			},
			new BuffHaptic
			{
				Guid = -1679785240,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Spiderqueen Cocoonify Hit active"
			},
			new BuffHaptic
			{
				Guid = 113363813,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Spiderqueen Exploding Poison active"
			},
			new BuffHaptic
			{
				Guid = 154706618,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Spiderqueen Poison active"
			},
			new BuffHaptic
			{
				Guid = 1314931922,
				Low = 0.2f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Spiderling Explode Poison active"
			},
			new BuffHaptic
			{
				Guid = -1831802998,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Spider Melee Webbing Slow active"
			},
			new BuffHaptic
			{
				Guid = 141775141,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Spider Range Poison active"
			},
			new BuffHaptic
			{
				Guid = -1315531444,
				Low = 0.8f,
				High = 0.3f,
				Duration = 0.3f,
				Label = "Sun Damage active"
			},
			new BuffHaptic
			{
				Guid = 1329219727,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Toadking Poison Rain active"
			},
			new BuffHaptic
			{
				Guid = 1750172438,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Toadking Spit Launch active"
			},
			new BuffHaptic
			{
				Guid = 41392389,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Toadking Spit Stun active"
			},
			new BuffHaptic
			{
				Guid = 2092842659,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Toadking Swallow Travel active"
			},
			new BuffHaptic
			{
				Guid = -915145807,
				Low = 0.4f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Toadking Swallow Target Swallowed active"
			},
			new BuffHaptic
			{
				Guid = -1458480041,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Tracking VBlood active"
			},
			new BuffHaptic
			{
				Guid = -17369676,
				Low = 0.7f,
				High = 0.2f,
				Duration = 0.25f,
				Label = "Horse Leap Landing active"
			},
			new BuffHaptic
			{
				Guid = 307775055,
				Low = 0.2f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Horse Leap Travel active"
			},
			new BuffHaptic
			{
				Guid = 1693465568,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Horse Leap Launch active"
			},
			new BuffHaptic
			{
				Guid = 1805805508,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Vampire Dracula Etherial Sword Target active"
			},
			new BuffHaptic
			{
				Guid = 1548355736,
				Low = 0.3f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Vampire Dracula Feed Attack Launch active"
			},
			new BuffHaptic
			{
				Guid = -1162871510,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Vampire Dracula Feed Attack Stun active"
			},
			new BuffHaptic
			{
				Guid = 123709251,
				Low = 0.4f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Vampire Dracula Feed Attack Target Grabbed active"
			},
			new BuffHaptic
			{
				Guid = 707131139,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Vampire Dracula Feed Blind active"
			},
			new BuffHaptic
			{
				Guid = 1257496824,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Vampire Dracula Ring of Blood Imprison active"
			},
			new BuffHaptic
			{
				Guid = -1485064023,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Vampire Dracula Ring of Blood Stun active"
			},
			new BuffHaptic
			{
				Guid = 2123856902,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Vampire Dracula Shockwave Fast Slash In Air active"
			},
			new BuffHaptic
			{
				Guid = 906909424,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Vampire Dracula Shockwave Slash In Air active"
			},
			new BuffHaptic
			{
				Guid = 1716523710,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Voltage Electricrod Hit Hard active"
			},
			new BuffHaptic
			{
				Guid = 516588505,
				Low = 0.2f,
				High = 0.1f,
				Duration = 0.15f,
				Label = "Voltage Electricrod Travel Hard active"
			},
			new BuffHaptic
			{
				Guid = 1499693831,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Werewolf Chief Knockdown active"
			},
			new BuffHaptic
			{
				Guid = -1515424879,
				Low = 0.2f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Werewolf Chief Multibite Bleed active"
			},
			new BuffHaptic
			{
				Guid = -986692305,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Werewolf Chief Shadowdash active"
			},
			new BuffHaptic
			{
				Guid = 1313262093,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Werewolf Bite Bleed active"
			},
			new BuffHaptic
			{
				Guid = -1749597248,
				Low = 0.3f,
				High = 0.2f,
				Duration = 0.15f,
				Label = "Winter Yeti Throw Icicle Stun active"
			},
			new BuffHaptic
			{
				Guid = -1743320328,
				Low = 0f,
				High = 0.3f,
				Duration = 0.15f,
				Label = "Yeti Freeze active"
			}
		};

		private static bool _gallopActive = false;

		private static bool _dashAwayActive = false;

		private static float _lastGallopPulse = 0f;

		private const float GALLOP_PULSE_INTERVAL = 0.5f;

		[HarmonyPatch(typeof(AbilityRunScriptsSystem_Client), "OnUpdate")]
		[HarmonyPostfix]
		private static void OnUpdatePostfix(AbilityRunScriptsSystem_Client __instance)
		{
			bool flag;
			for (int i = 0; i < _buffHaptics.Length; _buffHaptics[i].WasActive = flag, i++)
			{
				flag = PlayerState.HasBuff(_buffHaptics[i].Guid);
				bool num;
				if (!_buffHaptics[i].FallingEdge)
				{
					if (!flag)
					{
						continue;
					}
					num = !_buffHaptics[i].WasActive;
				}
				else
				{
					if (!_buffHaptics[i].WasActive)
					{
						continue;
					}
					num = !flag;
				}
				if (num)
				{
					Plugin.Info(_buffHaptics[i].Label);
					VibrationController.Pulse(_buffHaptics[i].Low, _buffHaptics[i].High, _buffHaptics[i].Duration);
				}
			}
			bool flag2 = PlayerState.HasBuff(-1948299363);
			if (flag2 && !_dashAwayActive)
			{
				FeedInteractionProgressSystemPatch.ClearState();
			}
			_dashAwayActive = flag2;
			bool flag3 = PlayerState.HasBuff(1156367321);
			if (flag3)
			{
				if (!_gallopActive)
				{
					VibrationController.Pulse(0.4f, 0.1f, 0.1f);
					_lastGallopPulse = Time.time;
				}
				else if (Time.time - _lastGallopPulse >= 0.5f)
				{
					VibrationController.Pulse(0.4f, 0.1f, 0.1f);
					_lastGallopPulse = Time.time;
				}
			}
			_gallopActive = flag3;
		}
	}
	[HarmonyPatch]
	internal static class FeedInteractionProgressSystemPatch
	{
		private const float HEARTBEAT_CYCLE = 1f;

		private const float LUB_START = 0f;

		private const float LUB_END = 0.08f;

		private const float DUB_START = 0.18f;

		private const float DUB_END = 0.26f;

		private const float LUB_LOW = 0.6f;

		private const float LUB_HIGH = 0.1f;

		private const float DUB_LOW = 0.5f;

		private const float DUB_HIGH = 0.1f;

		private static float _feedStartTime = -1f;

		private static bool _motorsOn = false;

		[HarmonyPatch(typeof(FeedInteractionProgressSystem), "OnUpdate")]
		[HarmonyPostfix]
		private static void OnUpdatePostfix()
		{
			Gamepad current = Gamepad.current;
			if (current != null)
			{
				if (_feedStartTime < 0f)
				{
					_feedStartTime = Time.time;
				}
				float num = (Time.time - _feedStartTime) % 1f;
				bool flag = num >= 0f && num < 0.08f;
				bool flag2 = num >= 0.18f && num < 0.26f;
				if (flag)
				{
					current.SetMotorSpeeds(0.6f, 0.1f);
					_motorsOn = true;
				}
				else if (flag2)
				{
					current.SetMotorSpeeds(0.5f, 0.1f);
					_motorsOn = true;
				}
				else if (_motorsOn)
				{
					current.ResetHaptics();
					_motorsOn = false;
				}
			}
		}

		internal static void EndFeedingHeartbeat()
		{
			Gamepad current = Gamepad.current;
			if (current != null)
			{
				current.ResetHaptics();
				ClearState();
			}
		}

		internal static void ClearState()
		{
			_feedStartTime = -1f;
			_motorsOn = false;
		}
	}
	[HarmonyPatch]
	internal static class TeleportBuffSpawnSystemPatch
	{
		[HarmonyPatch(typeof(TeleportBuffSpawnSystem), "OnUpdate")]
		[HarmonyPostfix]
		private static void OnUpdatePostfix()
		{
			Plugin.Info("Phase 2: dissolve pulse");
			VibrationController.Pulse(0.1f, 0.5f, 0.15f);
		}
	}
}
namespace VRisingControllerVibration.Helpers
{
	public class CoroutineHelper : MonoBehaviour
	{
		private static CoroutineHelper _instance;

		public static CoroutineHelper Instance
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Expected O, but got Unknown
				if ((Object)(object)_instance == (Object)null)
				{
					GameObject val = new GameObject("VRisingControllerVibration_CoroutineHelper");
					Object.DontDestroyOnLoad((Object)(object)val);
					_instance = ((Il2CppObjectBase)val.AddComponent(Il2CppType.Of<CoroutineHelper>())).Cast<CoroutineHelper>();
				}
				return _instance;
			}
		}
	}
	public static class GameState
	{
		public static bool IsWorldLoaded { get; private set; }

		public static void Init()
		{
			SceneManager.sceneLoaded += UnityAction<Scene, LoadSceneMode>.op_Implicit((Action<Scene, LoadSceneMode>)OnSceneLoaded);
		}

		private static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			IsWorldLoaded = ((Scene)(ref scene)).name == "VRisingWorld";
			Plugin.Info($"[GameState] Scene loaded: {((Scene)(ref scene)).name}, IsWorldLoaded: {IsWorldLoaded}");
		}
	}
	internal static class PlayerState
	{
		private static EntityQuery _playerQuery;

		public static World GameWorld { get; private set; }

		public static Entity Character { get; private set; } = Entity.Null;


		public static bool EnsurePlayerCache()
		{
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			if (GameWorld == null || !GameWorld.IsCreated)
			{
				GameWorld = null;
				Character = Entity.Null;
				Enumerator<World> enumerator = World.All.GetEnumerator();
				while (enumerator.MoveNext())
				{
					World current = enumerator.Current;
					if (!current.IsCreated || current.Name.Contains("Loading"))
					{
						continue;
					}
					try
					{
						EntityManager entityManager = current.EntityManager;
						EntityQuery playerQuery = ((EntityManager)(ref entityManager)).CreateEntityQuery((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<PlayerCharacter>() });
						if (((EntityQuery)(ref playerQuery)).CalculateEntityCount() > 0)
						{
							GameWorld = current;
							_playerQuery = playerQuery;
							break;
						}
					}
					catch
					{
					}
				}
				if (GameWorld == null)
				{
					return false;
				}
			}
			EntityManager entityManager2 = GameWorld.EntityManager;
			if (Character == Entity.Null || !((EntityManager)(ref entityManager2)).Exists(Character))
			{
				NativeArray<Entity> val = ((EntityQuery)(ref _playerQuery)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
				Character = ((val.Length > 0) ? val[0] : Entity.Null);
				val.Dispose();
				if (Character == Entity.Null)
				{
					return false;
				}
			}
			return true;
		}

		public static bool HasBuff(int buffGuidHash)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			if (!EnsurePlayerCache())
			{
				return false;
			}
			EntityManager entityManager = GameWorld.EntityManager;
			if (!((EntityManager)(ref entityManager)).HasBuffer<BuffBuffer>(Character))
			{
				return false;
			}
			DynamicBuffer<BuffBuffer> buffer = ((EntityManager)(ref entityManager)).GetBuffer<BuffBuffer>(Character, false);
			for (int i = 0; i < buffer.Length; i++)
			{
				BuffBuffer val = buffer[i];
				if (((PrefabGUID)(ref val.PrefabGuid)).GuidHash == buffGuidHash)
				{
					return true;
				}
			}
			return false;
		}

		public static bool HasComponent<T>() where T : struct
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if (!EnsurePlayerCache())
			{
				return false;
			}
			EntityManager entityManager = GameWorld.EntityManager;
			return ((EntityManager)(ref entityManager)).HasComponent<T>(Character);
		}

		public static T GetComponent<T>() where T : struct
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = GameWorld.EntityManager;
			return ((EntityManager)(ref entityManager)).GetComponentData<T>(Character);
		}
	}
}