Decompiled source of MoreMinibosses v1.0.2

MoreMinibosses.dll

Decompiled 16 hours ago
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 System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using Microsoft.CodeAnalysis;
using MoreMinibosses.Components.TemplarEvent;
using MoreMinibosses.StageAddons;
using R2API;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ExpansionManagement;
using RoR2BepInExPack.GameAssetPaths.Version_1_35_0;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("MoreMinibosses")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0b7aca910110abe036f0028b48eed8b8d0643082")]
[assembly: AssemblyProduct("MoreMinibosses")]
[assembly: AssemblyTitle("MoreMinibosses")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MoreMinibosses
{
	public class Assets
	{
		public static AssetBundle assetBundle;

		public static CharacterSpawnCard cscTemplarMiniboss;

		public static GameObject templarCellVentPrefab;

		public static void Init()
		{
			CreateTemplarCellVentEvent();
		}

		private static void CreateTemplarCellVentEvent()
		{
			//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_0030: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Expected O, but got Unknown
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Expected O, but got Unknown
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Expected O, but got Unknown
			//IL_039b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: Expected O, but got Unknown
			//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			cscTemplarMiniboss = Object.Instantiate<CharacterSpawnCard>(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)RoR2_Base_ClayBruiser.cscClayBruiser_asset).WaitForCompletion());
			cscTemplarMiniboss.equipmentToGrant = (EquipmentDef[])(object)new EquipmentDef[1] { Addressables.LoadAssetAsync<EquipmentDef>((object)RoR2_Base_EliteLightning.EliteLightningEquipment_asset).WaitForCompletion() };
			cscTemplarMiniboss.itemsToGrant = (ItemCountPair[])(object)new ItemCountPair[4]
			{
				new ItemCountPair
				{
					itemDef = Addressables.LoadAssetAsync<ItemDef>((object)RoR2_DLC1_MissileVoid.MissileVoid_asset).WaitForCompletion(),
					count = 1
				},
				new ItemCountPair
				{
					itemDef = Addressables.LoadAssetAsync<ItemDef>((object)RoR2_DLC1_MoreMissile.MoreMissile_asset).WaitForCompletion(),
					count = 1
				},
				new ItemCountPair
				{
					itemDef = Addressables.LoadAssetAsync<ItemDef>((object)RoR2_Base_BoostHp.BoostHp_asset).WaitForCompletion(),
					count = 30
				},
				new ItemCountPair
				{
					itemDef = Addressables.LoadAssetAsync<ItemDef>((object)RoR2_Base_BoostDamage.BoostDamage_asset).WaitForCompletion(),
					count = 10
				}
			};
			templarCellVentPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_NullSafeWard.NullSafeWard_prefab).WaitForCompletion(), "TemplarCellVent");
			Object.Destroy((Object)(object)templarCellVentPrefab.GetComponent<HoldoutZoneController>());
			Object.Destroy((Object)(object)templarCellVentPrefab.GetComponent<SphereZone>());
			Object.Destroy((Object)(object)((Component)templarCellVentPrefab.transform.Find("BuiltInEffects/WardOn")).gameObject);
			Object.Destroy((Object)(object)((Component)templarCellVentPrefab.transform.Find("BuiltInEffects/Complete")).gameObject);
			Transform val = templarCellVentPrefab.transform.Find("Model/Gem");
			Material val2 = new Material(((Renderer)((Component)val).GetComponent<MeshRenderer>()).sharedMaterial);
			val2.SetTexture("_MainTex", (Texture)null);
			val2.SetColor("_Color", new Color(0.19f, 0f, 0.87f, 0.08f));
			val2.SetFloat("_EmissionPower", 0.437f);
			((Renderer)((Component)val).GetComponent<MeshRenderer>()).sharedMaterial = val2;
			Transform val3 = templarCellVentPrefab.transform.Find("Model/Holder");
			Material val4 = new Material(((Renderer)((Component)val3).GetComponent<MeshRenderer>()).sharedMaterial);
			val4.SetTexture("_SnowTex", Addressables.LoadAssetAsync<Texture>((object)RoR2_DLC1_ancientloft.texAncientLoft_TileRustyMetal_tif).WaitForCompletion());
			val4.SetColor("_Color", new Color(0f, 0f, 0f, 1f));
			val4.SetFloat("_SnowBias", -0.4378476f);
			val4.SetFloat("_SpecularStrength", 0f);
			((Renderer)((Component)val3).GetComponent<MeshRenderer>()).sharedMaterial = val4;
			Transform val5 = templarCellVentPrefab.transform.Find("Indicator/IndicatorSphere");
			Material val6 = new Material(((Renderer)((Component)val5).GetComponent<MeshRenderer>()).sharedMaterials[1]);
			val6.SetFloat("_InvFade", 0.3631961f);
			val6.SetFloat("_SoftPower", 0.1f);
			val6.SetFloat("_RimStrength", 0.1331203f);
			val6.SetFloat("_IntersectionStrength", 4.494142f);
			Material[] sharedMaterials = ((Renderer)((Component)val5).GetComponent<MeshRenderer>()).sharedMaterials;
			sharedMaterials[1] = val6;
			((Renderer)((Component)val5).GetComponent<MeshRenderer>()).sharedMaterials = sharedMaterials;
			EntityStateMachine component = templarCellVentPrefab.GetComponent<EntityStateMachine>();
			((SerializableEntityStateType)(ref component.initialStateType)).typeName = "EntityStates.Idle";
			((SerializableEntityStateType)(ref component.mainStateType)).typeName = "EntityStates.Idle";
			PurchaseInteraction component2 = templarCellVentPrefab.GetComponent<PurchaseInteraction>();
			component2.displayNameToken = Language.Add("CELLVENT", "Tarnished Cell Vent");
			component2.onPurchase = new PurchaseEvent();
			component2.costType = (CostTypeIndex)12;
			component2.cost = 1;
			component2.requiredExpansion = Addressables.LoadAssetAsync<ExpansionDef>((object)RoR2_DLC1_Common.DLC1_asset).WaitForCompletion();
			TemplarEventController templarEventController = templarCellVentPrefab.AddComponent<TemplarEventController>();
			templarEventController.interaction = component2;
		}

		private static void GetAssetBundle()
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MoreMinibosses.moreminibosses");
			if (stream != null)
			{
				assetBundle = AssetBundle.LoadFromStream(stream);
			}
		}
	}
	public static class Language
	{
		private const string prefix = "MIYOWI_MOREMINIBOSSES_";

		public static string Add(string token, string text)
		{
			string text2 = "MIYOWI_MOREMINIBOSSES_token";
			LanguageAPI.Add(text2, text);
			return text2;
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("mwmw.MoreMinibosses", "MoreMinibosses", "1.0.2")]
	public class MoreMinibosses : BaseUnityPlugin
	{
		public const string PluginGUID = "mwmw.MoreMinibosses";

		public const string PluginAuthor = "mwmw";

		public const string PluginName = "MoreMinibosses";

		public const string PluginVersion = "1.0.2";

		public static ConfigFile config;

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			config = ((BaseUnityPlugin)this).Config;
			RegisterNetMessages();
			Assets.Init();
			new AphelianSanctuaryAddon().Init();
		}

		private void OnLoadFinished()
		{
		}

		private void RegisterNetMessages()
		{
		}
	}
	public class Options
	{
		private static bool? _rooEnabled;

		public static bool rooEnabled
		{
			get
			{
				if (!_rooEnabled.HasValue)
				{
					_rooEnabled = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
				}
				return _rooEnabled.Value;
			}
		}

		public static ConfigEntry<bool> placeholderOption { get; set; }

		public static void Init()
		{
			placeholderOption = MoreMinibosses.config.Bind<bool>("placeholder section", "placeholder title", true, "placeholder description");
			if (rooEnabled)
			{
				RoOInit();
			}
		}

		private static void RoOInit()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(placeholderOption, new CheckBoxConfig()));
			ModSettingsManager.SetModDescription("placeholder");
		}
	}
}
namespace MoreMinibosses.StageAddons
{
	public class AphelianSanctuaryAddon : BaseStageAddon
	{
		protected override string scene_name => "ancientloft";

