Decompiled source of KindredArenas v1.1.1

KindredArenas.dll

Decompiled 2 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Bloodstone.API;
using HarmonyLib;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem.Collections.Generic;
using KindredArenas.Data;
using KindredArenas.Services;
using Microsoft.CodeAnalysis;
using ProjectM;
using ProjectM.Network;
using ProjectM.Shared;
using Stunlock.Core;
using Stunlock.Network;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
using UnityEngine;
using VampireCommandFramework;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("KindredArenas")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("PvP protection everywhere but specified areas")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1+caa11cfca17574ac03b8e205167873d9a5639f31")]
[assembly: AssemblyProduct("KindredArenas")]
[assembly: AssemblyTitle("KindredArenas")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.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;
		}
	}
}
public class Float2Converter : JsonConverter<float2>
{
	public override float2 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		if (reader.TokenType != JsonTokenType.StartArray)
		{
			throw new JsonException();
		}
		reader.Read();
		float single = reader.GetSingle();
		reader.Read();
		float single2 = reader.GetSingle();
		reader.Read();
		return new float2(single, single2);
	}

	public override void Write(Utf8JsonWriter writer, float2 value, JsonSerializerOptions options)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		writer.WriteStartArray();
		writer.WriteNumberValue(value.x);
		writer.WriteNumberValue(value.y);
		writer.WriteEndArray();
	}
}
namespace KindredArenas
{
	internal class Buffs
	{
		public static void AddBuff(Entity User, Entity Character, PrefabGUID buffPrefab, bool dontExpire = false)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: 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_0026: 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_002e: 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_0034: 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_0036: 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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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)
			//IL_0059: 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_0060: 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_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			DebugEventsSystem existingSystem = Core.Server.GetExistingSystem<DebugEventsSystem>();
			ApplyBuffDebugEvent val = new ApplyBuffDebugEvent
			{
				BuffPrefabGUID = buffPrefab
			};
			FromCharacter val2 = new FromCharacter
			{
				User = User,
				Character = Character
			};
			existingSystem.ApplyBuff(val2, val);
			Entity entity = default(Entity);
			if (dontExpire && BuffUtility.TryGetBuff(Core.EntityManager, Character, buffPrefab, ref entity) && entity.Has<LifeTime>())
			{
				LifeTime componentData = entity.Read<LifeTime>();
				componentData.Duration = -1f;
				componentData.EndAction = (LifeTimeEndAction)0;
				entity.Write<LifeTime>(componentData);
			}
		}

		public static bool RemoveBuff(Entity Character, PrefabGUID buffPrefab)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: 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)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			Entity val = default(Entity);
			if (BuffUtility.TryGetBuff(Core.EntityManager, Character, buffPrefab, ref val))
			{
				DestroyUtility.Destroy(Core.EntityManager, val, (DestroyDebugReason)13, (string)null, 0);
				return true;
			}
			return false;
		}

		public static bool HasBuff(Entity Character, PrefabGUID buffPrefab)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: 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)
			Entity val = default(Entity);
			return BuffUtility.TryGetBuff(Core.EntityManager, Character, buffPrefab, ref val);
		}

		public static float GetBuffDuration(Entity Character, PrefabGUID buffPrefab)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: 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)
			//IL_0016: 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_001f: Unknown result type (might be due to invalid IL or missing references)
			Entity entity = default(Entity);
			if (!BuffUtility.TryGetBuff(Core.EntityManager, Character, buffPrefab, ref entity))
			{
				return 0f;
			}
			if (entity.Has<LifeTime>())
			{
				return entity.Read<LifeTime>().Duration;
			}
			return -1f;
		}
	}
	[CommandGroup("arena", null)]
	internal class ArenaCommands
	{
		[Command("on", null, null, "Turns on PvP arenas", null, true)]
		public static void PvPArenaOn(ChatCommandContext ctx)
		{
			Core.PvpArenaService.EnablePvpArenas();
			ctx.Reply("PvP arena turned on");
		}

		[Command("off", null, null, "Turns off PvP arenas", null, true)]
		public static void PvPArenaOff(ChatCommandContext ctx)
		{
			Core.PvpArenaService.DisablePvpArenas();
			ctx.Reply("PvP arena turned off");
		}

		[Command("create", "add", null, "Creates a PvP arena centered at your current location", null, true)]
		public static void CreatePvPArena(ChatCommandContext ctx, string name, float radius)
		{
			//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_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			Translation val = ctx.Event.SenderCharacterEntity.Read<Translation>();
			float2 xz = ((float3)(ref val.Value)).xz;
			if (Core.PvpArenaService.CreateZone(name, xz, radius))
			{
				ctx.Reply($"PvP arena '{name}' created at ({xz.x}, {xz.y}) with a radius of {radius}");
			}
			else
			{
				ctx.Reply("PvP arena '" + name + "' already exists");
			}
		}

		[Command("remove", "delete", null, "Removes a PvP arena", null, true)]
		public static void RemovePvPArena(ChatCommandContext ctx, string name)
		{
			if (Core.PvpArenaService.RemoveZone(name))
			{
				ctx.Reply("PvP arena '" + name + "' removed");
			}
			else
			{
				ctx.Reply("PvP arena '" + name + "' not found");
			}
		}

		[Command("list", null, null, "Lists all PvP arenas", null, true)]
		public static void ListPvPArenas(ChatCommandContext ctx)
		{
			//IL_005f: 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)
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("PvP Arenas");
			int num = 0;
			foreach (BaseZoneService.Zone zone in Core.PvpArenaService.GetZones())
			{
				StringBuilder stringBuilder2 = stringBuilder;
				StringBuilder.AppendInterpolatedStringHandler handler = new StringBuilder.AppendInterpolatedStringHandler(36, 5, stringBuilder2);
				handler.AppendFormatted(zone.Name);
				handler.AppendLiteral(" - Location: (");
				handler.AppendFormatted(zone.Location.x);
				handler.AppendLiteral(", ");
				handler.AppendFormatted(zone.Location.y);
				handler.AppendLiteral(") Radius: ");
				handler.AppendFormatted(zone.Radius);
				handler.AppendLiteral(" Enabled: ");
				handler.AppendFormatted(zone.Enabled);
				stringBuilder2.AppendLine(ref handler);
				num++;
				if (num % 7 == 0)
				{
					ctx.Reply(stringBuilder.ToString());
					stringBuilder.Clear();
				}
			}
			if (stringBuilder.Length > 0)
			{
				ctx.Reply(stringBuilder.ToString());
			}
		}

		[Command("center", null, null, "Changes the center of a PvP arena", null, true)]
		public static void ChangePvPArenaCenter(ChatCommandContext ctx, string name)
		{
			//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_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			Translation val = ctx.Event.SenderCharacterEntity.Read<Translation>();
			float2 xz = ((float3)(ref val.Value)).xz;
			if (Core.PvpArenaService.ChangeZoneCenter(name, xz))
			{
				ctx.Reply($"PvP arena '{name}' center changed to ({xz.x}, {xz.y})");
			}
			else
			{
				ctx.Reply("PvP arena '" + name + "' not found");
			}
		}

		[Command("radius", null, null, "Changes the radius of a PvP arena", null, true)]
		public static void ChangePvPArenaRadius(ChatCommandContext ctx, string name, float? radius = null)
		{
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: 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)
			if (radius.HasValue && Core.PvpArenaService.ChangeZoneRadius(name, radius.Value))
			{
				ctx.Reply($"PvP arena '{name}' radius changed to {radius}");
				return;
			}
			PvpArenaService pvpArenaService = Core.PvpArenaService;
			Translation val = ctx.Event.SenderCharacterEntity.Read<Translation>();
			if (pvpArenaService.ChangeZoneRadius(name, ((float3)(ref val.Value)).xz, out var newRadius))
			{
				ctx.Reply($"PvP arena '{name}' radius changed to {newRadius}");
			}
			else
			{
				ctx.Reply("PvP arena '" + name + "' not found");
			}
		}

		[Command("enable", null, null, "Enables a PvP arena", null, true)]
		public static void EnablePvPArena(ChatCommandContext ctx, string name)
		{
			if (Core.PvpArenaService.EnableZone(name))
			{
				ctx.Reply("PvP arena '" + name + "' enabled");
			}
			else
			{
				ctx.Reply("PvP arena '" + name + "' not found");
			}
		}

		[Command("disable", null, null, "Disables a PvP arena", null, true)]
		public static void DisablePvPArena(ChatCommandContext ctx, string name)
		{
			if (Core.PvpArenaService.DisableZone(name))
			{
				ctx.Reply("PvP arena '" + name + "' disabled");
			}
			else
			{
				ctx.Reply("PvP arena '" + name + "' not found");
			}
		}

		[Command("teleport", "tp", null, "Teleports you to the named PvP arena", null, true)]
		public static void TeleportToPvPArena(ChatCommandContext ctx, string name)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: 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_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			string nameLower = name.ToLowerInvariant();
			if (!Core.PvpArenaService.GetZones().Any((BaseZoneService.Zone x) => x.Name.ToLowerInvariant() == nameLower))
			{
				ctx.Reply("No PvP arena found matching '" + name + "'");
				return;
			}
			float2 location = Core.PvpArenaService.GetZones().First((BaseZoneService.Zone x) => x.Name.ToLowerInvariant() == nameLower).Location;
			EntityManager entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).GetComponentData<Translation>(ctx.Event.SenderCharacterEntity);
			entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).SetComponentData<LastTranslation>(ctx.Event.SenderCharacterEntity, new LastTranslation
			{
				Value = new float3(location.x, 0f, location.y)
			});
			entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).SetComponentData<Translation>(ctx.Event.SenderCharacterEntity, new Translation
			{
				Value = new float3(location.x, 0f, location.y)
			});
			ctx.Reply("Teleported to PvP arena");
		}
	}
	internal static class Core
	{
		private static bool _hasInitialized = false;

		public static World Server { get; } = GetWorld("Server") ?? throw new Exception("There is no Server world (yet). Did you install a server mod on the client?");


		public static EntityManager EntityManager { get; } = Server.EntityManager;


		public static ServerGameSettingsSystem ServerGameSettingsSystem { get; private set; }

		public static ManualLogSource Log { get; } = Plugin.PluginLog;


		public static PvpService PvpService { get; internal set; }

		public static PvpArenaService PvpArenaService { get; internal set; }

		public static ElysiumService ElysiumService { get; internal set; }

		public static bool HasInitialized => _hasInitialized;

		public static void LogException(Exception e, [CallerMemberName] string caller = null)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			ManualLogSource log = Log;
			bool flag = default(bool);
			BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(51, 5, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Failure in ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(caller);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("\nMessage: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(e.Message);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" Inner:");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(e.InnerException?.Message);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("\n\nStack: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(e.StackTrace);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("\nInner Stack: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(e.InnerException?.StackTrace);
			}
			log.LogError(val);
		}

		internal static void InitializeAfterLoaded()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			if (!_hasInitialized)
			{
				ServerGameSettingsSystem = Server.GetExistingSystem<ServerGameSettingsSystem>();
				PvpService = new PvpService();
				PvpArenaService = new PvpArenaService();
				ElysiumService = new ElysiumService();
				_hasInitialized = true;
				ManualLogSource log = Log;
				bool flag = default(bool);
				BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(10, 1, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("InitializeAfterLoaded");
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" completed");
				}
				log.LogInfo(val);
			}
		}

		private static World GetWorld(string name)
		{
			Enumerator<World> enumerator = World.s_AllWorlds.GetEnumerator();
			while (enumerator.MoveNext())
			{
				World current = enumerator.Current;
				if (current.Name == name)
				{
					return current;
				}
			}
			return null;
		}
	}
	public class Float2Converter : JsonConverter<float2>
	{
		public override float2 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (reader.TokenType != JsonTokenType.StartArray)
			{
				throw new JsonException();
			}
			reader.Read();
			float single = reader.GetSingle();
			reader.Read();
			float single2 = reader.GetSingle();
			reader.Read();
			return new float2(single, single2);
		}

		public override void Write(Utf8JsonWriter writer, float2 value, JsonSerializerOptions options)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			writer.WriteStartArray();
			writer.WriteNumberValue(value.x);
			writer.WriteNumberValue(value.y);
			writer.WriteEndArray();
		}
	}
	public static class ECSExtensions
	{
		public unsafe static void Write<T>(this Entity entity, T componentData) where T : struct
		{
			//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_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			byte[] array = StructureToByteArray(componentData);
			int num = Marshal.SizeOf<T>();
			fixed (byte* ptr = array)
			{
				EntityManager entityManager = Core.EntityManager;
				((EntityManager)(ref entityManager)).SetComponentDataRaw(entity, val.TypeIndex, (void*)ptr, num);
			}
		}

		public static byte[] StructureToByteArray<T>(T structure) where T : struct
		{
			int num = Marshal.SizeOf(structure);
			byte[] array = new byte[num];
			IntPtr intPtr = Marshal.AllocHGlobal(num);
			Marshal.StructureToPtr(structure, intPtr, fDeleteOld: true);
			Marshal.Copy(intPtr, array, 0, num);
			Marshal.FreeHGlobal(intPtr);
			return array;
		}

		public unsafe static T Read<T>(this Entity entity) where T : struct
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			return Marshal.PtrToStructure<T>(new IntPtr(((EntityManager)(ref entityManager)).GetComponentDataRawRO(entity, val.TypeIndex)));
		}

		public static bool Has<T>(this Entity entity)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			return ((EntityManager)(ref entityManager)).HasComponent(entity, val);
		}

		public static string LookupName(this PrefabGUID prefabGuid)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			PrefabCollectionSystem existingSystem = VWorld.Server.GetExistingSystem<PrefabCollectionSystem>();
			object obj;
			if (!((PrefabCollectionSystem_Base)existingSystem).PrefabGuidToNameDictionary.ContainsKey(prefabGuid))
			{
				obj = "GUID Not Found";
			}
			else
			{
				string text = ((PrefabCollectionSystem_Base)existingSystem).PrefabGuidToNameDictionary[prefabGuid];
				PrefabGUID val = prefabGuid;
				obj = text + " " + ((object)(PrefabGUID)(ref val)).ToString();
			}
			return obj.ToString();
		}

		public static void Add<T>(this Entity entity)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).AddComponent(entity, val);
		}

		public static void Remove<T>(this Entity entity)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).RemoveComponent(entity, val);
		}
	}
	internal class Helper
	{
		public static NativeArray<Entity> GetEntitiesByComponentTypes<T1, T2>(bool includeAll = false, bool includeDisabled = false, bool includeSpawn = false, bool includePrefab = false, bool includeDestroyed = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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)
			//IL_0017: 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_001d: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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)
			EntityQueryOptions val = (EntityQueryOptions)0;
			if (includeAll)
			{
				val = (EntityQueryOptions)(val | 0x1B);
			}
			if (includeDisabled)
			{
				val = (EntityQueryOptions)(val | 2);
			}
			if (includeSpawn)
			{
				val = (EntityQueryOptions)(val | 8);
			}
			if (includePrefab)
			{
				val = (EntityQueryOptions)(val | 1);
			}
			if (includeDestroyed)
			{
				val = (EntityQueryOptions)(val | 0x10);
			}
			EntityQueryDesc val2 = new EntityQueryDesc();
			val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[2]
			{
				new ComponentType(Il2CppType.Of<T1>(), (AccessMode)0),
				new ComponentType(Il2CppType.Of<T2>(), (AccessMode)0)
			});
			val2.Options = val;
			EntityQueryDesc val3 = val2;
			EntityManager entityManager = Core.EntityManager;
			EntityQuery val4 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)new EntityQueryDesc[1] { val3 });
			return ((EntityQuery)(ref val4)).ToEntityArray((Allocator)2);
		}

		public static NativeArray<Entity> GetEntitiesByComponentType<T1>(bool includeAll = false, bool includeDisabled = false, bool includeSpawn = false, bool includePrefab = false, bool includeDestroyed = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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)
			//IL_0017: 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_001d: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//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_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: 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)
			EntityQueryOptions val = (EntityQueryOptions)0;
			if (includeAll)
			{
				val = (EntityQueryOptions)(val | 0x1B);
			}
			if (includeDisabled)
			{
				val = (EntityQueryOptions)(val | 2);
			}
			if (includeSpawn)
			{
				val = (EntityQueryOptions)(val | 8);
			}
			if (includePrefab)
			{
				val = (EntityQueryOptions)(val | 1);
			}
			if (includeDestroyed)
			{
				val = (EntityQueryOptions)(val | 0x10);
			}
			EntityQueryDesc val2 = new EntityQueryDesc();
			val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[1]
			{
				new ComponentType(Il2CppType.Of<T1>(), (AccessMode)0)
			});
			val2.Options = val;
			EntityQueryDesc val3 = val2;
			EntityManager entityManager = Core.EntityManager;
			EntityQuery val4 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)new EntityQueryDesc[1] { val3 });
			return ((EntityQuery)(ref val4)).ToEntityArray((Allocator)2);
		}
	}
	[BepInPlugin("KindredArenas", "KindredArenas", "1.1.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[Reloadable]
	public class Plugin : BasePlugin
	{
		private static Harmony _harmony;

		internal static ManualLogSource PluginLog;

		public static Harmony Harmony => _harmony;

		public static ManualLogSource LogInstance { get; private set; }

		public override void Load()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			PluginLog = ((BasePlugin)this).Log;
			ManualLogSource log = ((BasePlugin)this).Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(27, 2, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("KindredArenas");
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" version ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("1.1.1");
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loaded!");
			}
			log.LogInfo(val);
			_harmony = new Harmony("KindredArenas");
			_harmony.PatchAll(Assembly.GetExecutingAssembly());
			CommandRegistry.RegisterAll();
		}

		public override bool Unload()
		{
			CommandRegistry.UnregisterAssembly();
			Harmony harmony = _harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
			return true;
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "KindredArenas";

		public const string PLUGIN_NAME = "KindredArenas";

		public const string PLUGIN_VERSION = "1.1.1";
	}
}
namespace KindredArenas.Services
{
	internal abstract class BaseZoneService
	{
		public struct Zone
		{
			public string Name { get; set; }

			public float2 Location { get; set; }

			public float Radius { get; set; }

			public bool Enabled { get; set; }
		}

		protected static readonly string CONFIG_PATH = Path.Combine(Paths.ConfigPath, "KindredArenas");

		private readonly List<Zone> zones;

		protected abstract string ZONES_PATH { get; }

		protected abstract string ZONE_SERVICE_NAME { get; }

		public BaseZoneService()
		{
			zones = GetDefaultZones();
			LoadZones();
		}

		protected virtual List<Zone> GetDefaultZones()
		{
			return new List<Zone>();
		}

		public IEnumerable<Zone> GetZones()
		{
			return zones;
		}

		private void LoadZones()
		{
			if (File.Exists(ZONES_PATH))
			{
				string json = File.ReadAllText(ZONES_PATH);
				zones.Clear();
				zones.AddRange(JsonSerializer.Deserialize<Zone[]>(json, new JsonSerializerOptions
				{
					Converters = { (JsonConverter)new Float2Converter() }
				}));
			}
			else
			{
				SaveZones();
			}
		}

		private void SaveZones()
		{
			if (!Directory.Exists(CONFIG_PATH))
			{
				Directory.CreateDirectory(CONFIG_PATH);
			}
			JsonSerializerOptions options = new JsonSerializerOptions
			{
				Converters = { (JsonConverter)new Float2Converter() },
				WriteIndented = true
			};
			string contents = JsonSerializer.Serialize(zones, options);
			File.WriteAllText(ZONES_PATH, contents);
		}

		private bool RetrieveZone(string name, out Zone zone, out int zoneIndex)
		{
			name = name.ToLowerInvariant();
			zone = zones.Find((Zone z) => z.Name.ToLowerInvariant() == name);
			zoneIndex = zones.IndexOf(zone);
			return zoneIndex != -1;
		}

		public bool CreateZone(string name, float2 location, float radius)
		{
			//IL_0023: 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_0061: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			if (RetrieveZone(name, out var zone, out var _))
			{
				return false;
			}
			zone = default(Zone);
			zone.Name = name;
			zone.Location = ((float2)(ref location)).xy;
			zone.Radius = radius;
			zone.Enabled = true;
			Zone item = zone;
			zones.Add(item);
			SaveZones();
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(38, 4, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' created at ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float2>(location);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" with a radius of ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float>(radius);
			}
			log.LogInfo(val);
			return true;
		}

		public bool RemoveZone(string name)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			string nameLower = name.ToLowerInvariant();
			int num = zones.RemoveAll((Zone z) => z.Name.ToLowerInvariant() == nameLower);
			if (num > 0)
			{
				ManualLogSource log = Core.Log;
				bool flag = default(bool);
				BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(16, 2, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' removed");
				}
				log.LogInfo(val);
			}
			SaveZones();
			return num > 0;
		}

		public bool ChangeZoneCenter(string name, float2 location)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			if (!RetrieveZone(name, out var zone, out var zoneIndex))
			{
				return false;
			}
			zone.Location = location;
			zones[zoneIndex] = zone;
			SaveZones();
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(27, 3, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' center changed to ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float2>(location);
			}
			log.LogInfo(val);
			return true;
		}

		public bool ChangeZoneRadius(string name, float radius)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			if (!RetrieveZone(name, out var zone, out var zoneIndex))
			{
				return false;
			}
			zone.Radius = radius;
			zones[zoneIndex] = zone;
			SaveZones();
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(27, 3, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' radius changed to ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float>(radius);
			}
			log.LogInfo(val);
			return true;
		}

		public bool ChangeZoneRadius(string name, float2 location, out float newRadius)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Expected O, but got Unknown
			if (!RetrieveZone(name, out var zone, out var zoneIndex))
			{
				newRadius = 0f;
				return false;
			}
			zone.Radius = Vector2.Distance(float2.op_Implicit(location), float2.op_Implicit(zone.Location));
			zones[zoneIndex] = zone;
			SaveZones();
			newRadius = zone.Radius;
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(27, 3, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' radius changed to ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float>(newRadius);
			}
			log.LogInfo(val);
			return true;
		}

		public bool EnableZone(string name)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			if (!RetrieveZone(name, out var zone, out var zoneIndex))
			{
				return false;
			}
			zone.Enabled = true;
			zones[zoneIndex] = zone;
			SaveZones();
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(16, 2, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' enabled");
			}
			log.LogInfo(val);
			return true;
		}

		public bool DisableZone(string name)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			if (!RetrieveZone(name, out var zone, out var zoneIndex))
			{
				return false;
			}
			zone.Enabled = false;
			zones[zoneIndex] = zone;
			SaveZones();
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(17, 2, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ZONE_SERVICE_NAME);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" zone '");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(name);
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("' disabled");
			}
			log.LogInfo(val);
			return true;
		}

		public bool IsInZone(float2 pos)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			foreach (Zone zone in zones)
			{
				if (zone.Enabled && Vector2.Distance(float2.op_Implicit(zone.Location), float2.op_Implicit(pos)) < zone.Radius)
				{
					return true;
				}
			}
			return false;
		}
	}
	internal class ElysiumService : BaseZoneService
	{
		protected override string ZONES_PATH => Path.Combine(BaseZoneService.CONFIG_PATH, "elysium.json");

		protected override string ZONE_SERVICE_NAME => "ElysiumService";

		public bool PvpElysiumOn { get; private set; }

		public ElysiumService()
		{
			PvpElysiumOn = true;
		}

		public void EnableElysiums()
		{
			PvpElysiumOn = true;
			Core.Log.LogInfo((object)"Elysiums enabled");
		}

		public void DisableElysiums()
		{
			PvpElysiumOn = false;
			Core.Log.LogInfo((object)"Elysiums disabled");
		}
	}
	internal class PrefabService
	{
		private readonly PrefabCollectionSystem collectionSystem;

		public PrefabCollectionSystem CollectionSystem => collectionSystem;

		internal Dictionary<string, (string Name, PrefabGUID Prefab)> AllNameToGuid { get; init; } = new Dictionary<string, (string, PrefabGUID)>();


		internal Dictionary<string, (string Name, PrefabGUID Prefab)> SpawnableNameToGuid { get; init; } = new Dictionary<string, (string, PrefabGUID)>();


		internal PrefabService()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Expected O, but got Unknown
			collectionSystem = Core.Server.GetExistingSystem<PrefabCollectionSystem>();
			Dictionary<string, PrefabGUID> nameToPrefabGuidDictionary = ((PrefabCollectionSystem_Base)collectionSystem).NameToPrefabGuidDictionary;
			ManualLogSource log = Core.Log;
			bool flag = default(bool);
			BepInExDebugLogInterpolatedStringHandler val = new BepInExDebugLogInterpolatedStringHandler(13, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("All prefabs: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(nameToPrefabGuidDictionary.Count);
			}
			log.LogDebug(val);
			Enumerator<string, PrefabGUID> enumerator = nameToPrefabGuidDictionary.GetEnumerator();
			while (enumerator.MoveNext())
			{
				KeyValuePair<string, PrefabGUID> current = enumerator.Current;
				if (!AllNameToGuid.TryAdd(current.Key.ToLowerInvariant(), (current.Key, current.Value)))
				{
					ManualLogSource log2 = Core.Log;
					val = new BepInExDebugLogInterpolatedStringHandler(25, 1, ref flag);
					if (flag)
					{
						((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(current.Key);
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" exist already, skipping.");
					}
					log2.LogDebug(val);
				}
			}
			Dictionary<string, PrefabGUID> spawnableNameToPrefabGuidDictionary = ((PrefabCollectionSystem_Base)collectionSystem).SpawnableNameToPrefabGuidDictionary;
			ManualLogSource log3 = Core.Log;
			val = new BepInExDebugLogInterpolatedStringHandler(19, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Spawnable prefabs: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(spawnableNameToPrefabGuidDictionary.Count);
			}
			log3.LogDebug(val);
			enumerator = spawnableNameToPrefabGuidDictionary.GetEnumerator();
			while (enumerator.MoveNext())
			{
				KeyValuePair<string, PrefabGUID> current2 = enumerator.Current;
				if (!SpawnableNameToGuid.TryAdd(current2.Key.ToLowerInvariant(), (current2.Key, current2.Value)))
				{
					ManualLogSource log4 = Core.Log;
					val = new BepInExDebugLogInterpolatedStringHandler(25, 1, ref flag);
					if (flag)
					{
						((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(current2.Key);
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" exist already, skipping.");
					}
					log4.LogDebug(val);
				}
			}
		}

		internal bool TryGetBuff(string input, out PrefabGUID prefab)
		{
			//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)
			string text = input.ToLowerInvariant();
			(string, PrefabGUID) value;
			bool num = AllNameToGuid.TryGetValue(text, out value) || AllNameToGuid.TryGetValue("buff_" + text, out value) || AllNameToGuid.TryGetValue("equipbuff_" + text, out value);
			prefab = value.Item2;
			if (num)
			{
				return value.Item1.ToLowerInvariant().Contains("buff");
			}
			return false;
		}

		internal bool TryGetItem(string input, out PrefabGUID prefab)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			string text = input.ToLowerInvariant();
			(string, PrefabGUID) value;
			bool result = SpawnableNameToGuid.TryGetValue(text, out value) || SpawnableNameToGuid.TryGetValue("item_" + text, out value);
			prefab = value.Item2;
			return result;
		}
	}
	internal class PvpArenaService : BaseZoneService
	{
		protected override string ZONES_PATH => Path.Combine(BaseZoneService.CONFIG_PATH, "arenas.json");

		protected override string ZONE_SERVICE_NAME => "PvpArenaService";

		public bool PvpArenasOn { get; private set; }

		public PvpArenaService()
		{
			PvpArenasOn = true;
		}

		protected override List<Zone> GetDefaultZones()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			return new List<Zone>(1)
			{
				new Zone
				{
					Name = "Colliseum",
					Location = new float2(-1002.2413f, -514.1175f),
					Radius = 18f,
					Enabled = true
				}
			};
		}

		public void EnablePvpArenas()
		{
			PvpArenasOn = true;
			Core.Log.LogInfo((object)"PvP arenas enabled");
		}

		public void DisablePvpArenas()
		{
			PvpArenasOn = false;
			Core.Log.LogInfo((object)"PvP arenas disabled");
		}
	}
	public enum DaysOfTheWeek
	{
		Sunday = 1,
		Monday = 2,
		Tuesday = 4,
		Wednesday = 8,
		Thursday = 0x10,
		Friday = 0x20,
		Saturday = 0x40
	}
	internal class PvpService
	{
		public struct PvpTime
		{
			public DaysOfTheWeek DaysOfTheWeek { get; set; }

			public int StartHour { get; set; }

			public int StartMinute { get; set; }

			public int EndHour { get; set; }

			public int EndMinute { get; set; }
		}

		protected static readonly string CONFIG_PATH = Path.Combine(Paths.ConfigPath, "KindredArenas");

		protected static readonly string PVP_TIMES_PATH = Path.Combine(CONFIG_PATH, "pvpTimes.json");

		private static readonly Dictionary<DaysOfTheWeek, DaysOfTheWeek> PREVIOUS_DAY = new Dictionary<DaysOfTheWeek, DaysOfTheWeek>
		{
			{
				DaysOfTheWeek.Sunday,
				DaysOfTheWeek.Saturday
			},
			{
				DaysOfTheWeek.Monday,
				DaysOfTheWeek.Sunday
			},
			{
				DaysOfTheWeek.Tuesday,
				DaysOfTheWeek.Monday
			},
			{
				DaysOfTheWeek.Wednesday,
				DaysOfTheWeek.Tuesday
			},
			{
				DaysOfTheWeek.Thursday,
				DaysOfTheWeek.Wednesday
			},
			{
				DaysOfTheWeek.Friday,
				DaysOfTheWeek.Thursday
			},
			{
				DaysOfTheWeek.Saturday,
				DaysOfTheWeek.Friday
			}
		};

		private readonly List<Entity> users = new List<Entity>();

		private readonly List<PvpTime> pvpTimes = new List<PvpTime>();

		private bool isPvpActive;

		private const float ALERT_COOLDOWN = 2.5f;

		private readonly Dictionary<Entity, float> lastAlertedPlayer = new Dictionary<Entity, float>();

		private readonly HashSet<Entity> messagedHasBuffFromZone = new HashSet<Entity>();

		public PvpService()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: 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_0049: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			Enumerator<Entity> enumerator = Helper.GetEntitiesByComponentType<User>().GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity current = enumerator.Current;
				AddUser(current);
			}
			LoadPvpTimes();
		}

		public IEnumerable<PvpTime> GetPvpTimes()
		{
			return pvpTimes;
		}

		private void LoadPvpTimes()
		{
			if (File.Exists(PVP_TIMES_PATH))
			{
				string json = File.ReadAllText(PVP_TIMES_PATH);
				pvpTimes.Clear();
				pvpTimes.AddRange(JsonSerializer.Deserialize<PvpTime[]>(json, new JsonSerializerOptions
				{
					Converters = { (JsonConverter)new DaysOfTheWeekConverter() }
				}));
			}
			else
			{
				SavePvpTimes();
			}
		}

		private void SavePvpTimes()
		{
			if (!Directory.Exists(CONFIG_PATH))
			{
				Directory.CreateDirectory(CONFIG_PATH);
			}
			JsonSerializerOptions options = new JsonSerializerOptions
			{
				Converters = { (JsonConverter)new DaysOfTheWeekConverter() },
				WriteIndented = true
			};
			string contents = JsonSerializer.Serialize(pvpTimes, options);
			File.WriteAllText(PVP_TIMES_PATH, contents);
		}

		public void AddPvpTime(PvpTime pvpTime)
		{
			pvpTimes.Add(pvpTime);
			pvpTimes.Sort(delegate(PvpTime a, PvpTime b)
			{
				DaysOfTheWeek daysOfTheWeek2 = FirstDay(a.DaysOfTheWeek);
				DaysOfTheWeek daysOfTheWeek3 = FirstDay(b.DaysOfTheWeek);
				if (daysOfTheWeek2 != daysOfTheWeek3)
				{
					return daysOfTheWeek2.CompareTo(daysOfTheWeek3);
				}
				return (a.StartHour != b.StartHour) ? a.StartHour.CompareTo(b.StartHour) : a.StartMinute.CompareTo(b.StartMinute);
			});
			SavePvpTimes();
			static DaysOfTheWeek FirstDay(DaysOfTheWeek days)
			{
				for (int i = 0; i < 7; i++)
				{
					DaysOfTheWeek daysOfTheWeek = (DaysOfTheWeek)(1 << i);
					if (days.HasFlag(daysOfTheWeek))
					{
						return daysOfTheWeek;
					}
				}
				return (DaysOfTheWeek)0;
			}
		}

		public bool RemovePvpTime(int pvpTimeIndex)
		{
			if (pvpTimeIndex < 0 || pvpTimeIndex >= pvpTimes.Count)
			{
				return false;
			}
			pvpTimes.RemoveAt(pvpTimeIndex);
			SavePvpTimes();
			return true;
		}

		public void AddUser(Entity userEntity)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (!users.Contains(userEntity))
			{
				users.Add(userEntity);
			}
		}

		public bool IsPvpActive()
		{
			DateTime now = DateTime.Now;
			foreach (PvpTime pvpTime in pvpTimes)
			{
				if (IsPvpActiveDuringTime(pvpTime, now))
				{
					return true;
				}
			}
			return false;
		}

		public static bool IsPvpActiveDuringTime(PvpTime pvpTime, DateTime timeToCheck)
		{
			DaysOfTheWeek daysOfTheWeek = (DaysOfTheWeek)(1 << (int)timeToCheck.DayOfWeek);
			bool flag = pvpTime.DaysOfTheWeek.HasFlag(daysOfTheWeek);
			bool flag2 = pvpTime.DaysOfTheWeek.HasFlag(PREVIOUS_DAY[daysOfTheWeek]);
			if (!flag && !flag2)
			{
				return false;
			}
			DateTime dateTime = new DateTime(timeToCheck.Year, timeToCheck.Month, timeToCheck.Day, pvpTime.StartHour, pvpTime.StartMinute, 0);
			DateTime dateTime2 = new DateTime(timeToCheck.Year, timeToCheck.Month, timeToCheck.Day, pvpTime.EndHour, pvpTime.EndMinute, 0);
			bool flag3 = dateTime2 <= dateTime;
			if (flag3)
			{
				if (flag)
				{
					dateTime2 = dateTime2.AddDays(1.0);
				}
				else if (flag2)
				{
					dateTime = dateTime.AddDays(-1.0);
				}
			}
			if (timeToCheck >= dateTime && timeToCheck <= dateTime2)
			{
				return true;
			}
			if (flag3 && flag && flag2)
			{
				dateTime = dateTime.AddDays(-1.0);
				dateTime2 = dateTime2.AddDays(-1.0);
				if (timeToCheck >= dateTime && timeToCheck <= dateTime2)
				{
					return true;
				}
			}
			return false;
		}

		public void Update()
		{
			UpdatePvpStatuses();
		}

		private void UpdatePvpStatuses()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: 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_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_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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0340: 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)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Unknown result type (might be due to invalid IL or missing references)
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0353: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: 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_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: 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_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: 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_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0301: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			foreach (Entity user in users)
			{
				User val = user.Read<User>();
				Entity entityOnServer = ((NetworkedEntity)(ref val.LocalCharacter)).GetEntityOnServer();
				if (entityOnServer == Entity.Null)
				{
					continue;
				}
				if (IsPvpActive() != isPvpActive)
				{
					messagedHasBuffFromZone.Clear();
					isPvpActive = !isPvpActive;
					string text = "Vampire PvP is now " + (isPvpActive ? "active" : "inactive");
					ServerChatUtils.SendSystemMessageToAllClients(Core.EntityManager, text);
					Core.Log.LogInfo((object)text);
				}
				if (isPvpActive)
				{
					PlayerCharacter val2 = entityOnServer.Read<PlayerCharacter>();
					float3 value = entityOnServer.Read<Translation>().Value;
					if (Core.ElysiumService.PvpElysiumOn && Core.ElysiumService.IsInZone(((float3)(ref value)).xz))
					{
						if (!messagedHasBuffFromZone.Contains(entityOnServer) && (!lastAlertedPlayer.TryGetValue(entityOnServer, out var value2) || Time.time - value2 > 2.5f))
						{
							messagedHasBuffFromZone.Add(entityOnServer);
							lastAlertedPlayer[entityOnServer] = Time.time;
							User val3 = entityOnServer.Read<PlayerCharacter>().UserEntity.Read<User>();
							ServerChatUtils.SendSystemMessageToClient(Core.EntityManager, val3, "You have entered an Elysium and are safe from PvP combat");
						}
						Buffs.AddBuff(val2.UserEntity, entityOnServer, Prefabs.Buff_General_PvPProtected, dontExpire: true);
					}
					else if (Buffs.GetBuffDuration(entityOnServer, Prefabs.Buff_General_PvPProtected) < 0f)
					{
						if (messagedHasBuffFromZone.Contains(entityOnServer) && (!lastAlertedPlayer.TryGetValue(entityOnServer, out var value3) || Time.time - value3 > 2.5f))
						{
							messagedHasBuffFromZone.Remove(entityOnServer);
							lastAlertedPlayer[entityOnServer] = Time.time;
							User val4 = entityOnServer.Read<PlayerCharacter>().UserEntity.Read<User>();
							ServerChatUtils.SendSystemMessageToClient(Core.EntityManager, val4, "You have left an Elysium and can engage in PvP combat");
						}
						Buffs.RemoveBuff(entityOnServer, Prefabs.Buff_General_PvPProtected);
					}
				}
				else if (Core.PvpArenaService.PvpArenasOn)
				{
					PlayerCharacter val5 = entityOnServer.Read<PlayerCharacter>();
					float3 value4 = entityOnServer.Read<Translation>().Value;
					if (Core.PvpArenaService.IsInZone(((float3)(ref value4)).xz))
					{
						if (messagedHasBuffFromZone.Contains(entityOnServer) && (!lastAlertedPlayer.TryGetValue(entityOnServer, out var value5) || Time.time - value5 > 2.5f))
						{
							messagedHasBuffFromZone.Remove(entityOnServer);
							lastAlertedPlayer[entityOnServer] = Time.time;
							User val6 = entityOnServer.Read<PlayerCharacter>().UserEntity.Read<User>();
							ServerChatUtils.SendSystemMessageToClient(Core.EntityManager, val6, "You have entered an Arena and can engage in PvP combat");
						}
						Buffs.RemoveBuff(entityOnServer, Prefabs.Buff_General_PvPProtected);
					}
					else if (!Buffs.HasBuff(entityOnServer, Prefabs.Buff_General_PvPProtected))
					{
						if (!messagedHasBuffFromZone.Contains(entityOnServer) && (!lastAlertedPlayer.TryGetValue(entityOnServer, out var value6) || Time.time - value6 > 2.5f))
						{
							lastAlertedPlayer[entityOnServer] = Time.time;
							User val7 = entityOnServer.Read<PlayerCharacter>().UserEntity.Read<User>();
							ServerChatUtils.SendSystemMessageToClient(Core.EntityManager, val7, "You have left an Arena and are safe from PvP combat");
						}
						messagedHasBuffFromZone.Add(entityOnServer);
						Buffs.AddBuff(val5.UserEntity, entityOnServer, Prefabs.Buff_General_PvPProtected, dontExpire: true);
					}
				}
				else if (!Buffs.HasBuff(entityOnServer, Prefabs.Buff_General_PvPProtected))
				{
					Buffs.AddBuff(entityOnServer.Read<PlayerCharacter>().UserEntity, entityOnServer, Prefabs.Buff_General_PvPProtected, dontExpire: true);
				}
			}
		}
	}
	internal class DaysOfTheWeekConverter : JsonConverter<DaysOfTheWeek>
	{
		public override DaysOfTheWeek Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
		{
			if (reader.TokenType != JsonTokenType.StartArray)
			{
				throw new JsonException();
			}
			reader.Read();
			DaysOfTheWeek daysOfTheWeek = (DaysOfTheWeek)0;
			while (reader.TokenType != JsonTokenType.EndArray)
			{
				if (reader.TokenType != JsonTokenType.String)
				{
					throw new JsonException();
				}
				DaysOfTheWeek daysOfTheWeek2 = daysOfTheWeek;
				daysOfTheWeek = daysOfTheWeek2 | (reader.GetString() switch
				{
					"Sunday" => DaysOfTheWeek.Sunday, 
					"Monday" => DaysOfTheWeek.Monday, 
					"Tuesday" => DaysOfTheWeek.Tuesday, 
					"Wednesday" => DaysOfTheWeek.Wednesday, 
					"Thursday" => DaysOfTheWeek.Thursday, 
					"Friday" => DaysOfTheWeek.Friday, 
					"Saturday" => DaysOfTheWeek.Saturday, 
					_ => throw new JsonException(), 
				});
				reader.Read();
			}
			return daysOfTheWeek;
		}

		public override void Write(Utf8JsonWriter writer, DaysOfTheWeek value, JsonSerializerOptions options)
		{
			writer.WriteStartArray();
			if (value.HasFlag(DaysOfTheWeek.Sunday))
			{
				writer.WriteStringValue("Sunday");
			}
			if (value.HasFlag(DaysOfTheWeek.Monday))
			{
				writer.WriteStringValue("Monday");
			}
			if (value.HasFlag(DaysOfTheWeek.Tuesday))
			{
				writer.WriteStringValue("Tuesday");
			}
			if (value.HasFlag(DaysOfTheWeek.Wednesday))
			{
				writer.WriteStringValue("Wednesday");
			}
			if (value.HasFlag(DaysOfTheWeek.Thursday))
			{
				writer.WriteStringValue("Thursday");
			}
			if (value.HasFlag(DaysOfTheWeek.Friday))
			{
				writer.WriteStringValue("Friday");
			}
			if (value.HasFlag(DaysOfTheWeek.Saturday))
			{
				writer.WriteStringValue("Saturday");
			}
			writer.WriteEndArray();
		}
	}
}
namespace KindredArenas.Patches
{
	[HarmonyPatch(typeof(ServerBootstrapSystem), "OnUserConnected")]
	public static class OnUserConnected_Patch
	{
		public static void Postfix(ServerBootstrapSystem __instance, NetConnectionId netConnectionId)
		{
			//IL_0019: 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_0020: 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_0028: 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_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				int num = __instance._NetEndPointToApprovedUserIndex[netConnectionId];
				Entity userEntity = ((Il2CppArrayBase<ServerClient>)(object)__instance._ApprovedUsersLookup)[num].UserEntity;
				EntityManager entityManager = ((ComponentSystemBase)__instance).EntityManager;
				User componentData = ((EntityManager)(ref entityManager)).GetComponentData<User>(userEntity);
				if (((FixedString64)(ref componentData.CharacterName)).IsEmpty)
				{
					if (!PvpUpdater.Initialized)
					{
						Core.InitializeAfterLoaded();
						PvpUpdater.Initialized = true;
					}
					Core.PvpService.AddUser(userEntity);
				}
			}
			catch (Exception ex)
			{
				ManualLogSource log = Core.Log;
				bool flag = default(bool);
				BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(51, 5, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Failure in ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("OnUserConnected");
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("\nMessage: ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" Inner:");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.InnerException?.Message);
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("\n\nStack: ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.StackTrace);
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("\nInner Stack: ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.InnerException?.StackTrace);
				}
				log.LogError(val);
			}
		}
	}
	[HarmonyPatch(typeof(PlaceTileModelSystem), "OnUpdate")]
	public static class PvpUpdater
	{
		public static bool Initialized;

		[HarmonyPostfix]
		public static void Update()
		{
			if (Initialized)
			{
				Core.PvpService.Update();
			}
		}
	}
	[HarmonyPatch(typeof(SpawnTeamSystem_OnPersistenceLoad), "OnUpdate")]
	public static class InitializationPatch
	{
		[HarmonyPostfix]
		public static void OneShot_AfterLoad_InitializationPatch()
		{
			Core.InitializeAfterLoaded();
			PvpUpdater.Initialized = true;
			Plugin.Harmony.Unpatch((MethodBase)typeof(SpawnTeamSystem_OnPersistenceLoad).GetMethod("OnUpdate"), typeof(InitializationPatch).GetMethod("OneShot_AfterLoad_InitializationPatch"));
		}
	}
}
namespace KindredArenas.Data
{
	public static class Prefabs
	{
		public static readonly PrefabGUID Chain_BossBarrel = new PrefabGUID(-601059406);

