Decompiled source of Randy Orton v1.3.0

FrenchPlatypus.RandyOrton.dll

Decompiled 4 hours ago
#define DEBUG
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
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 CustomEnnemies.Configuration;
using FrenchPlatypus.RandyOrton.NetcodePatcher;
using GameNetcodeStuff;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("FrenchPlatypus.RandyOrton")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1")]
[assembly: AssemblyProduct("RandyOrton")]
[assembly: AssemblyTitle("FrenchPlatypus.RandyOrton")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.0")]
[module: UnverifiableCode]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace CustomEnnemies
{
	[BepInPlugin("FrenchPlatypus.RandyOrton", "RandyOrton", "1.1.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		public static AssetBundle? ModAssets;

		internal static PluginConfig BoundConfig { get; private set; }

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			BoundConfig = new PluginConfig(((BaseUnityPlugin)this).Config);
			InitializeNetworkBehaviours();
			string path = "modassets_randy";
			ModAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), path));
			if ((Object)(object)ModAssets == (Object)null)
			{
				Logger.LogError((object)"Failed to load custom assets.");
				return;
			}
			EnemyType val = ModAssets.LoadAsset<EnemyType>("RandyOrton");
			TerminalNode val2 = ModAssets.LoadAsset<TerminalNode>("RandyOrtonTN");
			TerminalKeyword val3 = ModAssets.LoadAsset<TerminalKeyword>("RandyOrtonTK");
			Dictionary<LevelTypes, int> dictionary = new Dictionary<LevelTypes, int>
			{
				{
					(LevelTypes)(-1),
					150
				},
				{
					(LevelTypes)1024,
					120
				}
			};
			NetworkPrefabs.RegisterNetworkPrefab(val.enemyPrefab);
			Enemies.RegisterEnemy(val, dictionary, (Dictionary<string, int>)null, val2, val3);
			Logger.LogInfo((object)"Plugin FrenchPlatypus.RandyOrton is loaded out of nowhere!");
		}

		private static void InitializeNetworkBehaviours()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}
	}
	internal class RandyOrtonAI : EnemyAI
	{
		private enum State
		{
			SearchingForPlayer,
			ChasePlayerRko,
			ChasePlayerPuntKick,
			RkoInProgress,
			PuntKickInProgress,
			PuntKickNoSound,
			Pin
		}

		public Transform turnCompass = null;

		public Transform attackArea = null;

		private float timeSinceHittingLocalPlayer;

		private float timeSinceNewRandPos;

		private Vector3 positionRandomness;

		private Vector3 StalkPos;

		private Random enemyRandom = null;

		private bool isDeadAnimationDone;

		private bool isAgressive;

		private float puntKickTimer;

		[Conditional("DEBUG")]
		private void LogIfDebugBuild(string text)
		{
			Plugin.Logger.LogInfo((object)text);
		}

		public override void Start()
		{
			//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_00b0: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).Start();
			LogIfDebugBuild("Example Enemy Spawned");
			timeSinceHittingLocalPlayer = 0f;
			base.creatureVoice.mute = false;
			DoAnimationClientRpc("startWalk");
			timeSinceNewRandPos = 0f;
			positionRandomness = new Vector3(0f, 0f, 0f);
			base.agent.acceleration = 15f;
			base.agent.angularSpeed = 360f;
			enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex);
			isDeadAnimationDone = false;
			base.currentBehaviourStateIndex = 0;
			((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
		}

		public override void Update()
		{
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).Update();
			if (base.isEnemyDead)
			{
				if (!isDeadAnimationDone)
				{
					LogIfDebugBuild("Stopping enemy voice with janky code.");
					isDeadAnimationDone = true;
					MuteVoiceClientRpc(mute: false);
					PlayDeathSoundClientRpc();
				}
				return;
			}
			timeSinceHittingLocalPlayer += Time.deltaTime;
			timeSinceNewRandPos += Time.deltaTime;
			int currentBehaviourStateIndex = base.currentBehaviourStateIndex;
			if ((Object)(object)base.targetPlayer != (Object)null && (currentBehaviourStateIndex == 1 || currentBehaviourStateIndex == 2))
			{
				turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position);
				((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime);
			}
			if (base.stunNormalizedTimer > 0f)
			{
				base.agent.speed = 0f;
			}
			if (puntKickTimer > 0f)
			{
				puntKickTimer -= Time.deltaTime;
			}
		}

		public override void OnGainedOwnership()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			((NetworkBehaviour)this).OnGainedOwnership();
			if (((NetworkBehaviour)this).IsOwner)
			{
				LogIfDebugBuild("Get ownership");
				if (base.currentBehaviourStateIndex == 0)
				{
					LogIfDebugBuild("restart search coroutine");
					((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
					((EnemyAI)this).SwitchToBehaviourState(0);
					MuteVoiceClientRpc(mute: false);
					DoAnimationClientRpc("startWalk");
				}
				if (base.currentBehaviourStateIndex == 1 || base.currentBehaviourStateIndex == 2)
				{
					FoundClosestPlayerInRange(15f, 5f);
				}
			}
		}

		public override void DoAIInterval()
		{
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_049b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).DoAIInterval();
			if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead)
			{
				return;
			}
			switch (base.currentBehaviourStateIndex)
			{
			case 0:
				base.agent.speed = 3f;
				if (!((NetworkBehaviour)this).IsServer && ((NetworkBehaviour)this).IsOwner)
				{
					LogIfDebugBuild("Set Ownership back to : " + StartOfRound.Instance.allPlayerScripts[0].playerUsername);
					((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId);
				}
				else if (FoundClosestPlayerInRange(15f, 10f) && (Object)(object)base.targetPlayer != (Object)null)
				{
					if (base.targetPlayer.health <= 90 || isAgressive)
					{
						LogIfDebugBuild("Start Target Player For PuntKick");
						((EnemyAI)this).StopSearch(base.currentSearch, true);
						MuteVoiceClientRpc(mute: true);
						((EnemyAI)this).SwitchToBehaviourState(2);
						DoAnimationClientRpc("puntKickChase");
					}
					else if (!base.targetPlayer.HasLineOfSightToPosition(((Component)this).transform.position, 45f, 60, -1f))
					{
						LogIfDebugBuild("Start Target Player For Rko");
						((EnemyAI)this).StopSearch(base.currentSearch, true);
						MuteVoiceClientRpc(mute: true);
						((EnemyAI)this).SwitchToBehaviourState(1);
						DoAnimationClientRpc("rkoChase");
					}
				}
				break;
			case 1:
				base.agent.speed = 7f;
				if ((Object)(object)base.targetPlayer == (Object)null)
				{
					FoundClosestPlayerInRange(15f, 5f);
				}
				if (((NetworkBehaviour)this).IsOwner && (Object)(object)base.targetPlayer != (Object)null && (Object)(object)base.targetPlayer != (Object)(object)GameNetworkManager.Instance.localPlayerController)
				{
					((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId);
				}
				if ((Object)(object)base.targetPlayer == (Object)null || base.targetPlayer.HasLineOfSightToPosition(((Component)this).transform.position, 45f, 60, -1f) || Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 25f)
				{
					LogIfDebugBuild("Stop Target Player");
					((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
					((EnemyAI)this).SwitchToBehaviourState(0);
					MuteVoiceClientRpc(mute: false);
					DoAnimationClientRpc("startWalk");
				}
				else if (base.targetPlayer.health <= 90 || isAgressive)
				{
					LogIfDebugBuild("Player is down under 50 hp");
					((EnemyAI)this).SwitchToBehaviourState(2);
					DoAnimationClientRpc("puntKickChase");
				}
				else
				{
					((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer).transform.position, false);
					if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 3.5f)
					{
						RkoAttackServerRpc((int)base.targetPlayer.actualClientId);
					}
				}
				break;
			case 2:
				base.agent.speed = 15f;
				if ((Object)(object)base.targetPlayer == (Object)null)
				{
					FoundClosestPlayerInRange(15f, 5f);
				}
				if (((NetworkBehaviour)this).IsOwner && (Object)(object)base.targetPlayer != (Object)null && (Object)(object)base.targetPlayer != (Object)(object)GameNetworkManager.Instance.localPlayerController)
				{
					((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId);
				}
				if ((Object)(object)base.targetPlayer == (Object)null || Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > 15f || (base.targetPlayer.health > 90 && !isAgressive))
				{
					LogIfDebugBuild("Stop Target Player");
					isAgressive = false;
					((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
					((EnemyAI)this).SwitchToBehaviourState(0);
					MuteVoiceClientRpc(mute: false);
					DoAnimationClientRpc("startWalk");
				}
				else
				{
					((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer).transform.position, false);
					if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 4.5f)
					{
						PuntKickServerRpc((int)base.targetPlayer.actualClientId);
					}
				}
				break;
			case 3:
				base.agent.speed = 0f;
				break;
			case 4:
			case 5:
				base.agent.speed = 2f;
				break;
			case 6:
				base.agent.speed = 0f;
				break;
			default:
				LogIfDebugBuild("This Behavior State doesn't exist!");
				break;
			}
		}

		private bool FoundClosestPlayerInRange(float range, float senseRange)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).TargetClosestPlayer(1.5f, true, 70f);
			if ((Object)(object)base.targetPlayer == (Object)null)
			{
				((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f);
				range = senseRange;
			}
			return (Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range;
		}

		private bool TargetClosestPlayerInAnyCase()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			base.mostOptimalDistance = 2000f;
			base.targetPlayer = null;
			for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++)
			{
				base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position);
				if (base.tempDist < base.mostOptimalDistance)
				{
					base.mostOptimalDistance = base.tempDist;
					base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i];
				}
			}
			if ((Object)(object)base.targetPlayer == (Object)null)
			{
				return false;
			}
			return true;
		}

		public override void OnCollideWithPlayer(Collider other)
		{
			if (!(timeSinceHittingLocalPlayer < 1f))
			{
				PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false);
				if ((Object)(object)val != (Object)null && !((Object)(object)val != (Object)(object)base.targetPlayer))
				{
				}
			}
		}

		public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1)
		{
			((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID);
			if (base.isEnemyDead)
			{
				return;
			}
			base.enemyHP -= force;
			if (((NetworkBehaviour)this).IsOwner)
			{
				if (!isAgressive)
				{
					isAgressive = true;
					((EnemyAI)this).StopSearch(base.currentSearch, true);
					((EnemyAI)this).SwitchToBehaviourState(2);
					DoAnimationClientRpc("puntKickChase");
				}
				if (base.enemyHP <= 0 && !base.isEnemyDead)
				{
					isAgressive = false;
					((MonoBehaviour)this).StopCoroutine(RkoAttack());
					((MonoBehaviour)this).StopCoroutine(PuntKick());
					((MonoBehaviour)this).StopCoroutine(base.searchCoroutine);
					((EnemyAI)this).KillEnemyOnOwnerClient(false);
				}
			}
		}

		[ClientRpc]
		public void PlayDeathSoundClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3832209725u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3832209725u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.creatureVoice.Stop();
					base.creatureVoice.PlayOneShot(base.dieSFX);
				}
			}
		}

		[ClientRpc]
		public void MuteVoiceClientRpc(bool mute)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: 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_0083: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2658100704u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref mute, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2658100704u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					LogIfDebugBuild("Mute voice : " + mute);
					base.creatureVoice.mute = mute;
				}
			}
		}

		[ClientRpc]
		public void DoAnimationClientRpc(string animationName)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: 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_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1195885240u, val, (RpcDelivery)0);
				bool flag = animationName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1195885240u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				LogIfDebugBuild("Animation: " + animationName);
				base.creatureAnimator.SetTrigger(animationName);
			}
		}

		[ServerRpc]
		private void RkoAttackServerRpc(int playerObjectId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Invalid comparison between Unknown and I4
			//IL_00a5: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Invalid comparison between Unknown and I4
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2625888168u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerObjectId);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2625888168u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				NetworkManager networkManager2 = ((NetworkBehaviour)this).NetworkManager;
				if (networkManager2 != null && networkManager2.IsListening && (int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager2.IsServer || networkManager2.IsHost))
				{
					base.inSpecialAnimation = true;
					base.isClientCalculatingAI = false;
					base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId];
					base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this;
					((Component)this).transform.position = new Vector3(((Component)base.inSpecialAnimationWithPlayer).transform.position.x, ((Component)base.inSpecialAnimationWithPlayer).transform.position.y + 0.5f, ((Component)base.inSpecialAnimationWithPlayer).transform.position.z);
					RkoAttackClientRpc(playerObjectId);
				}
			}
		}

		[ClientRpc]
		private void RkoAttackClientRpc(int playerObjectId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Invalid comparison between Unknown and I4
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4166766768u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerObjectId);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4166766768u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				LogIfDebugBuild("attack CLIENT rpc");
				NetworkManager networkManager2 = ((NetworkBehaviour)this).NetworkManager;
				if (networkManager2 != null && networkManager2.IsListening && (int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager2.IsClient || networkManager2.IsHost))
				{
					LogIfDebugBuild("attack test");
					base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId];
					base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this;
					((Component)this).transform.position = new Vector3(((Component)base.inSpecialAnimationWithPlayer).transform.position.x, ((Component)base.inSpecialAnimationWithPlayer).transform.position.y + 0.5f, ((Component)base.inSpecialAnimationWithPlayer).transform.position.z);
					((EnemyAI)this).SyncPositionToClients();
					base.inSpecialAnimationWithPlayer.SyncBodyPositionWithClients();
					base.inSpecialAnimationWithPlayer.voiceMuffledByEnemy = true;
					base.inSpecialAnimation = true;
					((Behaviour)base.agent).enabled = false;
					base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true;
					base.inSpecialAnimationWithPlayer.snapToServerPosition = true;
					Vector3 val3 = ((!((NetworkBehaviour)base.inSpecialAnimationWithPlayer).IsOwner) ? ((Component)base.inSpecialAnimationWithPlayer).transform.parent.TransformPoint(base.inSpecialAnimationWithPlayer.serverPlayerPosition) : ((Component)base.inSpecialAnimationWithPlayer).transform.position);
					Vector3 position = ((Component)this).transform.position;
					position.y = ((Component)base.inSpecialAnimationWithPlayer).transform.position.y;
					turnCompass.LookAt(val3);
					position = ((Component)this).transform.eulerAngles;
					position.y = turnCompass.eulerAngles.y;
					((Component)this).transform.eulerAngles = position;
					((MonoBehaviour)this).StartCoroutine(RkoAttack());
				}
			}
		}

		private IEnumerator RkoAttack()
		{
			((EnemyAI)this).SwitchToBehaviourState(3);
			((EnemyAI)this).SetDestinationToPosition(((Component)base.inSpecialAnimationWithPlayer).transform.position, false);
			DoAnimationClientRpc("rko");
			yield return (object)new WaitForSeconds(0.5f);
			if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null)
			{
				LogIfDebugBuild("Rko hit player!");
				base.inSpecialAnimationWithPlayer.DamagePlayer(400, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
				yield return (object)new WaitForSeconds(1.2f);
				if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null && (Object)(object)base.inSpecialAnimationWithPlayer.deadBody != (Object)null)
				{
					base.inSpecialAnimationWithPlayer.snapToServerPosition = false;
					base.inSpecialAnimationWithPlayer.deadBody.causeOfDeath = (CauseOfDeath)2;
					base.inSpecialAnimationWithPlayer.deadBody.bodyBleedingHeavily = true;
					DoAnimationClientRpc("pin");
					((EnemyAI)this).SwitchToBehaviourState(6);
					yield return (object)new WaitForSeconds(3f);
				}
			}
			base.inSpecialAnimation = false;
			((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
			((EnemyAI)this).SwitchToBehaviourState(0);
			base.creatureVoice.mute = false;
			DoAnimationClientRpc("startWalk");
		}

		[ServerRpc]
		private void PuntKickServerRpc(int playerObjectId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Invalid comparison between Unknown and I4
			//IL_00a5: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2443960794u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerObjectId);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2443960794u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				NetworkManager networkManager2 = ((NetworkBehaviour)this).NetworkManager;
				if (networkManager2 != null && networkManager2.IsListening && (int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager2.IsServer || networkManager2.IsHost))
				{
					base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId];
					PuntKickClientRpc(playerObjectId);
				}
			}
		}

		[ClientRpc]
		private void PuntKickClientRpc(int playerObjectId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2119930973u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerObjectId);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2119930973u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkManager networkManager2 = ((NetworkBehaviour)this).NetworkManager;
				if (networkManager2 != null && networkManager2.IsListening && (int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager2.IsClient || networkManager2.IsHost))
				{
					base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId];
					((MonoBehaviour)this).StartCoroutine(PuntKick());
				}
			}
		}

		private IEnumerator PuntKick()
		{
			if (puntKickTimer <= 0f)
			{
				((EnemyAI)this).SwitchToBehaviourState(4);
				puntKickTimer = 7f;
			}
			else
			{
				((EnemyAI)this).SwitchToBehaviourState(5);
			}
			DoAnimationClientRpc("puntKick");
			yield return (object)new WaitForSeconds(0.2f);
			if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.inSpecialAnimationWithPlayer).transform.position) < 3f)
			{
				LogIfDebugBuild("PuntKick hit player!");
				base.inSpecialAnimationWithPlayer.DamagePlayer(400, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
				yield return (object)new WaitForSeconds(1.2f);
				if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null && (Object)(object)base.inSpecialAnimationWithPlayer.deadBody != (Object)null)
				{
					base.inSpecialAnimationWithPlayer.snapToServerPosition = false;
					base.inSpecialAnimationWithPlayer.deadBody.causeOfDeath = (CauseOfDeath)2;
					base.inSpecialAnimationWithPlayer.deadBody.bodyBleedingHeavily = true;
					isAgressive = false;
					DoAnimationClientRpc("pin");
					((EnemyAI)this).SwitchToBehaviourState(6);
					yield return (object)new WaitForSeconds(3f);
				}
			}
			else
			{
				yield return (object)new WaitForSeconds(2f);
			}
			base.inSpecialAnimation = false;
			((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
			((EnemyAI)this).SwitchToBehaviourState(0);
			base.creatureVoice.mute = false;
			DoAnimationClientRpc("startWalk");
		}

		[ClientRpc]
		public void PuntKickHitClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2419624457u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2419624457u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				LogIfDebugBuild("PuntKickHitClientRPC");
				PlayerControllerB targetPlayer = base.targetPlayer;
				if ((Object)(object)targetPlayer != (Object)null)
				{
					LogIfDebugBuild("punt kick hit player!");
					timeSinceHittingLocalPlayer = 0f;
					targetPlayer.causeOfDeath = (CauseOfDeath)12;
					targetPlayer.DamagePlayer(400, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
					isAgressive = false;
				}
			}
		}

		protected override void __initializeVariables()
		{
			((EnemyAI)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_RandyOrtonAI()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3832209725u, new RpcReceiveHandler(__rpc_handler_3832209725));
			NetworkManager.__rpc_func_table.Add(2658100704u, new RpcReceiveHandler(__rpc_handler_2658100704));
			NetworkManager.__rpc_func_table.Add(1195885240u, new RpcReceiveHandler(__rpc_handler_1195885240));
			NetworkManager.__rpc_func_table.Add(2625888168u, new RpcReceiveHandler(__rpc_handler_2625888168));
			NetworkManager.__rpc_func_table.Add(4166766768u, new RpcReceiveHandler(__rpc_handler_4166766768));
			NetworkManager.__rpc_func_table.Add(2443960794u, new RpcReceiveHandler(__rpc_handler_2443960794));
			NetworkManager.__rpc_func_table.Add(2119930973u, new RpcReceiveHandler(__rpc_handler_2119930973));
			NetworkManager.__rpc_func_table.Add(2419624457u, new RpcReceiveHandler(__rpc_handler_2419624457));
		}

		private static void __rpc_handler_3832209725(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RandyOrtonAI)(object)target).PlayDeathSoundClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2658100704(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool mute = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref mute, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RandyOrtonAI)(object)target).MuteVoiceClientRpc(mute);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1195885240(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string animationName = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RandyOrtonAI)(object)target).DoAnimationClientRpc(animationName);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2625888168(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Invalid comparison between Unknown and I4
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
			{
				if ((int)networkManager.LogLevel <= 1)
				{
					Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
				}
			}
			else
			{
				int playerObjectId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RandyOrtonAI)(object)target).RkoAttackServerRpc(playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4166766768(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerObjectId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RandyOrtonAI)(object)target).RkoAttackClientRpc(playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2443960794(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Invalid comparison between Unknown and I4
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
			{
				if ((int)networkManager.LogLevel <= 1)
				{
					Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
				}
			}
			else
			{
				int playerObjectId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((RandyOrtonAI)(object)target).PuntKickServerRpc(playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2119930973(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerObjectId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RandyOrtonAI)(object)target).PuntKickClientRpc(playerObjectId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2419624457(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((RandyOrtonAI)(object)target).PuntKickHitClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "RandyOrtonAI";
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "FrenchPlatypus.RandyOrton";

		public const string PLUGIN_NAME = "RandyOrton";

		public const string PLUGIN_VERSION = "1.1.1";
	}
}
namespace CustomEnnemies.Configuration
{
	public class PluginConfig
	{
		public ConfigEntry<int> SpawnWeight;

		public PluginConfig(ConfigFile cfg)
		{
			SpawnWeight = cfg.Bind<int>("General", "Spawn weight", 150, "The spawn chance weight for RandyOrton, relative to other existing enemies.\nGoes up from 0, lower is more rare, 100 and up is very common.");
			ClearUnusedEntries(cfg);
		}

		private void ClearUnusedEntries(ConfigFile cfg)
		{
			PropertyInfo property = ((object)cfg).GetType().GetProperty("OrphanedEntries", BindingFlags.Instance | BindingFlags.NonPublic);
			Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)property.GetValue(cfg, null);
			dictionary.Clear();
			cfg.Save();
		}
	}
}
namespace FrenchPlatypus.RandyOrton.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}