		protected override void CreateAddons()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(Assets.templarCellVentPrefab);
			switch (Random.RandomRangeInt(0, 3))
			{
			case 0:
				val.transform.position = new Vector3(-65.82f, 40.41f, -59.85f);
				break;
			case 1:
				val.transform.position = new Vector3(165.54f, 7.53f, -28.11f);
				break;
			case 2:
				val.transform.position = new Vector3(-70.52f, 27.23f, 84.24f);
				break;
			}
			NetworkServer.Spawn(val);
		}
	}
	public abstract class BaseStageAddon
	{
		protected abstract string scene_name { get; }

		private void CreateAddonsOnScene(Stage stage)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == scene_name)
			{
				CreateAddons();
			}
		}

		protected abstract void CreateAddons();

		public void Init()
		{
			Stage.onServerStageBegin += CreateAddonsOnScene;
		}
	}
}
namespace MoreMinibosses.Components.TemplarEvent
{
	public class TemplarEventController : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <InteractionFadeOut>d__3 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public TemplarEventController <>4__this;

			private Transform <tIndicator>5__1;

			private Material <matIndicator>5__2;

			private Transform <tGem>5__3;

			private Material <matGem>5__4;

			private Color <targetColor>5__5;

			private Color <currentColor>5__6;

			private float <colorDistance>5__7;