		public static readonly PrefabGUID BP_Castle_Chain_Base = new PrefabGUID(-1188781940);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_BloodRose = new PrefabGUID(-591319789);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_Base = new PrefabGUID(-488499219);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_Cotton = new PrefabGUID(1171326100);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_FireBlossom = new PrefabGUID(1141816596);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_GhostShroom = new PrefabGUID(-947749857);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_Grapes = new PrefabGUID(-486047789);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_HellsClarion = new PrefabGUID(-1946047422);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_Lotus = new PrefabGUID(1230409568);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_MourningLily = new PrefabGUID(-1057579736);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_SnowFlower = new PrefabGUID(-1475317620);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_Sunflower = new PrefabGUID(1659865297);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_Thistle = new PrefabGUID(-437194426);

		public static readonly PrefabGUID BP_Castle_Chain_Plant_TrippyShroom = new PrefabGUID(1228922848);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_AppleCursed_01 = new PrefabGUID(-315187808);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_AppleTree_01 = new PrefabGUID(-1362642773);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_Aspen_01 = new PrefabGUID(-683262945);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_AspenAutum_01 = new PrefabGUID(1072528933);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_Birch_01 = new PrefabGUID(-355620152);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_BirchAutum_01 = new PrefabGUID(500254158);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_Base = new PrefabGUID(386821666);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_CherryBlossom_01 = new PrefabGUID(1646702119);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_CherryBlossomWhite_01 = new PrefabGUID(148077443);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_Cypress_01 = new PrefabGUID(308236778);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_GloomTree_01 = new PrefabGUID(-1523660086);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_Oak_01 = new PrefabGUID(75711340);

		public static readonly PrefabGUID BP_Castle_Chain_Tree_Spruce_01 = new PrefabGUID(1218240817);

		public static readonly PrefabGUID Chain_CastleRuins_Entrance_Standard01 = new PrefabGUID(382626606);

		public static readonly PrefabGUID Chain_CastleRuins_Entrance_Standard02 = new PrefabGUID(1222030386);

		public static readonly PrefabGUID Chain_CastleRuins_Entrance_Standard03 = new PrefabGUID(632013137);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Broken01 = new PrefabGUID(776819940);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Broken02 = new PrefabGUID(-422762123);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Broken03 = new PrefabGUID(-1932973691);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Broken04 = new PrefabGUID(765324751);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Standard01 = new PrefabGUID(1808834603);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Standard02 = new PrefabGUID(502397696);

		public static readonly PrefabGUID Chain_CastleRuins_Pillar_Standard03 = new PrefabGUID(1232631258);

		public static readonly PrefabGUID Chain_CastleRuins_Wall_Standard01 = new PrefabGUID(15649162);

		public static readonly PrefabGUID Chain_CastleRuins_Wall_Standard02 = new PrefabGUID(-1398101744);

		public static readonly PrefabGUID Chain_CastleRuins_Wall_Standard03 = new PrefabGUID(-407024883);