			private float <sparkleVisiblity>5__8;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<tIndicator>5__1 = null;
				<matIndicator>5__2 = null;
				<tGem>5__3 = null;
				<matGem>5__4 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dc: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ed: 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_00f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0162: Unknown result type (might be due to invalid IL or missing references)
				//IL_0168: Unknown result type (might be due to invalid IL or missing references)
				//IL_017f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0196: Unknown result type (might be due to invalid IL or missing references)
				//IL_019b: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<tIndicator>5__1 = ((Component)<>4__this).transform.Find("Indicator/IndicatorSphere");
					<matIndicator>5__2 = ((Renderer)((Component)<tIndicator>5__1).GetComponent<MeshRenderer>()).materials[1];
					<tGem>5__3 = ((Component)<>4__this).transform.Find("Model/Gem");
					<matGem>5__4 = ((Renderer)((Component)<tGem>5__3).GetComponent<MeshRenderer>()).material;
					<matGem>5__4.SetColor("_Color", new Color(0.19f, 0f, 0.87f, 0.08f));
					<targetColor>5__5 = new Color(0.09f, 0.02f, 0.33f, 0.08f);
					<currentColor>5__6 = <matGem>5__4.GetColor("_Color");
					<colorDistance>5__7 = Vector4.Distance(Color.op_Implicit(<currentColor>5__6), Color.op_Implicit(<targetColor>5__5));
					<sparkleVisiblity>5__8 = <matIndicator>5__2.GetFloat("_Boost");
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				if (<sparkleVisiblity>5__8 > 0f || <colorDistance>5__7 > 0f)
				{
					<matIndicator>5__2.SetFloat("_Boost", Mathf.Lerp(<sparkleVisiblity>5__8, 0f, <sparkleVisiblity>5__8 * Time.deltaTime * 5f));
					<matGem>5__4.SetColor("_Color", Color.Lerp(<currentColor>5__6, <targetColor>5__5, <colorDistance>5__7 * Time.deltaTime * 5f));
					<currentColor>5__6 = <matGem>5__4.GetColor("_Color");
					<colorDistance>5__7 = Vector4.Distance(Color.op_Implicit(<currentColor>5__6), Color.op_Implicit(<targetColor>5__5));
					<sparkleVisiblity>5__8 = <matIndicator>5__2.GetFloat("_Boost");
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
				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 PurchaseInteraction interaction;

		public void Awake()
		{
			SetupBeginEvent();
		}

		private void SetupBeginEvent()
		{
			((UnityEvent<PayCostContext, PayCostResults>)(object)interaction.onDetailedPurchaseServer).AddListener((UnityAction<PayCostContext, PayCostResults>)delegate
			{
				//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_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: 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)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				//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_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bb: Expected O, but got Unknown
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Expected O, but got Unknown
				//IL_00db: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: 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_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_01e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f1: Expected O, but got Unknown
				interaction.SetAvailable(false);
				Ray val = default(Ray);
				((Ray)(ref val))..ctor(((Component)this).transform.position + Vector3.up * 15f, Vector3.down);
				Vector3 val2 = ((Component)this).transform.position + Vector3.up * 15f;
				RaycastHit val3 = default(RaycastHit);
				if (Physics.Raycast(val, ref val3, 15f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					val2 = ((RaycastHit)(ref val3)).point + Vector3.up * 0.5f;
				}
				DirectorSpawnRequest val4 = new DirectorSpawnRequest((SpawnCard)(object)Assets.cscTemplarMiniboss, new DirectorPlacementRule
				{
					placementMode = (PlacementMode)0,
					position = val2
				}, RoR2Application.rng);
				val4.summonerBodyObject = null;
				val4.ignoreTeamMemberLimit = true;
				val4.teamIndexOverride = (TeamIndex)2;
				GameObject spawnedInstance = ((SpawnCard)Assets.cscTemplarMiniboss).DoSpawn(val2, Quaternion.identity, val4).spawnedInstance;
				if (Object.op_Implicit((Object)(object)spawnedInstance))
				{
					string text = "[WARNING] Clay Templar has been released from the Cell..!";
					StringBuilder stringBuilder = new StringBuilder();
					string text2 = text;
					foreach (char value in text2)
					{
						if (Random.value <= 0.05f)
						{
							stringBuilder.Append("?");
						}
						else if (Random.value <= 0.08f)
						{
							stringBuilder.Append("??");
						}
						stringBuilder.Append(value);
					}
					Chat.ServerAttemptBroadcastChat("<style=cWorldEvent>" + stringBuilder.ToString() + "</style>");
					Util.PlaySound("Play_ui_obj_nullWard_activate", ((Component)this).gameObject);
					CharacterMaster master = spawnedInstance.GetComponent<CharacterMaster>();
					master.onBodyDeath.AddListener((UnityAction)delegate
					{
						//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_0020: 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)
						PickupDropletController.CreatePickupDroplet(new UniquePickup(PickupCatalog.FindPickupIndex("ItemIndex.MoreMissile")), master.GetBody().coreTransform.position, new Vector3(Random.Range(-1f, 1f), 20f, Random.Range(-1f, 1f)), false);
						((Component)((Component)this).transform.Find("BuiltInEffects/Active")).gameObject.SetActive(false);
						((MonoBehaviour)this).StartCoroutine(InteractionFadeOut());
					});
				}
				((Component)((Component)this).transform.Find("BuiltInEffects/Active")).gameObject.SetActive(true);
			});
		}

		[IteratorStateMachine(typeof(<InteractionFadeOut>d__3))]
		private IEnumerator InteractionFadeOut()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <InteractionFadeOut>d__3(0)
			{
				<>4__this = this
			};
		}
	}
}