		public static readonly PrefabGUID Chain_CastleRuins_Wall_Standard04 = new PrefabGUID(-1910764055);

		public static readonly PrefabGUID Chain_CastleRuins_Wall_Standard05 = new PrefabGUID(-1654610763);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance01 = new PrefabGUID(-178059685);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance02 = new PrefabGUID(-700510500);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar01 = new PrefabGUID(-1515843832);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar02 = new PrefabGUID(-1576246794);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar03 = new PrefabGUID(-526328612);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar04 = new PrefabGUID(1046632459);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall01 = new PrefabGUID(-1610571017);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall02 = new PrefabGUID(3101564);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall01 = new PrefabGUID(1503980136);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall02 = new PrefabGUID(659193290);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall03 = new PrefabGUID(-2058022659);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall04 = new PrefabGUID(838220759);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall05 = new PrefabGUID(302708752);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart01 = new PrefabGUID(540307022);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart02 = new PrefabGUID(-1742110863);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance01_GloomRot_North = new PrefabGUID(-1869330413);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance02_GloomRot_North = new PrefabGUID(-1947907654);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar01_GloomRot_North = new PrefabGUID(-344719048);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar02_GloomRot_North = new PrefabGUID(1467965232);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar03_GloomRot_North = new PrefabGUID(-13602111);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar04_GloomRot_North = new PrefabGUID(664374074);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall01_GloomRot_North = new PrefabGUID(-395361058);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall02_GloomRot_North = new PrefabGUID(-1440350698);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall01_GloomRot_North = new PrefabGUID(-1984609970);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall02_GloomRot_North = new PrefabGUID(1220167562);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall03_GloomRot_North = new PrefabGUID(1182462480);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall04_GloomRot_North = new PrefabGUID(1799225021);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall05_GloomRot_North = new PrefabGUID(1724099902);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart01_GloomRot_North = new PrefabGUID(1635530604);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart02_GloomRot_North = new PrefabGUID(-21773376);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance01_GloomRot_South = new PrefabGUID(-1605136899);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance02_GloomRot_South = new PrefabGUID(954596691);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar01_GloomRot_South = new PrefabGUID(775917281);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar02_GloomRot_South = new PrefabGUID(-1641821361);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar03_GloomRot_South = new PrefabGUID(1077646194);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar04_GloomRot_South = new PrefabGUID(-821194340);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall01_GloomRot_South = new PrefabGUID(1837482248);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall02_GloomRot_South = new PrefabGUID(660971563);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall01_GloomRot_South = new PrefabGUID(-1901274261);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall02_GloomRot_South = new PrefabGUID(-846936078);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall03_GloomRot_South = new PrefabGUID(348988213);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall04_GloomRot_South = new PrefabGUID(1867603057);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall05_GloomRot_South = new PrefabGUID(2068801022);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart01_GloomRot_South = new PrefabGUID(1366077311);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart02_GloomRot_South = new PrefabGUID(873849921);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance01_Cursed = new PrefabGUID(-450312644);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance02_Cursed = new PrefabGUID(1679171249);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar01_Cursed = new PrefabGUID(2124930860);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar02_Cursed = new PrefabGUID(505322791);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar03_Cursed = new PrefabGUID(-789237539);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar04_Cursed = new PrefabGUID(-94732411);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall01_Cursed = new PrefabGUID(1770297174);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall02_Cursed = new PrefabGUID(348587490);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall01_Cursed = new PrefabGUID(-1801598924);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall02_Cursed = new PrefabGUID(-94338890);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall03_Cursed = new PrefabGUID(-1227431611);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall04_Cursed = new PrefabGUID(-148941507);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall05_Cursed = new PrefabGUID(1702151888);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart01_Cursed = new PrefabGUID(113662653);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart02_Cursed = new PrefabGUID(-604467640);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance01_SilverLight = new PrefabGUID(2061675889);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance02_SilverLight = new PrefabGUID(360179082);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar01_SilverLight = new PrefabGUID(407029715);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar02_SilverLight = new PrefabGUID(806421757);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar03_SilverLight = new PrefabGUID(-289865711);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar04_SilverLight = new PrefabGUID(770506718);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall01_SilverLight = new PrefabGUID(-1169051388);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall02_SilverLight = new PrefabGUID(35974818);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall01_SilverLight = new PrefabGUID(-1829107339);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall02_SilverLight = new PrefabGUID(-413205513);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall03_SilverLight = new PrefabGUID(-2121019848);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall04_SilverLight = new PrefabGUID(-1927681802);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall05_SilverLight = new PrefabGUID(-615531872);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart01_SilverHills = new PrefabGUID(219002118);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart02_SilverHills = new PrefabGUID(56852538);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance01_Snow = new PrefabGUID(-1700576470);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Entrance02_Snow = new PrefabGUID(-880663447);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar01_Snow = new PrefabGUID(-1622127460);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar02_Snow = new PrefabGUID(2092613525);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar03_Snow = new PrefabGUID(2115145273);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Pillar04_Snow = new PrefabGUID(-1747527633);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall01_Snow = new PrefabGUID(-1083565582);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_ShortWall02_Snow = new PrefabGUID(-546688167);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall01_Snow = new PrefabGUID(-1849560456);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall02_Snow = new PrefabGUID(1560401529);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall03_Snow = new PrefabGUID(-930874983);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall04_Snow = new PrefabGUID(-867577145);

		public static readonly PrefabGUID Chain_VampirePlayerRuins_Wall05_Snow = new PrefabGUID(154866664);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart01_Snow = new PrefabGUID(-881915068);

		public static readonly PrefabGUID Chain_VampireRemnantProps_CastleHeart02_Snow = new PrefabGUID(1769346996);

		public static readonly PrefabGUID Chain_Catacomb_Brazier01 = new PrefabGUID(-236398713);

		public static readonly PrefabGUID Chain_Church_Fence_01 = new PrefabGUID(-52762278);

		public static readonly PrefabGUID Chain_Church_Fence_02 = new PrefabGUID(-753913317);

		public static readonly PrefabGUID Chain_Church_Fence_03 = new PrefabGUID(2122259209);

		public static readonly PrefabGUID Chain_Door_FineIronFenceGate_01 = new PrefabGUID(-199874841);

		public static readonly PrefabGUID Chain_Fence_Church_WoodenFence_01 = new PrefabGUID(1638873405);

		public static readonly PrefabGUID Chain_FencePole_Church_WoodenFence_01 = new PrefabGUID(2107332906);

		public static readonly PrefabGUID Chain_FineTombBig_01 = new PrefabGUID(683820962);

		public static readonly PrefabGUID Chain_FineTombBig_02 = new PrefabGUID(1078202207);

		public static readonly PrefabGUID Chain_FineTombBig_03 = new PrefabGUID(-196378282);

		public static readonly PrefabGUID Chain_FineTomb_01 = new PrefabGUID(-744554372);

		public static readonly PrefabGUID Chain_FineTomb_02 = new PrefabGUID(1214021842);

		public static readonly PrefabGUID Chain_FineTomb_03 = new PrefabGUID(-1339328617);

		public static readonly PrefabGUID Chain_FineTomb_04 = new PrefabGUID(-992697631);

		public static readonly PrefabGUID Chain_FineTomb_05 = new PrefabGUID(-475943840);

		public static readonly PrefabGUID Chain_FineTomb_06 = new PrefabGUID(-1619272945);

		public static readonly PrefabGUID Chain_FineTomb_07 = new PrefabGUID(1588717774);

		public static readonly PrefabGUID Chain_FineTomb_08 = new PrefabGUID(-959854182);

		public static readonly PrefabGUID Chain_Church_Podium_01 = new PrefabGUID(-1732213950);

		public static readonly PrefabGUID Chain_ChurchBench_01 = new PrefabGUID(1969340824);

		public static readonly PrefabGUID Chain_FineStoneBench_01 = new PrefabGUID(-1461234194);

		public static readonly PrefabGUID Chain_Breakable_CursedForest_AltarLantern_01 = new PrefabGUID(1079979818);

		public static readonly PrefabGUID Chain_Breakable_CursedForest_AltarLantern_02 = new PrefabGUID(-753916626);

		public static readonly PrefabGUID Chain_Breakable_CursedForest_AltarLantern_03 = new PrefabGUID(2063042385);

		public static readonly PrefabGUID Chain_Breakable_CursedForest_AltarStub01 = new PrefabGUID(210304051);

		public static readonly PrefabGUID Chain_Runestone_fading02_Breakable = new PrefabGUID(-791661968);

		public static readonly PrefabGUID Chain_Breakable_ChurchOfTheDamned_Candleholder01 = new PrefabGUID(-851013968);

		public static readonly PrefabGUID Chain_Breakable_ChurchOfTheDamned_Candleholder01_PurpleVar = new PrefabGUID(871433602);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_AltarBreakable01 = new PrefabGUID(-255525678);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_Brazier_SmallBreakable01 = new PrefabGUID(656788019);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_Brazier_SmallBreakable01_PurpleVar = new PrefabGUID(1169809830);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_Brazier_SmallBreakable02 = new PrefabGUID(-980047108);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_Brazier_SmallBreakable03 = new PrefabGUID(21003280);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_DecoPillarBreakable01 = new PrefabGUID(2067871353);

		public static readonly PrefabGUID Chain_ChurchOfTheDamned_DecoPillarBreakable02 = new PrefabGUID(-174194608);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseBed_01 = new PrefabGUID(-782303328);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseChair01 = new PrefabGUID(-1045768484);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseChair02 = new PrefabGUID(-49194869);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseTable_01 = new PrefabGUID(-691238222);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseTable_02 = new PrefabGUID(-811640246);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseTable_03 = new PrefabGUID(-409712031);

		public static readonly PrefabGUID Chain_Breakable_GhostHouseTable_04 = new PrefabGUID(-1520427232);

		public static readonly PrefabGUID Chain_Container_GhostHouse_Drawers_01 = new PrefabGUID(142311341);

		public static readonly PrefabGUID Chain_Container_GhostHouse_Drawers_02 = new PrefabGUID(689099990);

		public static readonly PrefabGUID Chain_Container_GhostHouse_Drawers_03 = new PrefabGUID(1088594853);

		public static readonly PrefabGUID Chain_Container_GhostHouse_Drawers_04 = new PrefabGUID(-2130119230);

		public static readonly PrefabGUID Chain_Witch_FrogTree_01 = new PrefabGUID(-1624784024);

		public static readonly PrefabGUID Chain_Witch_SkullStake_01 = new PrefabGUID(633416023);

		public static readonly PrefabGUID Chain_Witch_SkullStake_02 = new PrefabGUID(-1788338302);

		public static readonly PrefabGUID Chain_Witch_SkullStake_03 = new PrefabGUID(-51539496);

		public static readonly PrefabGUID Chain_Witch_Stake_01 = new PrefabGUID(-1949254602);

		public static readonly PrefabGUID Chain_Witch_Stake_02 = new PrefabGUID(1200659821);

		public static readonly PrefabGUID Chain_Witch_Stake_03 = new PrefabGUID(-1341893090);

		public static readonly PrefabGUID Chain_Witch_Stake_04 = new PrefabGUID(-1806904384);

		public static readonly PrefabGUID Chain_Witch_Stake_04_Candles = new PrefabGUID(425094962);

		public static readonly PrefabGUID Chain_Witch_Stake_05 = new PrefabGUID(-1451403539);

		public static readonly PrefabGUID Chain_Witch_Stake_05_Candles = new PrefabGUID(1152279482);

		public static readonly PrefabGUID Chain_Witch_Stake_06 = new PrefabGUID(-192426060);

		public static readonly PrefabGUID Chain_Witch_Stake_07 = new PrefabGUID(-1054582624);

		public static readonly PrefabGUID Chain_Witch_Stake_08 = new PrefabGUID(1945933109);

		public static readonly PrefabGUID Chain_Witch_Stake_09 = new PrefabGUID(-700802344);

		public static readonly PrefabGUID Chain_Witch_Stake_10 = new PrefabGUID(-1332648735);

		public static readonly PrefabGUID Chain_Witch_Stake_11 = new PrefabGUID(-188743293);

		public static readonly PrefabGUID Chain_Witch_Stake_12 = new PrefabGUID(1425568148);

		public static readonly PrefabGUID Chain_Witch_Stake_13 = new PrefabGUID(2091064964);

		public static readonly PrefabGUID Chain_Debug_EquipmentChest_T01 = new PrefabGUID(862237633);

		public static readonly PrefabGUID Chain_Debug_EquipmentChest_T02 = new PrefabGUID(1090785612);

		public static readonly PrefabGUID Chain_Debug_EquipmentChest_T03 = new PrefabGUID(-1339068604);

		public static readonly PrefabGUID Chain_Debug_EquipmentChest_T04 = new PrefabGUID(502634829);

		public static readonly PrefabGUID Chain_Debug_SpellKitChest_TXX = new PrefabGUID(2060805957);

		public static readonly PrefabGUID Chain_Debug_UserTestChest_T01 = new PrefabGUID(-1235275444);

		public static readonly PrefabGUID Chain_Debug_UserTestChest_T02 = new PrefabGUID(204483749);

		public static readonly PrefabGUID Chain_Debug_UserTestChest_T04 = new PrefabGUID(-1677508299);

		public static readonly PrefabGUID Chain_Debug_UserTestChest_T06 = new PrefabGUID(1060309486);

		public static readonly PrefabGUID Chain_AnimalCage_Snow_01 = new PrefabGUID(-1582280235);

		public static readonly PrefabGUID Chain_AnimalCage_Snow_02 = new PrefabGUID(-2112591787);

		public static readonly PrefabGUID Chain_AnimalCage_Snow_03 = new PrefabGUID(-511204510);

		public static readonly PrefabGUID Chain_AnimalCage_Snow_04 = new PrefabGUID(-1298921460);

		public static readonly PrefabGUID Chain_AnimalCage_Snow_05 = new PrefabGUID(-532060107);

		public static readonly PrefabGUID Chain_AnimalCage_Snow_07 = new PrefabGUID(834787273);

		public static readonly PrefabGUID Chain_Barrel_Snow_01 = new PrefabGUID(1140693569);

		public static readonly PrefabGUID Chain_Barrel_Snow_02 = new PrefabGUID(-1635746829);

		public static readonly PrefabGUID Chain_Barrel_Snow_03 = new PrefabGUID(-969294944);

		public static readonly PrefabGUID Chain_BeerBarrel_Snow_01 = new PrefabGUID(-1416941612);

		public static readonly PrefabGUID Chain_BeerBarrel_Snow_02 = new PrefabGUID(-1621858544);

		public static readonly PrefabGUID Chain_Brazier_Elris_01 = new PrefabGUID(640975460);

		public static readonly PrefabGUID Chain_Breakable_Elris_Bag_01 = new PrefabGUID(497919361);

		public static readonly PrefabGUID Chain_Breakable_Elris_Bag_02 = new PrefabGUID(414148113);

		public static readonly PrefabGUID Chain_Breakable_Elris_Bag_03 = new PrefabGUID(-286643372);

		public static readonly PrefabGUID Chain_Breakable_Elris_Bags_01 = new PrefabGUID(922276667);

		public static readonly PrefabGUID Chain_Breakable_Elris_Bed_01 = new PrefabGUID(1406048089);

		public static readonly PrefabGUID Chain_Breakable_Elris_Bench_01 = new PrefabGUID(-906771171);

		public static readonly PrefabGUID Chain_Breakable_Elris_Fishpole_01 = new PrefabGUID(-1967629273);

		public static readonly PrefabGUID Chain_Breakable_Elris_Fishpole_02 = new PrefabGUID(354001642);

		public static readonly PrefabGUID Chain_Breakable_Elris_Hangingfish_01 = new PrefabGUID(-703531470);

		public static readonly PrefabGUID Chain_Breakable_Elris_Hidebag_01 = new PrefabGUID(-1587815415);

		public static readonly PrefabGUID Chain_Breakable_Elris_Stool_01 = new PrefabGUID(1532651600);

		public static readonly PrefabGUID Chain_Breakable_Elris_Stool_02 = new PrefabGUID(936831037);

		public static readonly PrefabGUID Chain_Breakable_Elris_Table_01 = new PrefabGUID(1025989392);

		public static readonly PrefabGUID Chain_Breakable_Elris_Table_02 = new PrefabGUID(174304727);

		public static readonly PrefabGUID Chain_Breakable_Elris_Table_03 = new PrefabGUID(1649446261);

		public static readonly PrefabGUID Chain_Breakable_Sign_Snow_01 = new PrefabGUID(-61279519);

		public static readonly PrefabGUID Chain_Breakable_Sign_Snow_02 = new PrefabGUID(1847273354);

		public static readonly PrefabGUID Chain_Breakable_Sign_Snow_03 = new PrefabGUID(1635007514);

		public static readonly PrefabGUID Chain_Breakable_Sign_Snow_04 = new PrefabGUID(-1073111350);

		public static readonly PrefabGUID Chain_Breakable_Sign_Snow_05 = new PrefabGUID(-1855997157);

		public static readonly PrefabGUID Chain_Crate_Large_Snow_01 = new PrefabGUID(-1957818680);

		public static readonly PrefabGUID Chain_Crate_Snow_01 = new PrefabGUID(-309421649);

		public static readonly PrefabGUID Chain_Crate_Snow_02 = new PrefabGUID(328231343);

		public static readonly PrefabGUID Chain_Elris_CookingFireplace01 = new PrefabGUID(-38224028);

		public static readonly PrefabGUID Chain_ElrisFlag01 = new PrefabGUID(198402144);

		public static readonly PrefabGUID Chain_ElrisFlag02 = new PrefabGUID(-496501402);

		public static readonly PrefabGUID Chain_ElrisFlag03 = new PrefabGUID(822423359);

		public static readonly PrefabGUID Chain_ElrisMountain_Sled_01 = new PrefabGUID(-814052722);

		public static readonly PrefabGUID Chain_ElrisMountain_Sled_02 = new PrefabGUID(1476919638);

		public static readonly PrefabGUID Chain_ElrisMountain_Sled_03 = new PrefabGUID(1057124060);

		public static readonly PrefabGUID Chain_Fence_Elris_01 = new PrefabGUID(-1434459311);

		public static readonly PrefabGUID Chain_Fence_Elris_02 = new PrefabGUID(1289106850);

		public static readonly PrefabGUID Chain_Fence_Elris_03 = new PrefabGUID(-840562311);

		public static readonly PrefabGUID Chain_Fence_Elris_Diagonal_01 = new PrefabGUID(864753188);

		public static readonly PrefabGUID Chain_Fence_Elris_Diagonal_02 = new PrefabGUID(1643735950);

		public static readonly PrefabGUID Chain_WheelBarrow_Snow_01 = new PrefabGUID(318367013);

		public static readonly PrefabGUID Chain_WheelBarrow_Snow_02 = new PrefabGUID(1987911629);

		public static readonly PrefabGUID Chain_WildlingFlag01 = new PrefabGUID(807567347);

		public static readonly PrefabGUID Chain_WildlingFlag02 = new PrefabGUID(674228687);

		public static readonly PrefabGUID Chain_WildlingFlag03 = new PrefabGUID(-161204247);

		public static readonly PrefabGUID Chain_ForgeMaster_Barrel01 = new PrefabGUID(-764211517);

		public static readonly PrefabGUID Chain_ForgeMaster_Barrel02 = new PrefabGUID(1545687526);

		public static readonly PrefabGUID Chain_ForgeMaster_Weaponrack01 = new PrefabGUID(319620170);

		public static readonly PrefabGUID Chain_GameplayProp_ArmorRack = new PrefabGUID(-1679466087);

		public static readonly PrefabGUID Chain_GameplayProp_CurseWisp = new PrefabGUID(1785914210);

		public static readonly PrefabGUID Chain_GameplayProp_TheMonster_Door = new PrefabGUID(1855941069);

		public static readonly PrefabGUID Chain_GameplayProp_TheMonster_EnergyBeam = new PrefabGUID(1330108515);

		public static readonly PrefabGUID Chain_GameplayProp_TheMonster_Gate = new PrefabGUID(-676465616);

		public static readonly PrefabGUID Chain_GameplayProp_TheMonster_Generator = new PrefabGUID(-1387103544);

		public static readonly PrefabGUID Chain_GameplayProp_WerewolfChieftain_FarmerCage = new PrefabGUID(286443738);

		public static readonly PrefabGUID Chain_GloomRot_Cage01 = new PrefabGUID(1979232218);

		public static readonly PrefabGUID Chain_GloomRot_Cage02 = new PrefabGUID(1879046433);

		public static readonly PrefabGUID Chain_GloomRot_Cage0