Decompiled source of VCreate v1.0.1

VCreate.dll

Decompiled 8 months ago
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
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 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;
using Microsoft.CodeAnalysis;
using ProjectM;
using ProjectM.Behaviours;
using ProjectM.CastleBuilding;
using ProjectM.Gameplay.Clan;
using ProjectM.Network;
using ProjectM.Shared;
using ProjectM.Tiles;
using Stunlock.Core;
using Stunlock.Network;
using Unity;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
using UnityEngine;
using VCreate.Core;
using VCreate.Core.Commands;
using VCreate.Core.Converters;
using VCreate.Core.Services;
using VCreate.Core.Toolbox;
using VCreate.Data;
using VCreate.Hooks;
using VCreate.Systems;
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("VCreate")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+b0d7b875b61caf5b98137753c749d5d0f56bbdc0")]
[assembly: AssemblyProduct("VCreate")]
[assembly: AssemblyTitle("VCreate")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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]
	internal sealed class IsUnmanagedAttribute : Attribute
	{
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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;
		}
	}
}
[HarmonyPatch(typeof(RepairDoubleVBloodSpawnedSystem), "OnUpdate")]
public static class RepairDoubleVBloodSpawnedSystemPatch
{
	public static bool Prefix(RepairDoubleVBloodSpawnedSystem __instance)
	{
		Plugin.Log.LogInfo((object)"RepairDoubleVBloodSpawnedSystem Prefix called...");
		return false;
	}
}
[HarmonyPatch(typeof(BehaviourTreeStateChangedEventSystem), "OnUpdate")]
public static class BehaviourTreeStateChangedEventSystemPatch
{
	public static void Prefix(BehaviourTreeStateChangedEventSystem __instance)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: 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_001b: 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_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: 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_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Invalid comparison between Unknown and I4
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Invalid comparison between Unknown and I4
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: 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_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: 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_00e4: Unknown result type (might be due to invalid IL or missing references)
		EntityQuery _OnUpdate_LambdaJob0_entityQuery = __instance.__OnUpdate_LambdaJob0_entityQuery;
		NativeArray<Entity> val = ((EntityQuery)(ref _OnUpdate_LambdaJob0_entityQuery)).ToEntityArray((Allocator)2);
		for (int i = 0; i < val.Length; i++)
		{
			try
			{
				Entity entity = val[i];
				if (!entity.Read<Follower>().Followed._Value.Has<PlayerCharacter>())
				{
					continue;
				}
				if (Utilities.HasComponent<BehaviourTreeState>(entity) && (int)entity.Read<BehaviourTreeState>().Value == 64)
				{
					BehaviourTreeState componentData = entity.Read<BehaviourTreeState>();
					componentData.Value = (GenericEnemyState)256;
					entity.Write<BehaviourTreeState>(componentData);
				}
				else if (Utilities.HasComponent<BehaviourTreeState>(entity) && (int)entity.Read<BehaviourTreeState>().Value == 256)
				{
					LocalToWorld val2 = entity.Read<LocalToWorld>();
					Vector3 val3 = float3.op_Implicit(((LocalToWorld)(ref val2)).Position);
					val2 = entity.Read<Follower>().Followed._Value.Read<LocalToWorld>();
					float num = Vector3.Distance(val3, float3.op_Implicit(((LocalToWorld)(ref val2)).Position));
					if (num < 5f)
					{
						BehaviourTreeState componentData2 = entity.Read<BehaviourTreeState>();
						componentData2.Value = (GenericEnemyState)2;
						entity.Write<BehaviourTreeState>(componentData2);
					}
				}
				val.Dispose();
			}
			catch (Exception)
			{
				val.Dispose();
			}
		}
	}
}
namespace WorldBuild.Hooks
{
	[HarmonyPatch(typeof(PlaceTileModelSystem), "OnUpdate")]
	public static class CastleHeartPlacementPatch
	{
		private static readonly PrefabGUID CastleHeartPrefabGUID = new PrefabGUID(-485210554);

		public static void Prefix(PlaceTileModelSystem __instance)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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_002c: 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_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: 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_006e: 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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = VWorld.Server.EntityManager;
			EntityQuery val = __instance._BuildTileQuery;
			NativeArray<Entity> val2 = ((EntityQuery)(ref val)).ToEntityArray((Allocator)2);
			Enumerator<Entity> enumerator = val2.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity current = enumerator.Current;
				if (IsCastleHeart(current))
				{
					if (!WorldBuildToggle.WbFlag)
					{
						return;
					}
					CancelCastleHeartPlacement(entityManager, current);
				}
			}
			val2.Dispose();
			val = __instance._AbilityCastFinishedQuery;
			val2 = ((EntityQuery)(ref val)).ToEntityArray((Allocator)2);
			Enumerator<Entity> enumerator2 = val2.GetEnumerator();
			while (enumerator2.MoveNext())
			{
				Entity current2 = enumerator2.Current;
				if (!Utilities.HasComponent<AbilityPreCastFinishedEvent>(current2))
				{
					continue;
				}
				AbilityPreCastFinishedEvent componentData = Utilities.GetComponentData<AbilityPreCastFinishedEvent>(current2);
				Entity abilityGroup = componentData.AbilityGroup;
				PrefabGUID componentData2 = Utilities.GetComponentData<PrefabGUID>(abilityGroup);
				Entity character = componentData.Character;
				if (Utilities.HasComponent<PlayerCharacter>(character))
				{
					PlayerCharacter componentData3 = Utilities.GetComponentData<PlayerCharacter>(character);
					Entity userEntity = componentData3.UserEntity;
					User componentData4 = Utilities.GetComponentData<User>(userEntity);
					if (DataStructures.PlayerSettings.TryGetValue(componentData4.PlatformId, out var _) && ((PrefabGUID)(ref componentData2)).Equals(Prefabs.AB_Interact_Siege_Structure_T02_AbilityGroup))
					{
						Plugin.Log.LogInfo((object)"SiegeT02 ability cast detected...");
						HandleAbilityCast(userEntity);
					}
				}
			}
			val2.Dispose();
		}

		public static void HandleAbilityCast(Entity userEntity)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			User componentData = Utilities.GetComponentData<User>(userEntity);
			if (DataStructures.PlayerSettings.TryGetValue(componentData.PlatformId, out var value) && value.Emotes)
			{
				DecideAction(value)?.Invoke(userEntity, value);
			}
		}

		private static Action<Entity, Omnitool> DecideAction(Omnitool settings)
		{
			Plugin.Log.LogInfo((object)"Deciding action based on mode...");
			if (settings.GetMode("InspectToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.InspectHoveredEntity(userEntity);
				};
			}
			if (settings.GetMode("DestroyToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.DestroyAtHover(userEntity);
				};
			}
			if (settings.GetMode("CopyToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.SpawnCopy(userEntity);
				};
			}
			if (settings.GetMode("DebuffToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.DebuffAtHover(userEntity);
				};
			}
			if (settings.GetMode("ConvertToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.ConvertCharacter(userEntity);
				};
			}
			if (settings.GetMode("BuffToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.BuffAtHover(userEntity);
				};
			}
			if (settings.GetMode("TileToggle"))
			{
				return delegate(Entity userEntity, Omnitool _)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					OnHover.SpawnTileModel(userEntity);
				};
			}
			return null;
		}

		private static bool IsCastleHeart(Entity job)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_000e: 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)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = VWorld.Server.EntityManager;
			BuildTileModelEvent componentData = ((EntityManager)(ref entityManager)).GetComponentData<BuildTileModelEvent>(job);
			return ((PrefabGUID)(ref componentData.PrefabGuid)).Equals(CastleHeartPrefabGUID);
		}

		private static void CancelCastleHeartPlacement(EntityManager entityManager, Entity job)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: 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_000d: 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_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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_002f: Unknown result type (might be due to invalid IL or missing references)
			Entity user = ((EntityManager)(ref entityManager)).GetComponentData<FromCharacter>(job).User;
			User componentData = ((EntityManager)(ref entityManager)).GetComponentData<User>(user);
			StringBuilder stringBuilder = new StringBuilder("Bad vampire, no merlot! (Castle Heart placement is disabled during worldbuild)");
			ServerChatUtils.SendSystemMessageToClient(entityManager, componentData, stringBuilder.ToString());
			SystemPatchUtil.Destroy(job);
		}
	}
	[HarmonyPatch(typeof(PlaceTileModelSystem), "VerifyCanDismantle")]
	public static class VerifyCanDismantlePatch
	{
		public static void Postfix(ref bool __result, EntityManager entityManager, Entity tileModelEntity)
		{
			//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)
			if (__result)
			{
				Plugin.Log.LogInfo((object)"Verifying dismantle event...");
				if (!(__result = TileOperationUtility.CanPerformOperation(entityManager, tileModelEntity)))
				{
					Plugin.Log.LogInfo((object)"Disallowed based on permissions and ownership.");
				}
				else
				{
					Plugin.Log.LogInfo((object)"Allowed if owned or user has permission.");
				}
			}
		}
	}
	[HarmonyPatch(typeof(PlaceTileModelSystem), "VerifyIfCanMoveOrRotateAfterBuilt")]
	public static class VerifyCanMovePatch
	{
		public static void Postfix(ref bool __result, EntityManager entityManager, Entity tileModelEntity)
		{
			//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)
			if (__result)
			{
				Plugin.Log.LogInfo((object)"Verifying move event...");
				if (!(__result = TileOperationUtility.CanPerformOperation(entityManager, tileModelEntity)))
				{
					Plugin.Log.LogInfo((object)"Disallowed based on permissions and ownership.");
				}
				else
				{
					Plugin.Log.LogInfo((object)"Allowed if owned or user has permission.");
				}
			}
		}
	}
	public static class TileOperationUtility
	{
		public static bool CanPerformOperation(EntityManager entityManager, Entity tileModelEntity)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: 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_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_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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_0052: 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)
			UserOwner componentData = Utilities.GetComponentData<UserOwner>(tileModelEntity);
			User componentData2 = Utilities.GetComponentData<User>(componentData.Owner._Entity);
			ManualLogSource log = Plugin.Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(6, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("User: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<FixedString64>(componentData2.CharacterName);
			}
			log.LogInfo(val);
			if (!CanEditTiles(componentData2))
			{
				return HasValidCastleHeartConnection(componentData2, tileModelEntity);
			}
			return true;
		}

		private static bool CanEditTiles(User user)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			if (DataStructures.PlayerSettings.TryGetValue(user.PlatformId, out var value))
			{
				return value.Permissions;
			}
			return false;
		}

		private static bool HasValidCastleHeartConnection(User user, Entity tileModelEntity)
		{
			//IL_0000: 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_001a: 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)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//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)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			if (!tileModelEntity.Has<CastleHeartConnection>())
			{
				return false;
			}
			Plugin.Log.LogInfo((object)"Checking for valid castle heart connection...");
			CastleHeartConnection val = tileModelEntity.Read<CastleHeartConnection>();
			Entity entity = val.CastleHeartEntity._Entity;
			if (entity == Entity.Null)
			{
				return false;
			}
			Plugin.Log.LogInfo((object)"Castle heart entity not null.");
			return true;
		}
	}
	[HarmonyPatch(typeof(ReplaceAbilityOnSlotSystem), "OnUpdate")]
	public class ReplaceAbilityOnSlotSystem_Patch
	{
		private static void Prefix(ReplaceAbilityOnSlotSystem __instance)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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_002c: 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_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: 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_0052: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0070: 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_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			bool equipSkills = default(bool);
			try
			{
				EntityManager entityManager = VWorld.Server.EntityManager;
				EntityQuery _Spawn_entityQuery = __instance.__Spawn_entityQuery;
				NativeArray<Entity> val = ((EntityQuery)(ref _Spawn_entityQuery)).ToEntityArray((Allocator)2);
				Plugin.Log.LogInfo((object)"ReplaceAbilityOnSlotSystem Prefix called...");
				Enumerator<Entity> enumerator = val.GetEnumerator();
				while (enumerator.MoveNext())
				{
					Entity current = enumerator.Current;
					Entity owner = ((EntityManager)(ref entityManager)).GetComponentData<EntityOwner>(current).Owner;
					if (!((EntityManager)(ref entityManager)).HasComponent<PlayerCharacter>(owner))
					{
						continue;
					}
					Entity userEntity = ((EntityManager)(ref entityManager)).GetComponentData<PlayerCharacter>(owner).UserEntity;
					User componentData = ((EntityManager)(ref entityManager)).GetComponentData<User>(userEntity);
					if (!DataStructures.PlayerSettings.TryGetValue(componentData.PlatformId, out var value))
					{
						continue;
					}
					equipSkills = value.EquipSkills;
					if (!equipSkills.Equals(obj: false))
					{
						DynamicBuffer<ReplaceAbilityOnSlotBuff> buffer = ((EntityManager)(ref entityManager)).GetBuffer<ReplaceAbilityOnSlotBuff>(current);
						if (buffer[0].NewGroupId == Prefabs.AB_Vampire_Unarmed_Primary_MeleeAttack_AbilityGroup)
						{
							PrefabGUID aB_Interact_Siege_Structure_T02_AbilityGroup = Prefabs.AB_Interact_Siege_Structure_T02_AbilityGroup;
							PrefabGUID aB_Debug_NukeAll_Group = Prefabs.AB_Debug_NukeAll_Group;
							ReplaceAbilityOnSlotBuff val2 = default(ReplaceAbilityOnSlotBuff);
							val2.Slot = 1;
							val2.NewGroupId = aB_Interact_Siege_Structure_T02_AbilityGroup;
							ReplaceAbilityOnSlotBuff val3 = val2;
							val2 = default(ReplaceAbilityOnSlotBuff);
							val2.Slot = 4;
							val2.NewGroupId = aB_Debug_NukeAll_Group;
							ReplaceAbilityOnSlotBuff val4 = val2;
							buffer.Add(val3);
							buffer.Add(val4);
							Plugin.Log.LogInfo((object)"Modification complete.");
						}
					}
				}
				val.Dispose();
			}
			catch (Exception ex)
			{
				ManualLogSource log = Plugin.Log;
				BepInExInfoLogInterpolatedStringHandler val5 = new BepInExInfoLogInterpolatedStringHandler(44, 1, ref equipSkills);
				if (equipSkills)
				{
					((BepInExLogInterpolatedStringHandler)val5).AppendLiteral("Error in ReplaceAbilityOnSlotSystem Prefix: ");
					((BepInExLogInterpolatedStringHandler)val5).AppendFormatted<string>(ex.Message);
				}
				log.LogInfo(val5);
			}
		}
	}
}
namespace VCreate
{
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "VCreate";

		public const string PLUGIN_NAME = "VCreate";

		public const string PLUGIN_VERSION = "1.0.1";
	}
}
namespace VCreate.Systems
{
	internal static class Enablers
	{
		public class TileFunctions
		{
			private static NativeArray<Entity> GetTiles()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_001b: Expected O, but got Unknown
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_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_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: 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_0057: 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)
				EntityManager entityManager = VWorld.Server.EntityManager;
				EntityQueryDesc[] array = new EntityQueryDesc[1];
				EntityQueryDesc val = new EntityQueryDesc();
				val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[3]
				{
					ComponentType.ReadOnly<LocalToWorld>(),
					ComponentType.ReadOnly<PrefabGUID>(),
					ComponentType.ReadOnly<TileModel>()
				});
				array[0] = val;
				EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
				return ((EntityQuery)(ref val2)).ToEntityArray((Allocator)2);
			}

			internal static List<Entity> ClosestTiles(ChatCommandContext ctx, float radius, 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_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: 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_0022: 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_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: 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_0087: Unknown result type (might be due to invalid IL or missing references)
				//IL_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a6: 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_00af: 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_00ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c1: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: 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_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0103: Unknown result type (might be due to invalid IL or missing references)
				try
				{
					Entity senderCharacterEntity = ctx.Event.SenderCharacterEntity;
					NativeArray<Entity> tiles = GetTiles();
					List<Entity> list = new List<Entity>();
					EntityManager entityManager = VWorld.Server.EntityManager;
					LocalToWorld componentData = ((EntityManager)(ref entityManager)).GetComponentData<LocalToWorld>(senderCharacterEntity);
					float3 position = ((LocalToWorld)(ref componentData)).Position;
					PrefabCollectionSystem existingSystem = VWorld.Server.GetExistingSystem<PrefabCollectionSystem>();
					PrefabGUID val = default(PrefabGUID);
					if (!((PrefabCollectionSystem_Base)existingSystem).NameToPrefabGuidDictionary.TryGetValue(name, ref val))
					{
						throw new ArgumentException("Tile name '" + name + "' not found.", "name");
					}
					PrefabGUID val2 = val;
					Enumerator<Entity> enumerator = tiles.GetEnumerator();
					while (enumerator.MoveNext())
					{
						Entity current = enumerator.Current;
						if (val2.LookupName().ToLower().Contains("tm"))
						{
							entityManager = VWorld.Server.EntityManager;
							componentData = ((EntityManager)(ref entityManager)).GetComponentData<LocalToWorld>(current);
							float3 position2 = ((LocalToWorld)(ref componentData)).Position;
							float num = Vector3.Distance(float3.op_Implicit(position), float3.op_Implicit(position2));
							EntityManager entityManager2 = VWorld.Server.EntityManager;
							ComponentDataFromEntity<PrefabGUID> componentDataFromEntity = ((EntityManager)(ref entityManager2)).GetComponentDataFromEntity<PrefabGUID>(false);
							if (num < radius && componentDataFromEntity[current] == val2)
							{
								list.Add(current);
							}
						}
					}
					tiles.Dispose();
					return list;
				}
				catch (Exception)
				{
					return null;
				}
			}
		}

		public class ResourceFunctions
		{
			public static void SearchAndDestroy()
			{
				//IL_001b: 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_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: Expected O, but got Unknown
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_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_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: 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_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: Expected O, but got Unknown
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0103: Unknown result type (might be due to invalid IL or missing references)
				//IL_0108: Unknown result type (might be due to invalid IL or missing references)
				//IL_010d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Unknown result type (might be due to invalid IL or missing references)
				//IL_0116: Unknown result type (might be due to invalid IL or missing references)
				//IL_011b: 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_0124: 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_012b: Unknown result type (might be due to invalid IL or missing references)
				//IL_012d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0132: Unknown result type (might be due to invalid IL or missing references)
				//IL_0134: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ef: Expected O, but got Unknown
				//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
				Plugin.Log.LogInfo((object)"Entering SearchAndDestroy...");
				EntityCommandBufferSystem existingSystem = VWorld.Server.GetExistingSystem<EntityCommandBufferSystem>();
				EntityCommandBuffer val = existingSystem.CreateCommandBuffer();
				int num = 0;
				bool flag = true;
				EntityManager entityManager = VWorld.Server.EntityManager;
				EntityQueryDesc[] array = new EntityQueryDesc[1];
				EntityQueryDesc val2 = new EntityQueryDesc();
				val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<YieldResourcesOnDamageTaken>() });
				val2.Options = (EntityQueryOptions)(flag ? 2 : 0);
				array[0] = val2;
				EntityQuery val3 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
				NativeArray<Entity> val4 = ((EntityQuery)(ref val3)).ToEntityArray((Allocator)2);
				Enumerator<Entity> enumerator = val4.GetEnumerator();
				while (enumerator.MoveNext())
				{
					Entity current = enumerator.Current;
					if (ShouldRemoveNodeBasedOnTerritory(current))
					{
						num++;
						DestroyUtility.CreateDestroyEvent(val, current, (DestroyReason)0, (DestroyDebugReason)0);
					}
				}
				val4.Dispose();
				entityManager = VWorld.Server.EntityManager;
				EntityQueryDesc[] array2 = new EntityQueryDesc[1];
				val2 = new EntityQueryDesc();
				val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<PrefabGUID>() });
				val2.Options = (EntityQueryOptions)2;
				array2[0] = val2;
				EntityQuery val5 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array2);
				NativeArray<Entity> val6 = ((EntityQuery)(ref val5)).ToEntityArray((Allocator)2);
				Enumerator<Entity> enumerator2 = val6.GetEnumerator();
				while (enumerator2.MoveNext())
				{
					Entity current2 = enumerator2.Current;
					PrefabGUID componentData = Utilities.GetComponentData<PrefabGUID>(current2);
					string text = componentData.LookupName().ToLower();
					if ((text.Contains("plant") || text.Contains("fibre") || text.Contains("shrub") || text.Contains("tree") || text.Contains("fiber") || text.Contains("bush") || text.Contains("grass") || text.Contains("sapling")) && ShouldRemoveNodeBasedOnTerritory(current2))
					{
						num++;
						DestroyUtility.CreateDestroyEvent(val, current2, (DestroyReason)0, (DestroyDebugReason)0);
					}
				}
				val6.Dispose();
				ManualLogSource log = Plugin.Log;
				bool flag2 = default(bool);
				BepInExInfoLogInterpolatedStringHandler val7 = new BepInExInfoLogInterpolatedStringHandler(29, 1, ref flag2);
				if (flag2)
				{
					((BepInExLogInterpolatedStringHandler)val7).AppendFormatted<int>(num);
					((BepInExLogInterpolatedStringHandler)val7).AppendLiteral(" resource entities destroyed.");
				}
				log.LogInfo(val7);
			}

			private static bool ShouldRemoveNodeBasedOnTerritory(Entity node)
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				if (CastleTerritoryCache.TryGetCastleTerritory(node, out var _))
				{
					return true;
				}
				return false;
			}
		}

		public class HorseFunctions
		{
			internal struct HorseStasisState
			{
				public Entity HorseEntity;

				public bool IsInStasis;

				public HorseStasisState(Entity horseEntity, bool isInStasis)
				{
					//IL_0001: Unknown result type (might be due to invalid IL or missing references)
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					HorseEntity = horseEntity;
					IsInStasis = isInStasis;
				}
			}

			internal static Dictionary<ulong, HorseStasisState> PlayerHorseStasisMap = new Dictionary<ulong, HorseStasisState>();

			[Command("disablehorses", "dh", null, "Disables dead, dominated ghost horses on the server.", null, true)]
			public static void DisableGhosts(ChatCommandContext ctx)
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: 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_001b: Expected O, but got Unknown
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_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_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_004d: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: 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_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: 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_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_008e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0092: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: 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_00e5: 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_00ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0101: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				//IL_011e: Unknown result type (might be due to invalid IL or missing references)
				EntityManager entityManager = VWorld.Server.EntityManager;
				EntityQueryDesc[] array = new EntityQueryDesc[1];
				EntityQueryDesc val = new EntityQueryDesc();
				val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[4]
				{
					ComponentType.ReadWrite<Immortal>(),
					ComponentType.ReadWrite<Mountable>(),
					ComponentType.ReadWrite<BuffBuffer>(),
					ComponentType.ReadWrite<PrefabGUID>()
				});
				array[0] = val;
				EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
				NativeArray<Entity> val3 = ((EntityQuery)(ref val2)).ToEntityArray((Allocator)3);
				Enumerator<Entity> enumerator = val3.GetEnumerator();
				DynamicBuffer<BuffBuffer> val4 = default(DynamicBuffer<BuffBuffer>);
				while (enumerator.MoveNext())
				{
					Entity current = enumerator.Current;
					EntityManager entityManager2 = VWorld.Server.EntityManager;
					((EntityManager)(ref entityManager2)).TryGetBuffer<BuffBuffer>(current, ref val4);
					for (int i = 0; i < val4.Length; i++)
					{
						if (val4[i].PrefabGuid.GuidHash == Prefabs.Buff_General_VampireMount_Dead.GuidHash && Utilities.HasComponent<EntityOwner>(current))
						{
							Entity owner = Utilities.GetComponentData<EntityOwner>(current).Owner;
							if (Utilities.HasComponent<PlayerCharacter>(owner))
							{
								User componentData = Utilities.GetComponentData<User>(Utilities.GetComponentData<PlayerCharacter>(owner).UserEntity);
								ctx.Reply("Found dead horse owner, disabling...");
								ulong platformId = componentData.PlatformId;
								PlayerHorseStasisMap[platformId] = new HorseStasisState(current, isInStasis: true);
								SystemPatchUtil.Disable(current);
							}
						}
					}
				}
				val3.Dispose();
				ctx.Reply("Placed dead player ghost horses in stasis. They can still be resummoned.");
			}

			[Command("enablehorse", "eh", null, "Reactivates the player's horse.", null, false)]
			public static void ReactivateHorse(ChatCommandContext ctx)
			{
				//IL_0001: 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)
				ulong platformId = ctx.User.PlatformId;
				if (PlayerHorseStasisMap.TryGetValue(platformId, out var value) && value.IsInStasis)
				{
					SystemPatchUtil.Enable(value.HorseEntity);
					value.IsInStasis = false;
					PlayerHorseStasisMap[platformId] = value;
					ctx.Reply("Your horse has been reactivated.");
				}
				else
				{
					ctx.Reply("No horse in stasis found to reactivate.");
				}
			}
		}
	}
	public class Omnitool
	{
		public readonly Dictionary<string, bool> modes = new Dictionary<string, bool>();

		public readonly Dictionary<string, int> data = new Dictionary<string, int>();

		public bool Permissions { get; set; }

		public bool Emotes { get; set; }

		public bool EquipSkills { get; set; }

		public Stack<string> LastPlaced { get; set; } = new Stack<string>();


		public Omnitool()
		{
			SetMode("InspectToggle", value: false);
			SetMode("SnappingToggle", value: false);
			SetMode("ImmortalToggle", value: false);
			SetMode("MapIconToggle", value: false);
			SetMode("DestroyToggle", value: false);
			SetMode("CopyToggle", value: false);
			SetMode("DebuffToggle", value: false);
			SetMode("ConvertToggle", value: false);
			SetMode("BuffToggle", value: false);
			SetMode("TileToggle", value: false);
			SetData("Rotation", 0);
			SetData("Unit", 0);
			SetData("Tile", 0);
			SetData("GridSize", 0);
			SetData("MapIcon", 0);
			SetData("Buff", 0);
			SetData("Debuff", 0);
		}

		public void SetMode(string key, bool value)
		{
			modes[key] = value;
		}

		public bool GetMode(string key)
		{
			if (modes.TryGetValue(key, out var value))
			{
				return value;
			}
			return false;
		}

		public void SetData(string key, int value)
		{
			data[key] = value;
		}

		public int GetData(string key)
		{
			if (data.TryGetValue(key, out var value))
			{
				return value;
			}
			return 0;
		}

		public void AddEntity(string tileRef)
		{
			if (LastPlaced.Count >= 10)
			{
				LastPlaced.Pop();
			}
			LastPlaced.Push(tileRef);
		}

		public string PopEntity()
		{
			if (LastPlaced.Count <= 0)
			{
				return null;
			}
			return LastPlaced.Pop();
		}
	}
	public class OnHover
	{
		public static readonly float[] gridSizes = new float[3] { 2.5f, 5f, 7.5f };

		public static void InspectHoveredEntity(Entity userEntity)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: 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_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_0013: 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_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: 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_006e: 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_00b8: 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_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: 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_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			User componentData = Utilities.GetComponentData<User>(userEntity);
			Entity hoveredEntity = userEntity.Read<EntityInput>().HoveredEntity;
			if (hoveredEntity != Entity.Null)
			{
				EntityManager entityManager = VWorld.Server.EntityManager;
				if (((EntityManager)(ref entityManager)).Exists(hoveredEntity))
				{
					hoveredEntity.LogComponentTypes();
					string text = hoveredEntity.Index + ", " + hoveredEntity.Version;
					entityManager = VWorld.Server.EntityManager;
					DynamicBuffer<BuffBuffer> val = default(DynamicBuffer<BuffBuffer>);
					if (((EntityManager)(ref entityManager)).TryGetBuffer<BuffBuffer>(hoveredEntity, ref val))
					{
						for (int i = 0; i < val.Length; i++)
						{
							string text2 = val[i].PrefabGuid.LookupName();
							ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, text2);
						}
					}
					ulong platformId = componentData.PlatformId;
					if (DataStructures.PlayerSettings.TryGetValue(platformId, out var value))
					{
						PrefabGUID componentData2 = Utilities.GetComponentData<PrefabGUID>(hoveredEntity);
						if (!componentData2.GuidHash.Equals(Prefabs.CHAR_VampireMale))
						{
							value.SetData("Unit", componentData2.GuidHash);
							DataStructures.Save();
						}
						string text3 = "Inspected hovered entity for buffs and components, check console log for components: '" + text + "', " + componentData2.LookupName();
						ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, text3);
					}
					return;
				}
			}
			string text4 = "No valid entity is being hovered.";
			ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, text4);
		}

		public static void BuffAtHover(Entity userEntity)
		{
			//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_0135: 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_013b: 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_0039: 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_0044: 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_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: 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_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			if (DataStructures.PlayerSettings.TryGetValue(userEntity.Read<User>().PlatformId, out var value))
			{
				PrefabGUID val = default(PrefabGUID);
				((PrefabGUID)(ref val))..ctor(value.GetData("Buff"));
				Entity hoveredEntity = userEntity.Read<EntityInput>().HoveredEntity;
				FromCharacter val2 = default(FromCharacter);
				val2.Character = hoveredEntity;
				val2.User = userEntity;
				FromCharacter val3 = val2;
				DebugEventsSystem existingSystem = VWorld.Server.GetExistingSystem<DebugEventsSystem>();
				ApplyBuffDebugEvent val4 = default(ApplyBuffDebugEvent);
				val4.BuffPrefabGUID = val;
				ApplyBuffDebugEvent val5 = val4;
				Entity entity = default(Entity);
				if (BuffUtility.TryGetBuff(VWorld.Server.EntityManager, hoveredEntity, val, ref entity))
				{
					return;
				}
				existingSystem.ApplyBuff(val3, val5);
				if (BuffUtility.TryGetBuff(VWorld.Server.EntityManager, hoveredEntity, val, ref entity))
				{
					if (entity.Has<CreateGameplayEventsOnSpawn>())
					{
						entity.Remove<CreateGameplayEventsOnSpawn>();
					}
					if (entity.Has<GameplayEventListeners>())
					{
						entity.Remove<GameplayEventListeners>();
					}
					if (!Utilities.HasComponent<Buff_Persists_Through_Death>(entity))
					{
						Utilities.AddComponent<Buff_Persists_Through_Death>(entity);
					}
					if (entity.Has<LifeTime>())
					{
						LifeTime componentData = entity.Read<LifeTime>();
						componentData.Duration = -1f;
						componentData.EndAction = (LifeTimeEndAction)0;
						entity.Write<LifeTime>(componentData);
					}
					if (entity.Has<RemoveBuffOnGameplayEvent>())
					{
						entity.Remove<RemoveBuffOnGameplayEvent>();
					}
					if (entity.Has<RemoveBuffOnGameplayEventEntry>())
					{
						entity.Remove<RemoveBuffOnGameplayEventEntry>();
					}
				}
			}
			else
			{
				ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, userEntity.Read<User>(), "Couldn't find omnitool data.");
			}
		}

		public static void BuffNonPlayer(Entity characterEntity, PrefabGUID prefabGUID)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_0012: 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)
			//IL_0018: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: 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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			FromCharacter val = default(FromCharacter);
			val.Character = characterEntity;
			val.User = characterEntity;
			FromCharacter val2 = val;
			DebugEventsSystem existingSystem = VWorld.Server.GetExistingSystem<DebugEventsSystem>();
			ApplyBuffDebugEvent val3 = default(ApplyBuffDebugEvent);
			val3.BuffPrefabGUID = prefabGUID;
			ApplyBuffDebugEvent val4 = val3;
			Entity entity = default(Entity);
			if (BuffUtility.TryGetBuff(VWorld.Server.EntityManager, characterEntity, prefabGUID, ref entity))
			{
				return;
			}
			existingSystem.ApplyBuff(val2, val4);
			if (BuffUtility.TryGetBuff(VWorld.Server.EntityManager, characterEntity, prefabGUID, ref entity))
			{
				if (entity.Has<CreateGameplayEventsOnSpawn>())
				{
					entity.Remove<CreateGameplayEventsOnSpawn>();
				}
				if (entity.Has<GameplayEventListeners>())
				{
					entity.Remove<GameplayEventListeners>();
				}
				if (!Utilities.HasComponent<Buff_Persists_Through_Death>(entity))
				{
					Utilities.AddComponent<Buff_Persists_Through_Death>(entity);
				}
				if (entity.Has<LifeTime>())
				{
					LifeTime componentData = entity.Read<LifeTime>();
					componentData.Duration = -1f;
					componentData.EndAction = (LifeTimeEndAction)0;
					entity.Write<LifeTime>(componentData);
				}
				if (entity.Has<RemoveBuffOnGameplayEvent>())
				{
					entity.Remove<RemoveBuffOnGameplayEvent>();
				}
				if (entity.Has<RemoveBuffOnGameplayEventEntry>())
				{
					entity.Remove<RemoveBuffOnGameplayEventEntry>();
				}
			}
		}

		public static void DestroyAtHover(Entity userEntity)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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_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_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)
			//IL_0024: 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_0043: 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_0032: 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_0055: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = VWorld.Server.EntityManager;
			User componentData = Utilities.GetComponentData<User>(userEntity);
			Entity hoveredEntity = userEntity.Read<EntityInput>().HoveredEntity;
			PrefabGUID componentData2 = Utilities.GetComponentData<PrefabGUID>(hoveredEntity);
			if (Utilities.HasComponent<VampireTag>(hoveredEntity))
			{
				ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, "Using this on vampires is not allowed.");
			}
			else
			{
				if (!(hoveredEntity != Entity.Null))
				{
					return;
				}
				EntityManager entityManager2 = VWorld.Server.EntityManager;
				if (((EntityManager)(ref entityManager2)).Exists(hoveredEntity))
				{
					if (!Utilities.HasComponent<Dead>(hoveredEntity))
					{
						Utilities.AddComponentData<Dead>(hoveredEntity, new Dead
						{
							DoNotDestroy = false
						});
						ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, "Target destroyed.");
					}
					else
					{
						Utilities.SetComponentData<Dead>(hoveredEntity, new Dead
						{
							DoNotDestroy = false
						});
						ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, "Target destroyed.");
					}
				}
			}
		}

		public static void SummonHelpers(Entity userEntity)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: 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_0019: 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_0031: 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_003a: 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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			User componentData = Utilities.GetComponentData<User>(userEntity);
			int index = componentData.Index;
			Entity hoveredEntity = userEntity.Read<EntityInput>().HoveredEntity;
			PrefabCollectionSystem existingSystem = VWorld.Server.GetExistingSystem<PrefabCollectionSystem>();
			PrefabGUID cHAR_ChurchOfLight_Paladin_Servant = Prefabs.CHAR_ChurchOfLight_Paladin_Servant;
			EntityManager entityManager = VWorld.Server.EntityManager;
			FromCharacter val = default(FromCharacter);
			val.Character = hoveredEntity;
			val.User = userEntity;
			FromCharacter val2 = val;
			EntityCommandBufferSystem existingSystem2 = VWorld.Server.GetExistingSystem<EntityCommandBufferSystem>();
			EntityCommandBuffer val3 = existingSystem2.CreateCommandBuffer();
			SpawnCharmeableDebugEvent val4 = default(SpawnCharmeableDebugEvent);
			val4.PrefabGuid = cHAR_ChurchOfLight_Paladin_Servant;
			val4.Position = hoveredEntity.Read<Translation>().Value;
			SpawnCharmeableDebugEvent val5 = val4;
			DebugEventsSystem existingSystem3 = VWorld.Server.GetExistingSystem<DebugEventsSystem>();
			existingSystem3.SpawnCharmeableDebugEvent(index, ref val5, val3, ref val2);
		}

		public static void LinkHelper(Entity userEntity)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: 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_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)
			//IL_0024: 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_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_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_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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_0112: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: 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_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: 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)
			EntityManager entityManager = VWorld.Server.EntityManager;
			Entity hoveredEntity = userEntity.Read<EntityInput>().HoveredEntity;
			Team val = userEntity.Read<Team>();
			TeamReference componentData = userEntity.Read<TeamReference>();
			Entity entity = userEntity.Read<User>().LocalCharacter._Entity;
			EntityManager entityManager2 = VWorld.Server.EntityManager;
			DynamicBuffer<FollowerBuffer> val2 = default(DynamicBuffer<FollowerBuffer>);
			if (((EntityManager)(ref entityManager2)).TryGetBuffer<FollowerBuffer>(entity, ref val2))
			{
				DynamicBuffer<BuffBuffer> val3 = default(DynamicBuffer<BuffBuffer>);
				DynamicBuffer<FollowerBuffer> val5 = default(DynamicBuffer<FollowerBuffer>);
				for (int i = 0; i < val2.Length; i++)
				{
					entityManager2 = VWorld.Server.EntityManager;
					if (!((EntityManager)(ref entityManager2)).TryGetBuffer<BuffBuffer>(val2[i].Entity._Entity, ref val3))
					{
						continue;
					}
					Enumerator<BuffBuffer> enumerator = val3.GetEnumerator();
					while (enumerator.MoveNext())
					{
						BuffBuffer current = enumerator.Current;
						PrefabGUID prefabGuid = current.PrefabGuid;
						if (!((PrefabGUID)(ref prefabGuid)).Equals(Buffs.AB_Charm_Active_Human_Buff))
						{
							continue;
						}
						Entity val4 = Entity.Null;
						Enumerator<FollowerBuffer> enumerator2 = val2.GetEnumerator();
						while (enumerator2.MoveNext())
						{
							FollowerBuffer current2 = enumerator2.Current;
							entityManager2 = VWorld.Server.EntityManager;
							if (((EntityManager)(ref entityManager2)).TryGetBufferReadOnly<FollowerBuffer>(current2.Entity._Entity, ref val5))
							{
								val4 = current2.Entity._Entity;
								break;
							}
						}
						if (val4 == Entity.Null)
						{
							ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, userEntity.Read<User>(), "No familar found to link helper to.");
							continue;
						}
						Utilities.SetComponentData<Team>(hoveredEntity, new Team
						{
							Value = val.Value,
							FactionIndex = val.FactionIndex
						});
						ModifiableEntity followed = ModifiableEntity.CreateFixed(val4);
						ModifiableInt modeModifiable = Utilities.GetComponentData<Follower>(hoveredEntity).ModeModifiable;
						modeModifiable._Value = 0;
						Utilities.SetComponentData<Follower>(hoveredEntity, new Follower
						{
							Followed = followed,
							ModeModifiable = modeModifiable,
							Stationary = ModifiableBool.CreateFixed(false)
						});
						Utilities.SetComponentData<TeamReference>(hoveredEntity, componentData);
						GetOwnerTranslationOnSpawn val6 = default(GetOwnerTranslationOnSpawn);
						val6.SnapToGround = true;
						val6.TranslationSource = (GetTranslationSource)0;
						GetOwnerTranslationOnSpawn componentData2 = val6;
						Utilities.AddComponentData<GetOwnerTranslationOnSpawn>(hoveredEntity, componentData2);
						ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, userEntity.Read<User>(), "Linked helper to familiar.");
					}
					Plugin.Log.LogInfo((object)"Modifying buffs...");
					DebuffNonPlayer(hoveredEntity);
					BuffNonPlayer(hoveredEntity, Buffs.Admin_Observe_Invisible_Buff);
				}
				Plugin.Log.LogInfo((object)"Attempted to link helper to familar...");
			}
			else
			{
				Plugin.Log.LogInfo((object)"No followers found...");
			}
		}

		public static void ConvertCharacter(Entity userEntity)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: 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_0026: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: 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_0070: 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_0075: 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_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00af: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: 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_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: 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_0041: 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)
			EntityManager entityManager = VWorld.Server.EntityManager;
			Entity hoveredEntity = userEntity.Read<EntityInput>().HoveredEntity;
			if (hoveredEntity.Read<PrefabGUID>().GuidHash.Equals(Prefabs.CHAR_VampireMale))
			{
				ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, userEntity.Read<User>(), "Vampires can't be converted.");
				return;
			}
			Team val = userEntity.Read<Team>();
			TeamReference componentData = userEntity.Read<TeamReference>();
			Entity entity = userEntity.Read<User>().LocalCharacter._Entity;
			Utilities.SetComponentData<Team>(hoveredEntity, new Team
			{
				Value = val.Value,
				FactionIndex = val.FactionIndex
			});
			ModifiableEntity followed = ModifiableEntity.CreateFixed(entity);
			Follower componentData2 = hoveredEntity.Read<Follower>();
			componentData2.Followed = followed;
			Utilities.SetComponentData<Follower>(hoveredEntity, componentData2);
			Utilities.SetComponentData<TeamReference>(hoveredEntity, componentData);
			((EntityManager)(ref entityManager)).AddBuffer<FollowerBuffer>(hoveredEntity);
			ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, userEntity.Read<User>(), "Converted entity to your team. It will follow amnd fight until death.");
		}

		public static void SpawnCopy(Entity userEntity)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: 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_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00b0: 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_00c0: 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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = VWorld.Server.EntityManager;
			Plugin.Log.LogInfo((object)"Cloning Triggered");
			User componentData = Utilities.GetComponentData<User>(userEntity);
			int index = componentData.Index;
			PlayerService.TryGetCharacterFromName(((object)(FixedString64)(ref componentData.CharacterName)).ToString(), out var Character);
			FromCharacter val = default(FromCharacter);
			val.Character = Character;
			val.User = userEntity;
			FromCharacter val2 = val;
			if (DataStructures.PlayerSettings.TryGetValue(componentData.PlatformId, out var value))
			{
				EntityCommandBufferSystem existingSystem = VWorld.Server.GetExistingSystem<EntityCommandBufferSystem>();
				EntityCommandBuffer val3 = existingSystem.CreateCommandBuffer();
				PrefabGUID prefabGuid = default(PrefabGUID);
				((PrefabGUID)(ref prefabGuid))..ctor(value.GetData("Unit"));
				SpawnCharmeableDebugEvent val4 = default(SpawnCharmeableDebugEvent);
				val4.PrefabGuid = prefabGuid;
				val4.Position = userEntity.Read<EntityInput>().AimPosition;
				SpawnCharmeableDebugEvent val5 = val4;
				if (prefabGuid.GuidHash.Equals(Prefabs.CHAR_Mount_Horse_Vampire.GuidHash) || prefabGuid.GuidHash.Equals(Prefabs.CHAR_Mount_Horse_Gloomrot.GuidHash) || prefabGuid.GuidHash.Equals(Prefabs.CHAR_Mount_Horse_Gloomrot.GuidHash))
				{
					ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, "This can't be used to summon vampire horses as they don't like being charmed (crashes the server).");
					return;
				}
				DebugEventsSystem existingSystem2 = VWorld.Server.GetExistingSystem<DebugEventsSystem>();
				existingSystem2.SpawnCharmeableDebugEvent(index, ref val5, val3, ref val2);
				ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, "Spawned last unit inspected/set as charmed.");
			}
			else
			{
				Plugin.Log.LogInfo((object)"Couldn't find omnitool data.");
			}
		}

		public static void SpawnTileModel(Entity userEntity)
		{
			//IL_000f: 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_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_001f: 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_005e: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			Plugin.Log.LogInfo((object)"SpawnPrefabModel Triggered");
			if (Utilities.HasComponent<User>(userEntity))
			{
				User componentData = Utilities.GetComponentData<User>(userEntity);
				ulong platformId = componentData.PlatformId;
				Nullable_Unboxed<float3> aimPosition = default(Nullable_Unboxed<float3>);
				aimPosition..ctor(userEntity.Read<EntityInput>().AimPosition);
				if (!DataStructures.PlayerSettings.TryGetValue(platformId, out var value))
				{
					ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, componentData, "Unable to locate build settings.");
				}
				else
				{
					HandleBuild(value, aimPosition, userEntity, componentData);
				}
			}
		}

		private static void HandleBuild(Omnitool data, Nullable_Unboxed<float3> aimPosition, Entity userEntity, User user)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: 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_0024: 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_0027: 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_002d: 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_0055: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			Entity prefabEntity = GetPrefabEntity(data);
			if (prefabEntity == Entity.Null)
			{
				Plugin.Log.LogInfo((object)"Prefab entity is null, returning...");
				return;
			}
			Entity val = DefaultInstantiateBehavior(prefabEntity, aimPosition, data);
			if (val == Entity.Null)
			{
				Plugin.Log.LogInfo((object)"Tile entity is null, returning...");
				return;
			}
			string tileRef = $"{val.Index}, {val.Version}";
			data.AddEntity(tileRef);
			ApplyTileSettings(val, aimPosition, data, userEntity, user);
		}

		private static Entity GetPrefabEntity(Omnitool data)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: 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_0034: Unknown result type (might be due to invalid IL or missing references)
			//I

VRising.GameData.dll

Decompiled 8 months ago
#define DEBUG
using System;
using System.Collections.Generic;
using System.Diagnostics;
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 BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using HarmonyLib;
using Il2CppSystem;
using Microsoft.CodeAnalysis;
using ProjectM;
using ProjectM.Auth;
using ProjectM.Behaviours;
using ProjectM.CastleBuilding;
using ProjectM.CastleBuilding.Placement;
using ProjectM.Gameplay;
using ProjectM.Gameplay.Clan;
using ProjectM.Gameplay.Scripting;
using ProjectM.Hybrid;
using ProjectM.Network;
using ProjectM.Pathfinding;
using ProjectM.Physics;
using ProjectM.Portrait;
using ProjectM.Roofs;
using ProjectM.Scripting;
using ProjectM.Sequencer;
using ProjectM.Shared;
using ProjectM.Terrain;
using ProjectM.Tiles;
using ProjectM.UI;
using Stunlock.Core;
using Stunlock.Localization;
using Stunlock.Sequencer;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Physics;
using Unity.Physics.Systems;
using Unity.Scenes;
using Unity.Transforms;
using UnityEngine;
using VRising.GameData.Models;
using VRising.GameData.Models.Base;
using VRising.GameData.Models.Data;
using VRising.GameData.Models.Internals;
using VRising.GameData.Patch;
using VRising.GameData.Utils;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("VRising.GameData")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("An extensible framework to access V Rising ECS data")]
[assembly: AssemblyFileVersion("0.3.3.0")]
[assembly: AssemblyInformationalVersion("0.3.3")]
[assembly: AssemblyProduct("VRising.GameData")]
[assembly: AssemblyTitle("VRising.GameData")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/adainrivers/VRising.GameData")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.3.3.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace VRising.GameData
{
	public delegate void OnGameDataInitializedEventHandler(World world);
	public delegate void OnGameDataDestroyedEventHandler();
	public static class GameData
	{
		private static bool _initialized;

		private static bool _worldDataInitialized;

		private const string NotInitializedError = "GameData is not initialized";

		public static bool IsServer;

		public static bool IsClient;

		private static World _world;

		private static Harmony _harmonyInstance;

		internal static ManualLogSource Logger;

		public static GameVersionData GameVersion => GameVersionUtils.GetVersionData();

		public static World World => _world ?? throw new InvalidOperationException("GameData is not initialized");

		public static Systems Systems
		{
			get
			{
				if (!_worldDataInitialized)
				{
					throw new InvalidOperationException("GameData is not initialized");
				}
				return Systems.Instance;
			}
		}

		public static Users Users
		{
			get
			{
				if (!_worldDataInitialized)
				{
					throw new InvalidOperationException("GameData is not initialized");
				}
				return Users.Instance;
			}
		}

		public static Items Items
		{
			get
			{
				if (!_worldDataInitialized)
				{
					throw new InvalidOperationException("GameData is not initialized");
				}
				return Items.Instance;
			}
		}

		public static Npcs Npcs
		{
			get
			{
				if (!_worldDataInitialized)
				{
					throw new InvalidOperationException("GameData is not initialized");
				}
				return Npcs.Instance;
			}
		}

		public static bool Initialized => _worldDataInitialized;

		public static event OnGameDataInitializedEventHandler OnInitialize;

		public static event OnGameDataDestroyedEventHandler OnDestroy;

		static GameData()
		{
			IsServer = Application.productName == "VRisingServer";
			IsClient = Application.productName == "VRising";
			Logger = Logger.CreateLogSource("VRising.GameData");
			Create();
		}

		internal static void Create()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			if (!_initialized)
			{
				_initialized = true;
				_harmonyInstance = new Harmony("VRising.GameData");
				if (IsClient)
				{
					_harmonyInstance.PatchAll(typeof(ClientEvents));
					ClientEvents.OnGameDataInitialized += OnGameDataInitialized;
					ClientEvents.OnGameDataDestroyed += OnGameDataDestroyed;
				}
				if (IsServer)
				{
					_harmonyInstance.PatchAll(typeof(ServerEvents));
					ServerEvents.OnGameDataInitialized += OnGameDataInitialized;
				}
			}
		}

		internal static void Destroy()
		{
			GameData.OnInitialize = null;
			if (IsClient)
			{
				ClientEvents.OnGameDataInitialized -= OnGameDataInitialized;
			}
			if (IsServer)
			{
				ServerEvents.OnGameDataInitialized -= OnGameDataInitialized;
			}
			_harmonyInstance.UnpatchSelf();
			_harmonyInstance = null;
		}

		private static void OnGameDataDestroyed()
		{
			_world = null;
			_worldDataInitialized = false;
			GameData.OnDestroy?.Invoke();
			if (GameData.OnDestroy == null)
			{
				return;
			}
			Delegate[] invocationList = GameData.OnDestroy.GetInvocationList();
			foreach (Delegate @delegate in invocationList)
			{
				try
				{
					@delegate.DynamicInvoke();
				}
				catch (Exception ex)
				{
					Logger.LogError((object)ex);
				}
			}
		}

		private static void OnGameDataInitialized(World world)
		{
			_world = world;
			_worldDataInitialized = true;
			if (GameData.OnInitialize == null)
			{
				return;
			}
			Delegate[] invocationList = GameData.OnInitialize.GetInvocationList();
			foreach (Delegate @delegate in invocationList)
			{
				try
				{
					@delegate.DynamicInvoke(world);
				}
				catch (Exception ex)
				{
					Logger.LogError((object)ex);
				}
			}
			Logger.LogInfo((object)"GameData initialized");
		}
	}
	public class Items
	{
		private static Items _instance;

		private List<ItemModel> _itemPrefabs;

		private List<ItemModel> _weapons;

		internal static Items Instance => _instance ?? (_instance = new Items());

		public List<ItemModel> Prefabs => _itemPrefabs ?? (_itemPrefabs = GetItemPrefabs());

		public List<ItemModel> Weapons => _weapons ?? (_weapons = Prefabs.Where((ItemModel itemModel) => (int)itemModel.EquipmentType == 2).ToList());

		private Items()
		{
		}

		public ItemModel GetPrefabById(PrefabGUID prefabGuid)
		{
			//IL_0015: 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_002f: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				GameDataSystem existingSystem = GameData.World.GetExistingSystem<GameDataSystem>();
				ManagedDataRegistry managedDataRegistry = existingSystem.ManagedDataRegistry;
				ManagedItemData orDefault = managedDataRegistry.GetOrDefault<ManagedItemData>(prefabGuid, (ManagedItemData)null);
				ManualLogSource logger = GameData.Logger;
				bool flag = default(bool);
				BepInExMessageLogInterpolatedStringHandler val = new BepInExMessageLogInterpolatedStringHandler(6, 1, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Name: ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<LocalizationKey>(orDefault.Name);
				}
				logger.LogMessage(val);
				PrefabLookupMap prefabLookupMap = ((PrefabCollectionSystem_Base)GameData.Systems.PrefabCollectionSystem).PrefabLookupMap;
				Entity entity = ((PrefabLookupMap)(ref prefabLookupMap))[prefabGuid];
				return FromEntity(entity);
			}
			catch (Exception ex)
			{
				GameData.Logger.LogError((object)ex);
			}
			return null;
		}

		public ItemModel FromEntity(Entity entity)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				return new ItemModel(entity);
			}
			catch (Exception ex)
			{
				GameData.Logger.LogError((object)ex);
			}
			return null;
		}

		private List<ItemModel> GetItemPrefabs()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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)
			//IL_0037: 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_0078: Unknown result type (might be due to invalid IL or missing references)
			List<ItemModel> list = new List<ItemModel>();
			ManualLogSource logger = GameData.Logger;
			bool flag = default(bool);
			BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(14, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("TOTAL PREFABS ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(GameData.Systems.PrefabCollectionSystem._PrefabGuidToEntityMap.Count());
			}
			logger.LogError(val);
			Enumerator<PrefabGUID, Entity> enumerator = GameData.Systems.PrefabCollectionSystem._PrefabGuidToEntityMap.GetEnumerator();
			while (enumerator.MoveNext())
			{
				ItemModel itemModel = FromEntity(enumerator.Current.Value);
				if (itemModel != null)
				{
					list.Add(itemModel);
				}
			}
			return list;
		}
	}
	public class Npcs
	{
		private static Npcs _instance;

		internal static Npcs Instance => _instance ?? (_instance = new Npcs());

		private Npcs()
		{
		}

		public NpcModel FromEntity(Entity npcEntity)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return new NpcModel(npcEntity);
		}
	}
	public class Systems
	{
		private static Systems _instance;

		internal static Systems Instance => _instance ?? (_instance = new Systems());

		public PrefabCollectionSystem PrefabCollectionSystem => GameData.World.GetExistingSystem<PrefabCollectionSystem>();

		public GameDataSystem GameDataSystem => GameData.World.GetExistingSystem<GameDataSystem>();

		public ManagedDataRegistry ManagedDataRegistry => GameDataSystem.ManagedDataRegistry;

		private Systems()
		{
		}
	}
	public class Users
	{
		private static Users _instance;

		internal static ulong CurrentUserSteamId { get; set; }

		internal static Users Instance => _instance ?? (_instance = new Users());

		public IEnumerable<UserModel> Online => All.Where((UserModel u) => u.IsConnected);

		public IEnumerable<UserModel> All
		{
			get
			{
				EntityManager entityManager = GameData.World.EntityManager;
				EntityQuery val = ((EntityManager)(ref entityManager)).CreateEntityQuery((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<User>() });
				Enumerator<Entity> enumerator = ((EntityQuery)(ref val)).ToEntityArray((Allocator)2).GetEnumerator();
				while (enumerator.MoveNext())
				{
					Entity userEntity = enumerator.Current;
					yield return FromEntity(userEntity);
				}
			}
		}

		private Users()
		{
		}

		public UserModel GetCurrentUser()
		{
			return GetUserByPlatformId(CurrentUserSteamId);
		}

		public UserModel GetUserByPlatformId(ulong platformId)
		{
			return All.FirstOrDefault((UserModel u) => u.PlatformId == platformId);
		}

		public UserModel GetUserByCharacterName(string characterName)
		{
			return All.FirstOrDefault((UserModel u) => u.CharacterName == characterName);
		}

		public UserModel FromEntity(Entity userEntity)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = GameData.World.EntityManager;
			if (!((EntityManager)(ref entityManager)).HasComponent<User>(userEntity))
			{
				throw new Exception("Given entity does not have User component.");
			}
			return new UserModel(userEntity);
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "VRising.GameData";

		public const string PLUGIN_NAME = "VRising.GameData";

		public const string PLUGIN_VERSION = "0.3.3";
	}
}
namespace VRising.GameData.Utils
{
	public static class ExtensionMethods
	{
		public static string GetPrefabName(this PrefabGUID prefabGuid)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				return ((PrefabCollectionSystem_Base)GameData.Systems.PrefabCollectionSystem).PrefabGuidToNameDictionary[prefabGuid].ToString();
			}
			catch
			{
				return null;
			}
		}

		public static IEnumerable<BaseEntityModel> ToEnumerable(this EntityQuery entityQuery)
		{
			//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)
			Enumerator<Entity> enumerator = ((EntityQuery)(ref entityQuery)).ToEntityArray((Allocator)2).GetEnumerator();
			while (enumerator.MoveNext())
			{
				yield return new BaseEntityModel(entity: enumerator.Current, world: GameData.World);
			}
		}

		public static IEnumerable<NpcModel> AsNpcs(this EntityQuery entityQuery)
		{
			//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)
			Enumerator<Entity> enumerator = ((EntityQuery)(ref entityQuery)).ToEntityArray((Allocator)2).GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity entity = enumerator.Current;
				yield return new NpcModel(entity);
			}
		}

		public static DateTime ToDateTime(this long unixDateTime)
		{
			return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(unixDateTime);
		}

		public static double Distance(this float3 pos1, float3 pos2)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			return Math.Sqrt(Math.Pow(pos1.x - pos2.x, 2.0) + Math.Pow(pos1.z - pos2.z, 2.0));
		}
	}
	internal struct FakeNull
	{
		public int value;

		public bool has_value;
	}
	internal class Logger
	{
		private readonly ManualLogSource _logger;

		internal Logger(ManualLogSource logger)
		{
			_logger = logger;
		}

		internal void Log(LogLevel logLevel, string message)
		{
		}

		internal void LogInfo(string message)
		{
			Log((LogLevel)16, message);
		}

		internal void LogWarning(string message)
		{
			Log((LogLevel)4, message);
		}

		internal void LogDebug(string message)
		{
			Log((LogLevel)32, message);
		}

		internal void LogFatal(string message)
		{
			Log((LogLevel)1, message);
		}

		internal void LogError(string message)
		{
			Log((LogLevel)2, message);
		}

		internal void LogError(Exception exception)
		{
			Log((LogLevel)2, exception.ToString());
		}

		internal void LogMessage(string message)
		{
			Log((LogLevel)8, message);
		}
	}
}
namespace VRising.GameData.Patch
{
	internal class ClientEvents
	{
		private static bool _onGameDataInitializedTriggered;

		internal static event OnGameDataInitializedEventHandler OnGameDataInitialized;

		internal static event OnGameDataDestroyedEventHandler OnGameDataDestroyed;

		[HarmonyPatch(typeof(GameDataManager), "OnUpdate")]
		[HarmonyPostfix]
		private static void GameDataManagerOnUpdatePostfix(GameDataManager __instance)
		{
			if (_onGameDataInitializedTriggered)
			{
				return;
			}
			try
			{
				if (__instance.GameDataInitialized)
				{
					_onGameDataInitializedTriggered = true;
					Debug.WriteLine("GameDataManagerOnUpdatePostfix Trigger");
					ClientEvents.OnGameDataInitialized?.Invoke(((ComponentSystemBase)__instance).World);
				}
			}
			catch (Exception ex)
			{
				GameData.Logger.LogError((object)ex);
			}
		}

		[HarmonyPatch(typeof(ClientBootstrapSystem), "OnDestroy")]
		[HarmonyPostfix]
		private static void ClientBootstrapSystemOnDestroyPostfix(ClientBootstrapSystem __instance)
		{
			_onGameDataInitializedTriggered = false;
			try
			{
				ClientEvents.OnGameDataDestroyed?.Invoke();
			}
			catch (Exception ex)
			{
				GameData.Logger.LogError((object)ex);
			}
		}

		[HarmonyPatch(typeof(SteamPlatformSystem), "TryInitClient")]
		[HarmonyPostfix]
		private static void SteamPlatformSystemOnTryInitClientPostfix(SteamPlatformSystem __instance)
		{
			try
			{
				Users.CurrentUserSteamId = __instance.UserID;
			}
			catch (Exception ex)
			{
				GameData.Logger.LogError((object)ex);
			}
		}
	}
	internal static class ServerEvents
	{
		internal static event OnGameDataInitializedEventHandler OnGameDataInitialized;

		[HarmonyPatch(typeof(LoadPersistenceSystemV2), "SetLoadState")]
		[HarmonyPostfix]
		private static void ServerStartupStateChange_Postfix(State loadState, LoadPersistenceSystemV2 __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Invalid comparison between Unknown and I4
			try
			{
				if ((int)loadState == 4)
				{
					ServerEvents.OnGameDataInitialized?.Invoke(((ComponentSystemBase)__instance).World);
				}
			}
			catch (Exception ex)
			{
				GameData.Logger.LogError((object)ex);
			}
		}
	}
}
namespace VRising.GameData.Models
{
	public class CharacterModel
	{
		public Entity Entity { get; }

		public BaseEntityModel Internals { get; }

		public EquipmentModel Equipment => Internals.Equipment.HasValue ? new EquipmentModel(Internals.Equipment.Value) : null;

		internal CharacterModel(Entity entity)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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 = entity;
			Internals = new BaseEntityModel(GameData.World, entity);
		}
	}
	public class EquipmentModel
	{
		public Equipment Internals { get; }

		public ItemModel Chest => (Internals.ArmorChestSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.ArmorChestSlotEntity._Entity) : null;

		public ItemModel Leg => (Internals.ArmorLegsSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.ArmorLegsSlotEntity._Entity) : null;

		public ItemModel Headgear => (Internals.ArmorHeadgearSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.ArmorHeadgearSlotEntity._Entity) : null;

		public ItemModel Footgear => (Internals.ArmorFootgearSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.ArmorFootgearSlotEntity._Entity) : null;

		public ItemModel Gloves => (Internals.ArmorGlovesSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.ArmorGlovesSlotEntity._Entity) : null;

		public ItemModel Cloak => (Internals.CloakSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.CloakSlotEntity._Entity) : null;

		public ItemModel Weapon => (Internals.WeaponSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.WeaponSlotEntity._Entity) : null;

		public ItemModel Jewelry => (Internals.GrimoireSlotEntity._Entity != Entity.Null) ? new ItemModel(Internals.GrimoireSlotEntity._Entity) : null;

		public float ArmorLevel
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				Equipment internals = Internals;
				return ((ModifiableFloat)(ref internals.ArmorLevel)).Value;
			}
		}

		public float WeaponLevel
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				Equipment internals = Internals;
				return ((ModifiableFloat)(ref internals.WeaponLevel)).Value;
			}
		}

		public float SpellLevel
		{
			get
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				Equipment internals = Internals;
				return ((ModifiableFloat)(ref internals.SpellLevel)).Value;
			}
		}

		public float Level => ArmorLevel + WeaponLevel + SpellLevel;

		public EquipmentModel(Equipment equipment)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			Internals = equipment;
		}
	}
	public class InventoryModel
	{
		private readonly CharacterModel _characterModel;

		public List<InventoryItemData> Items => GetInventoryItems();

		internal InventoryModel(CharacterModel characterModel)
		{
			_characterModel = characterModel;
		}

		private List<InventoryItemData> GetInventoryItems()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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)
			Entity entity = default(Entity);
			InventoryUtilities.TryGetInventoryEntity(GameData.World.EntityManager, _characterModel.Entity, ref entity, 0);
			BaseEntityModel baseEntityModel = new BaseEntityModel(GameData.World, entity);
			List<InventoryBuffer> inventoryBuffers = baseEntityModel.InventoryBuffers;
			if (inventoryBuffers == null)
			{
				return new List<InventoryItemData>();
			}
			return inventoryBuffers.Select(delegate(InventoryBuffer i, int index)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_002d: 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_0020: Unknown result type (might be due to invalid IL or missing references)
				//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_0032: 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_0046: Unknown result type (might be due to invalid IL or missing references)
				Entity val;
				if (i.ItemType.GuidHash != 0)
				{
					PrefabLookupMap prefabLookupMap = ((PrefabCollectionSystem_Base)GameData.Systems.PrefabCollectionSystem).PrefabLookupMap;
					val = ((PrefabLookupMap)(ref prefabLookupMap))[i.ItemType];
				}
				else
				{
					val = Entity.Null;
				}
				Entity entity2 = val;
				return new InventoryItemData
				{
					Item = new ItemModel(entity2),
					Stacks = i.Amount,
					Slot = index
				};
			}).ToList();
		}
	}
	public class ItemModel : EntityModel
	{
		public BaseManagedDataModel ManagedGameData { get; }

		public string PrefabName { get; }

		public string Name
		{
			get
			{
				//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)
				BaseManagedDataModel managedGameData = ManagedGameData;
				object result;
				if (managedGameData == null)
				{
					result = null;
				}
				else
				{
					ManagedItemData managedItemData = managedGameData.ManagedItemData;
					if (managedItemData == null)
					{
						result = null;
					}
					else
					{
						LocalizationKey name = managedItemData.Name;
						result = ((object)(LocalizationKey)(ref name)).ToString();
					}
				}
				return (string)result;
			}
		}

		public ItemCategory ItemCategory
		{
			get
			{
				//IL_001b: 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)
				ItemData? itemData = base.Internals.ItemData;
				return (ItemCategory)((!itemData.HasValue) ? 0 : ((long)itemData.GetValueOrDefault().ItemCategory));
			}
		}

		public ItemType ItemType
		{
			get
			{
				//IL_001a: 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)
				ItemData? itemData = base.Internals.ItemData;
				return (ItemType)(itemData.HasValue ? ((int)itemData.GetValueOrDefault().ItemType) : 0);
			}
		}

		public EquipmentType EquipmentType
		{
			get
			{
				//IL_001b: 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)
				EquippableData? equippableData = base.Internals.EquippableData;
				return (EquipmentType)((!equippableData.HasValue) ? 10 : ((int)equippableData.GetValueOrDefault().EquipmentType));
			}
		}

		internal ItemModel(Entity entity)
			: base(entity)
		{
			//IL_0001: 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)
			PrefabName = base.Internals.PrefabGUID?.GetPrefabName();
			ManagedGameData = new BaseManagedDataModel(GameData.World, base.Internals);
		}
	}
	public class NpcModel : EntityModel
	{
		private readonly HashSet<UnitCategory> _npcCategories = new HashSet<UnitCategory>
		{
			(UnitCategory)4,
			(UnitCategory)2,
			(UnitCategory)0,
			(UnitCategory)1,
			(UnitCategory)3
		};

		public new PrefabGUID PrefabGUID => base.Internals.PrefabGUID.GetValueOrDefault();

		public bool IsDead => base.Internals.Dead.HasValue;

		public float LifeTime => base.Internals.LifeTime?.Duration ?? 0f;

		public float3 Position
		{
			get
			{
				//IL_0022: 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_002a: 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_001f: Unknown result type (might be due to invalid IL or missing references)
				LocalToWorld? localToWorld = base.Internals.LocalToWorld;
				? result;
				if (!localToWorld.HasValue)
				{
					result = default(float3);
				}
				else
				{
					LocalToWorld valueOrDefault = localToWorld.GetValueOrDefault();
					result = ((LocalToWorld)(ref valueOrDefault)).Position;
				}
				return (float3)result;
			}
		}

		public bool HasDropTable => base.Internals.DropTable;

		internal NpcModel(Entity entity)
			: base(entity)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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)
			EntityCategory? entityCategory = base.Internals.EntityCategory;
			if (!entityCategory.HasValue || (int)entityCategory.Value.MainCategory != 0 || !_npcCategories.Contains(entityCategory.Value.UnitCategory))
			{
				throw new Exception("Given entity is not a NPC.");
			}
		}
	}
	public class UserModel : EntityModel
	{
		public InventoryModel Inventory { get; }

		public CharacterModel Character { get; }

		public string CharacterName
		{
			get
			{
				//IL_001a: 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)
				User? user = base.Internals.User;
				object result;
				if (!user.HasValue)
				{
					result = null;
				}
				else
				{
					User valueOrDefault = user.GetValueOrDefault();
					result = ((object)(FixedString64)(ref valueOrDefault.CharacterName)).ToString();
				}
				return (string)result;
			}
		}

		public EquipmentModel Equipment => Character.Equipment;

		public FromCharacter FromCharacter
		{
			get
			{
				//IL_0002: 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_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: 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)
				FromCharacter result = default(FromCharacter);
				result.User = base.Entity;
				result.Character = Character.Entity;
				return result;
			}
		}

		public bool IsAdmin => base.Internals.User?.IsAdmin ?? false;

		public bool IsConnected => base.Internals.User?.IsConnected ?? false;

		public ulong PlatformId => base.Internals.User?.PlatformId ?? 0;

		public float3 Position
		{
			get
			{
				//IL_0022: 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_002a: 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_001f: Unknown result type (might be due to invalid IL or missing references)
				LocalToWorld? localToWorld = base.Internals.LocalToWorld;
				? result;
				if (!localToWorld.HasValue)
				{
					result = default(float3);
				}
				else
				{
					LocalToWorld valueOrDefault = localToWorld.GetValueOrDefault();
					result = ((LocalToWorld)(ref valueOrDefault)).Position;
				}
				return (float3)result;
			}
		}

		public UserContentFlags UserContent
		{
			get
			{
				//IL_001a: 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)
				User? user = base.Internals.User;
				return (UserContentFlags)(user.HasValue ? ((int)user.GetValueOrDefault().UserContent) : 0);
			}
		}

		internal UserModel(Entity entity)
			: base(entity)
		{
			//IL_0001: 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_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_0043: Unknown result type (might be due to invalid IL or missing references)
			Character = new CharacterModel((base.Internals.User?.LocalCharacter._Entity).Value);
			Inventory = new InventoryModel(Character);
		}
	}
}
namespace VRising.GameData.Models.Internals
{
	public class BaseEntityModel
	{
		private readonly World _world;

		public readonly Entity _entity;

		public SceneReference? SceneReference
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				SceneReference value;
				return _world.EntityManager.TryGetComponentDataInternal<SceneReference>(_entity, out value) ? new SceneReference?(value) : null;
			}
		}

		public RequestSceneLoaded? RequestSceneLoaded
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				RequestSceneLoaded value;
				return _world.EntityManager.TryGetComponentDataInternal<RequestSceneLoaded>(_entity, out value) ? new RequestSceneLoaded?(value) : null;
			}
		}

		public ResolvedSceneHash? ResolvedSceneHash
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ResolvedSceneHash value;
				return _world.EntityManager.TryGetComponentDataInternal<ResolvedSceneHash>(_entity, out value) ? new ResolvedSceneHash?(value) : null;
			}
		}

		public List<LinkedEntityGroup> LinkedEntityGroups => _world.EntityManager.GetBufferInternal<LinkedEntityGroup>(_entity);

		public List<ResolvedSectionEntity> ResolvedSectionEntities => _world.EntityManager.GetBufferInternal<ResolvedSectionEntity>(_entity);

		public PostLoadCommandBuffer PostLoadCommandBuffer
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				PostLoadCommandBuffer value;
				return _world.EntityManager.TryGetComponentDataInternal<PostLoadCommandBuffer>(_entity, out value) ? value : null;
			}
		}

		public ServerRuntimeSettings ServerRuntimeSettings
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				ServerRuntimeSettings value;
				return (ServerRuntimeSettings)(_world.EntityManager.TryGetComponentDataInternal<ServerRuntimeSettings>(_entity, out value) ? value : default(ServerRuntimeSettings));
			}
		}

		public bool Prefab => _world.EntityManager.HasComponentInternal<Prefab>(_entity);

		public NetworkedSettings? NetworkedSettings
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				NetworkedSettings value;
				return _world.EntityManager.TryGetComponentDataInternal<NetworkedSettings>(_entity, out value) ? new NetworkedSettings?(value) : null;
			}
		}

		public FrameChanged? FrameChanged
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				FrameChanged value;
				return _world.EntityManager.TryGetComponentDataInternal<FrameChanged>(_entity, out value) ? new FrameChanged?(value) : null;
			}
		}

		public NetworkSnapshot? NetworkSnapshot
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				NetworkSnapshot value;
				return _world.EntityManager.TryGetComponentDataInternal<NetworkSnapshot>(_entity, out value) ? new NetworkSnapshot?(value) : null;
			}
		}

		public DestroyedEntity? DestroyedEntity
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				DestroyedEntity value;
				return _world.EntityManager.TryGetComponentDataInternal<DestroyedEntity>(_entity, out value) ? new DestroyedEntity?(value) : null;
			}
		}

		public List<NetSnapshot> NetSnapshots => _world.EntityManager.GetBufferInternal<NetSnapshot>(_entity);

		public List<SnapshotFrameChangedBuffer> SnapshotFrameChangedBuffers => _world.EntityManager.GetBufferInternal<SnapshotFrameChangedBuffer>(_entity);

		public List<Snapshot_InventoryBuffer> Snapshot_InventoryBuffer => _world.EntityManager.GetBufferInternal<Snapshot_InventoryBuffer>(_entity);

		public List<Snapshot_PerksBuffer> Snapshot_PerksBuffer => _world.EntityManager.GetBufferInternal<Snapshot_PerksBuffer>(_entity);

		public bool NewDestroyedEntity => _world.EntityManager.HasComponentInternal<NewDestroyedEntity>(_entity);

		public WorldTypeSingleton? WorldTypeSingleton
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				WorldTypeSingleton value;
				return _world.EntityManager.TryGetComponentDataInternal<WorldTypeSingleton>(_entity, out value) ? new WorldTypeSingleton?(value) : null;
			}
		}

		public WorldFrame? WorldFrame
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				WorldFrame value;
				return _world.EntityManager.TryGetComponentDataInternal<WorldFrame>(_entity, out value) ? new WorldFrame?(value) : null;
			}
		}

		public TerrainChunkLoadedEvent? TerrainChunkLoadedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TerrainChunkLoadedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<TerrainChunkLoadedEvent>(_entity, out value) ? new TerrainChunkLoadedEvent?(value) : null;
			}
		}

		public List<PublicEntityRef> PublicEntityRefs => _world.EntityManager.GetBufferInternal<PublicEntityRef>(_entity);

		public TerrainChunkMetadataLoadedEvent? TerrainChunkMetadataLoadedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TerrainChunkMetadataLoadedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<TerrainChunkMetadataLoadedEvent>(_entity, out value) ? new TerrainChunkMetadataLoadedEvent?(value) : null;
			}
		}

		public LoadToTargetWorld? LoadToTargetWorld
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				LoadToTargetWorld value;
				return _world.EntityManager.TryGetComponentDataInternal<LoadToTargetWorld>(_entity, out value) ? new LoadToTargetWorld?(value) : null;
			}
		}

		public ServerGameBalanceSettings ServerGameBalanceSettings
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				ServerGameBalanceSettings value;
				return (ServerGameBalanceSettings)(_world.EntityManager.TryGetComponentDataInternal<ServerGameBalanceSettings>(_entity, out value) ? value : default(ServerGameBalanceSettings));
			}
		}

		public ToggleDisabledEvent? ToggleDisabledEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ToggleDisabledEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<ToggleDisabledEvent>(_entity, out value) ? new ToggleDisabledEvent?(value) : null;
			}
		}

		public List<Snapshot_CastleBuildingAttachedChildrenBuffer> Snapshot_CastleBuildingAttachedChildrenBuffer => _world.EntityManager.GetBufferInternal<Snapshot_CastleBuildingAttachedChildrenBuffer>(_entity);

		public List<Snapshot_CastleBuildingAttachToParentsBuffer> Snapshot_CastleBuildingAttachToParentsBuffer => _world.EntityManager.GetBufferInternal<Snapshot_CastleBuildingAttachToParentsBuffer>(_entity);

		public List<Snapshot_RefinementstationRecipesBuffer> Snapshot_RefinementstationRecipesBuffer => _world.EntityManager.GetBufferInternal<Snapshot_RefinementstationRecipesBuffer>(_entity);

		public List<Snapshot_ActiveServantMission> Snapshot_ActiveServantMission => _world.EntityManager.GetBufferInternal<Snapshot_ActiveServantMission>(_entity);

		public LocalToWorld? LocalToWorld
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				LocalToWorld value;
				return _world.EntityManager.TryGetComponentDataInternal<LocalToWorld>(_entity, out value) ? new LocalToWorld?(value) : null;
			}
		}

		public TileBounds? TileBounds
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TileBounds value;
				return _world.EntityManager.TryGetComponentDataInternal<TileBounds>(_entity, out value) ? new TileBounds?(value) : null;
			}
		}

		public TilePosition? TilePosition
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TilePosition value;
				return _world.EntityManager.TryGetComponentDataInternal<TilePosition>(_entity, out value) ? new TilePosition?(value) : null;
			}
		}

		public TileModelSpatialData? TileModelSpatialData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TileModelSpatialData value;
				return _world.EntityManager.TryGetComponentDataInternal<TileModelSpatialData>(_entity, out value) ? new TileModelSpatialData?(value) : null;
			}
		}

		public TileData TileData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				TileData value;
				return (TileData)(_world.EntityManager.TryGetComponentDataInternal<TileData>(_entity, out value) ? value : default(TileData));
			}
		}

		public MapZoneData? MapZoneData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				MapZoneData value;
				return _world.EntityManager.TryGetComponentDataInternal<MapZoneData>(_entity, out value) ? new MapZoneData?(value) : null;
			}
		}

		public TileModel? TileModel
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TileModel value;
				return _world.EntityManager.TryGetComponentDataInternal<TileModel>(_entity, out value) ? new TileModel?(value) : null;
			}
		}

		public List<MapZonePolygonVertexElement> MapZonePolygonVertexElements => _world.EntityManager.GetBufferInternal<MapZonePolygonVertexElement>(_entity);

		public List<MapZoneDiscoverableElement> MapZoneDiscoverableElements => _world.EntityManager.GetBufferInternal<MapZoneDiscoverableElement>(_entity);

		public bool TileRestrictionAreaTag => _world.EntityManager.HasComponentInternal<TileRestrictionAreaTag>(_entity);

		public bool TileModelRegistrationState => _world.EntityManager.HasComponentInternal<TileModelRegistrationState>(_entity);

		public RetainBlobAssets RetainBlobAssets
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				RetainBlobAssets value;
				return (RetainBlobAssets)(_world.EntityManager.TryGetComponentDataInternal<RetainBlobAssets>(_entity, out value) ? value : default(RetainBlobAssets));
			}
		}

		public RetainBlobAssetBatchPtr? RetainBlobAssetBatchPtr
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				RetainBlobAssetBatchPtr value;
				return _world.EntityManager.TryGetComponentDataInternal<RetainBlobAssetBatchPtr>(_entity, out value) ? new RetainBlobAssetBatchPtr?(value) : null;
			}
		}

		public bool BlobAssetOwner => _world.EntityManager.HasComponentInternal<BlobAssetOwner>(_entity);

		public List<WorldAssetChunks> WorldAssetChunks => _world.EntityManager.GetBufferInternal<WorldAssetChunks>(_entity);

		public bool WorldAssetSingleton => _world.EntityManager.HasComponentInternal<WorldAssetSingleton>(_entity);

		public bool WorldConfigSingleton => _world.EntityManager.HasComponentInternal<WorldConfigSingleton>(_entity);

		public List<RelicDropped> RelicDroppeds => _world.EntityManager.GetBufferInternal<RelicDropped>(_entity);

		public KnockbackAssetsSingleton? KnockbackAssetsSingleton
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				KnockbackAssetsSingleton value;
				return _world.EntityManager.TryGetComponentDataInternal<KnockbackAssetsSingleton>(_entity, out value) ? new KnockbackAssetsSingleton?(value) : null;
			}
		}

		public List<Snapshot_SpawnedUnitsBuffer> Snapshot_SpawnedUnitsBuffer => _world.EntityManager.GetBufferInternal<Snapshot_SpawnedUnitsBuffer>(_entity);

		public SceneEntityReference? SceneEntityReference
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				SceneEntityReference value;
				return _world.EntityManager.TryGetComponentDataInternal<SceneEntityReference>(_entity, out value) ? new SceneEntityReference?(value) : null;
			}
		}

		public SceneSectionData? SceneSectionData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				SceneSectionData value;
				return _world.EntityManager.TryGetComponentDataInternal<SceneSectionData>(_entity, out value) ? new SceneSectionData?(value) : null;
			}
		}

		public ResolvedSectionPath? ResolvedSectionPath
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ResolvedSectionPath value;
				return _world.EntityManager.TryGetComponentDataInternal<ResolvedSectionPath>(_entity, out value) ? new ResolvedSectionPath?(value) : null;
			}
		}

		public SceneBoundingVolume? SceneBoundingVolume
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				SceneBoundingVolume value;
				return _world.EntityManager.TryGetComponentDataInternal<SceneBoundingVolume>(_entity, out value) ? new SceneBoundingVolume?(value) : null;
			}
		}

		public PhysicsCollider PhysicsCollider
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				PhysicsCollider value;
				return (PhysicsCollider)(_world.EntityManager.TryGetComponentDataInternal<PhysicsCollider>(_entity, out value) ? value : default(PhysicsCollider));
			}
		}

		public StaticPhysicsWorldBodyIndex? StaticPhysicsWorldBodyIndex
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				StaticPhysicsWorldBodyIndex value;
				return _world.EntityManager.TryGetComponentDataInternal<StaticPhysicsWorldBodyIndex>(_entity, out value) ? new StaticPhysicsWorldBodyIndex?(value) : null;
			}
		}

		public ModifyMovementDuringCastActive? ModifyMovementDuringCastActive
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ModifyMovementDuringCastActive value;
				return _world.EntityManager.TryGetComponentDataInternal<ModifyMovementDuringCastActive>(_entity, out value) ? new ModifyMovementDuringCastActive?(value) : null;
			}
		}

		public DestroyData? DestroyData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				DestroyData value;
				return _world.EntityManager.TryGetComponentDataInternal<DestroyData>(_entity, out value) ? new DestroyData?(value) : null;
			}
		}

		public DestroyState? DestroyState
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				DestroyState value;
				return _world.EntityManager.TryGetComponentDataInternal<DestroyState>(_entity, out value) ? new DestroyState?(value) : null;
			}
		}

		public MoveDuringCastActive? MoveDuringCastActive
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				MoveDuringCastActive value;
				return _world.EntityManager.TryGetComponentDataInternal<MoveDuringCastActive>(_entity, out value) ? new MoveDuringCastActive?(value) : null;
			}
		}

		public List<Snapshot_QueuedWorkstationCraftAction> Snapshot_QueuedWorkstationCraftAction => _world.EntityManager.GetBufferInternal<Snapshot_QueuedWorkstationCraftAction>(_entity);

		public RotateTowardsAimDirectionDuringCastActive? RotateTowardsAimDirectionDuringCastActive
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				RotateTowardsAimDirectionDuringCastActive value;
				return _world.EntityManager.TryGetComponentDataInternal<RotateTowardsAimDirectionDuringCastActive>(_entity, out value) ? new RotateTowardsAimDirectionDuringCastActive?(value) : null;
			}
		}

		public List<Snapshot_ResearchBuffer> Snapshot_ResearchBuffer => _world.EntityManager.GetBufferInternal<Snapshot_ResearchBuffer>(_entity);

		public AbilityCastStartedEvent? AbilityCastStartedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AbilityCastStartedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<AbilityCastStartedEvent>(_entity, out value) ? new AbilityCastStartedEvent?(value) : null;
			}
		}

		public List<Snapshot_AllyPermission> Snapshot_AllyPermission => _world.EntityManager.GetBufferInternal<Snapshot_AllyPermission>(_entity);

		public List<Snapshot_RespawnPointOwnerBuffer> Snapshot_RespawnPointOwnerBuffer => _world.EntityManager.GetBufferInternal<Snapshot_RespawnPointOwnerBuffer>(_entity);

		public List<Snapshot_UnlockedWaypointElement> Snapshot_UnlockedWaypointElement => _world.EntityManager.GetBufferInternal<Snapshot_UnlockedWaypointElement>(_entity);

		public List<Snapshot_UserMapZoneElement> Snapshot_UserMapZoneElement => _world.EntityManager.GetBufferInternal<Snapshot_UserMapZoneElement>(_entity);

		public AbilityPostCastFinishedEvent? AbilityPostCastFinishedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AbilityPostCastFinishedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<AbilityPostCastFinishedEvent>(_entity, out value) ? new AbilityPostCastFinishedEvent?(value) : null;
			}
		}

		public List<Snapshot_FollowerBuffer> Snapshot_FollowerBuffer => _world.EntityManager.GetBufferInternal<Snapshot_FollowerBuffer>(_entity);

		public AbilityCastEndedEvent? AbilityCastEndedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AbilityCastEndedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<AbilityCastEndedEvent>(_entity, out value) ? new AbilityCastEndedEvent?(value) : null;
			}
		}

		public AbilityPostCastEndedEvent? AbilityPostCastEndedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AbilityPostCastEndedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<AbilityPostCastEndedEvent>(_entity, out value) ? new AbilityPostCastEndedEvent?(value) : null;
			}
		}

		public List<Snapshot_AbilityStateBuffer> Snapshot_AbilityStateBuffer => _world.EntityManager.GetBufferInternal<Snapshot_AbilityStateBuffer>(_entity);

		public AbilityInterruptedEvent? AbilityInterruptedEvent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AbilityInterruptedEvent value;
				return _world.EntityManager.TryGetComponentDataInternal<AbilityInterruptedEvent>(_entity, out value) ? new AbilityInterruptedEvent?(value) : null;
			}
		}

		public TeleportationRequest? TeleportationRequest
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				TeleportationRequest value;
				return _world.EntityManager.TryGetComponentDataInternal<TeleportationRequest>(_entity, out value) ? new TeleportationRequest?(value) : null;
			}
		}

		public List<Snapshot_Restricted_InventoryBuffer> Snapshot_Restricted_InventoryBuffer => _world.EntityManager.GetBufferInternal<Snapshot_Restricted_InventoryBuffer>(_entity);

		public List<Snapshot_AchievementInProgressElement> Snapshot_AchievementInProgressElement => _world.EntityManager.GetBufferInternal<Snapshot_AchievementInProgressElement>(_entity);

		public PhysicsStep? PhysicsStep
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				PhysicsStep value;
				return _world.EntityManager.TryGetComponentDataInternal<PhysicsStep>(_entity, out value) ? new PhysicsStep?(value) : null;
			}
		}

		public WorldTime? WorldTime
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				WorldTime value;
				return _world.EntityManager.TryGetComponentDataInternal<WorldTime>(_entity, out value) ? new WorldTime?(value) : null;
			}
		}

		public List<WorldTimeQueue> WorldTimeQueues => _world.EntityManager.GetBufferInternal<WorldTimeQueue>(_entity);

		public Sun? Sun
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Sun value;
				return _world.EntityManager.TryGetComponentDataInternal<Sun>(_entity, out value) ? new Sun?(value) : null;
			}
		}

		public CloudCookieLight CloudCookieLight
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				CloudCookieLight value;
				return _world.EntityManager.TryGetComponentDataInternal<CloudCookieLight>(_entity, out value) ? value : null;
			}
		}

		public List<Snapshot_ProgressionBookBlueprintElement> Snapshot_ProgressionBookBlueprintElement => _world.EntityManager.GetBufferInternal<Snapshot_ProgressionBookBlueprintElement>(_entity);

		public List<Snapshot_ProgressionBookRecipeElement> Snapshot_ProgressionBookRecipeElement => _world.EntityManager.GetBufferInternal<Snapshot_ProgressionBookRecipeElement>(_entity);

		public List<Snapshot_ProgressionBookShapeshiftElement> Snapshot_ProgressionBookShapeshiftElement => _world.EntityManager.GetBufferInternal<Snapshot_ProgressionBookShapeshiftElement>(_entity);

		public List<Snapshot_ProgressionBookTechElement> Snapshot_ProgressionBookTechElement => _world.EntityManager.GetBufferInternal<Snapshot_ProgressionBookTechElement>(_entity);

		public List<Snapshot_BloodHuntBuffer> Snapshot_BloodHuntBuffer => _world.EntityManager.GetBufferInternal<Snapshot_BloodHuntBuffer>(_entity);

		public Rotation? Rotation
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Rotation value;
				return _world.EntityManager.TryGetComponentDataInternal<Rotation>(_entity, out value) ? new Rotation?(value) : null;
			}
		}

		public Translation? Translation
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Translation value;
				return _world.EntityManager.TryGetComponentDataInternal<Translation>(_entity, out value) ? new Translation?(value) : null;
			}
		}

		public PrefabGUID? PrefabGUID
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				PrefabGUID value;
				return _world.EntityManager.TryGetComponentDataInternal<PrefabGUID>(_entity, out value) ? new PrefabGUID?(value) : null;
			}
		}

		public AiPointOfInterest? AiPointOfInterest
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AiPointOfInterest value;
				return _world.EntityManager.TryGetComponentDataInternal<AiPointOfInterest>(_entity, out value) ? new AiPointOfInterest?(value) : null;
			}
		}

		public AutoChainInstanceData? AutoChainInstanceData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				AutoChainInstanceData value;
				return _world.EntityManager.TryGetComponentDataInternal<AutoChainInstanceData>(_entity, out value) ? new AutoChainInstanceData?(value) : null;
			}
		}

		public bool SpawnTag => _world.EntityManager.HasComponentInternal<SpawnTag>(_entity);

		public bool PrefabCollectionPrefabTag => _world.EntityManager.HasComponentInternal<PrefabCollectionPrefabTag>(_entity);

		public bool UsesSpawnTag => _world.EntityManager.HasComponentInternal<UsesSpawnTag>(_entity);

		public bool DisableWhenNoPlayersInRange => _world.EntityManager.HasComponentInternal<DisableWhenNoPlayersInRange>(_entity);

		public List<EntityNameCollectionBuffer> EntityNameCollectionBuffers => _world.EntityManager.GetBufferInternal<EntityNameCollectionBuffer>(_entity);

		public List<PrefabCollectionBuffer> PrefabCollectionBuffers => _world.EntityManager.GetBufferInternal<PrefabCollectionBuffer>(_entity);

		public bool PrefabCollectionTag => _world.EntityManager.HasComponentInternal<PrefabCollectionTag>(_entity);

		public bool GameDataSubSceneTag => _world.EntityManager.HasComponentInternal<GameDataSubSceneTag>(_entity);

		public RandomizedSpawnChain? RandomizedSpawnChain
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				RandomizedSpawnChain value;
				return _world.EntityManager.TryGetComponentDataInternal<RandomizedSpawnChain>(_entity, out value) ? new RandomizedSpawnChain?(value) : null;
			}
		}

		public StaticTransformIndex? StaticTransformIndex
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				StaticTransformIndex value;
				return _world.EntityManager.TryGetComponentDataInternal<StaticTransformIndex>(_entity, out value) ? new StaticTransformIndex?(value) : null;
			}
		}

		public BlueprintData? BlueprintData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				BlueprintData value;
				return _world.EntityManager.TryGetComponentDataInternal<BlueprintData>(_entity, out value) ? new BlueprintData?(value) : null;
			}
		}

		public Team? Team
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Team value;
				return _world.EntityManager.TryGetComponentDataInternal<Team>(_entity, out value) ? new Team?(value) : null;
			}
		}

		public EditableTileModel? EditableTileModel
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				EditableTileModel value;
				return _world.EntityManager.TryGetComponentDataInternal<EditableTileModel>(_entity, out value) ? new EditableTileModel?(value) : null;
			}
		}

		public CastleHeartConnection? CastleHeartConnection
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleHeartConnection value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleHeartConnection>(_entity, out value) ? new CastleHeartConnection?(value) : null;
			}
		}

		public DismantleDestroyData? DismantleDestroyData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				DismantleDestroyData value;
				return _world.EntityManager.TryGetComponentDataInternal<DismantleDestroyData>(_entity, out value) ? new DismantleDestroyData?(value) : null;
			}
		}

		public JoinDefaultTeamOnSpawn? JoinDefaultTeamOnSpawn
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				JoinDefaultTeamOnSpawn value;
				return _world.EntityManager.TryGetComponentDataInternal<JoinDefaultTeamOnSpawn>(_entity, out value) ? new JoinDefaultTeamOnSpawn?(value) : null;
			}
		}

		public UpToDateUserBitMask? UpToDateUserBitMask
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				UpToDateUserBitMask value;
				return _world.EntityManager.TryGetComponentDataInternal<UpToDateUserBitMask>(_entity, out value) ? new UpToDateUserBitMask?(value) : null;
			}
		}

		public NetworkId? NetworkId
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				NetworkId value;
				return _world.EntityManager.TryGetComponentDataInternal<NetworkId>(_entity, out value) ? new NetworkId?(value) : null;
			}
		}

		public CastleBuildingMaxRange? CastleBuildingMaxRange
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleBuildingMaxRange value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleBuildingMaxRange>(_entity, out value) ? new CastleBuildingMaxRange?(value) : null;
			}
		}

		public PlacementDestroyData? PlacementDestroyData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				PlacementDestroyData value;
				return _world.EntityManager.TryGetComponentDataInternal<PlacementDestroyData>(_entity, out value) ? new PlacementDestroyData?(value) : null;
			}
		}

		public CastleAreaRequirement? CastleAreaRequirement
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleAreaRequirement value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleAreaRequirement>(_entity, out value) ? new CastleAreaRequirement?(value) : null;
			}
		}

		public List<NetworkedEntityModificationBuffer> NetworkedEntityModificationBuffers => _world.EntityManager.GetBufferInternal<NetworkedEntityModificationBuffer>(_entity);

		public List<CastleBuildingAttachedChildrenBuffer> CastleBuildingAttachedChildrenBuffers => _world.EntityManager.GetBufferInternal<CastleBuildingAttachedChildrenBuffer>(_entity);

		public List<BlueprintRequirementBuffer> BlueprintRequirementBuffers => _world.EntityManager.GetBufferInternal<BlueprintRequirementBuffer>(_entity);

		public bool TilePlacementTag => _world.EntityManager.HasComponentInternal<TilePlacementTag>(_entity);

		public bool Networked => _world.EntityManager.HasComponentInternal<Networked>(_entity);

		public bool RunCastleCleanupOnDeath => _world.EntityManager.HasComponentInternal<RunCastleCleanupOnDeath>(_entity);

		public bool RestrictPlacementToMapZones => _world.EntityManager.HasComponentInternal<RestrictPlacementToMapZones>(_entity);

		public bool NetworkSnapshotType => _world.EntityManager.HasComponentInternal<NetworkSnapshotType>(_entity);

		public bool TileModelLayer => _world.EntityManager.HasComponentInternal<TileModelLayer>(_entity);

		public BuffResistances? BuffResistances
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				BuffResistances value;
				return _world.EntityManager.TryGetComponentDataInternal<BuffResistances>(_entity, out value) ? new BuffResistances?(value) : null;
			}
		}

		public Script_ApplyBuffUnderHealthThreshhold_DataServer? Script_ApplyBuffUnderHealthThreshhold_DataServer
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Script_ApplyBuffUnderHealthThreshhold_DataServer value;
				return _world.EntityManager.TryGetComponentDataInternal<Script_ApplyBuffUnderHealthThreshhold_DataServer>(_entity, out value) ? new Script_ApplyBuffUnderHealthThreshhold_DataServer?(value) : null;
			}
		}

		public Buffable? Buffable
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Buffable value;
				return _world.EntityManager.TryGetComponentDataInternal<Buffable>(_entity, out value) ? new Buffable?(value) : null;
			}
		}

		public CreatedTime? CreatedTime
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CreatedTime value;
				return _world.EntityManager.TryGetComponentDataInternal<CreatedTime>(_entity, out value) ? new CreatedTime?(value) : null;
			}
		}

		public Health? Health
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Health value;
				return _world.EntityManager.TryGetComponentDataInternal<Health>(_entity, out value) ? new Health?(value) : null;
			}
		}

		public HealthConstants? HealthConstants
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				HealthConstants value;
				return _world.EntityManager.TryGetComponentDataInternal<HealthConstants>(_entity, out value) ? new HealthConstants?(value) : null;
			}
		}

		public Immortal? Immortal
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Immortal value;
				return _world.EntityManager.TryGetComponentDataInternal<Immortal>(_entity, out value) ? new Immortal?(value) : null;
			}
		}

		public CollisionRadius? CollisionRadius
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CollisionRadius value;
				return _world.EntityManager.TryGetComponentDataInternal<CollisionRadius>(_entity, out value) ? new CollisionRadius?(value) : null;
			}
		}

		public ArmorLevel? ArmorLevel
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ArmorLevel value;
				return _world.EntityManager.TryGetComponentDataInternal<ArmorLevel>(_entity, out value) ? new ArmorLevel?(value) : null;
			}
		}

		public EntityCategory? EntityCategory
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				EntityCategory value;
				return _world.EntityManager.TryGetComponentDataInternal<EntityCategory>(_entity, out value) ? new EntityCategory?(value) : null;
			}
		}

		public StaticTransformCompatible? StaticTransformCompatible
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				StaticTransformCompatible value;
				return _world.EntityManager.TryGetComponentDataInternal<StaticTransformCompatible>(_entity, out value) ? new StaticTransformCompatible?(value) : null;
			}
		}

		public ImpactMaterial? ImpactMaterial
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ImpactMaterial value;
				return _world.EntityManager.TryGetComponentDataInternal<ImpactMaterial>(_entity, out value) ? new ImpactMaterial?(value) : null;
			}
		}

		public CastleDecayAndRegen? CastleDecayAndRegen
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleDecayAndRegen value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleDecayAndRegen>(_entity, out value) ? new CastleDecayAndRegen?(value) : null;
			}
		}

		public StaticHierarchyData StaticHierarchyData
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				StaticHierarchyData value;
				return (StaticHierarchyData)(_world.EntityManager.TryGetComponentDataInternal<StaticHierarchyData>(_entity, out value) ? value : default(StaticHierarchyData));
			}
		}

		public List<BoolModificationBuffer> BoolModificationBuffers => _world.EntityManager.GetBufferInternal<BoolModificationBuffer>(_entity);

		public List<EntityModificationBuffer> EntityModificationBuffers => _world.EntityManager.GetBufferInternal<EntityModificationBuffer>(_entity);

		public List<FloatModificationBuffer> FloatModificationBuffers => _world.EntityManager.GetBufferInternal<FloatModificationBuffer>(_entity);

		public List<IntModificationBuffer> IntModificationBuffers => _world.EntityManager.GetBufferInternal<IntModificationBuffer>(_entity);

		public List<StaticHierarchyBuffer> StaticHierarchyBuffers => _world.EntityManager.GetBufferInternal<StaticHierarchyBuffer>(_entity);

		public List<CastleBuildingAttachToParentsBuffer> CastleBuildingAttachToParentsBuffers => _world.EntityManager.GetBufferInternal<CastleBuildingAttachToParentsBuffer>(_entity);

		public List<CreateGameplayEventsOnSpawn> CreateGameplayEventsOnSpawns => _world.EntityManager.GetBufferInternal<CreateGameplayEventsOnSpawn>(_entity);

		public List<ApplyBuffOnGameplayEvent> ApplyBuffOnGameplayEvents => _world.EntityManager.GetBufferInternal<ApplyBuffOnGameplayEvent>(_entity);

		public List<GameplayEventIdMapping> GameplayEventIdMappings => _world.EntityManager.GetBufferInternal<GameplayEventIdMapping>(_entity);

		public bool TileCollisionTag => _world.EntityManager.HasComponentInternal<TileCollisionTag>(_entity);

		public bool TilePathfindingTag => _world.EntityManager.HasComponentInternal<TilePathfindingTag>(_entity);

		public bool TileLineOfSightTag => _world.EntityManager.HasComponentInternal<TileLineOfSightTag>(_entity);

		public bool ScriptSpawn => _world.EntityManager.HasComponentInternal<ScriptSpawn>(_entity);

		public bool MoveStopTrigger => _world.EntityManager.HasComponentInternal<MoveStopTrigger>(_entity);

		public ProgressionUserContentDependency? ProgressionUserContentDependency
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ProgressionUserContentDependency value;
				return _world.EntityManager.TryGetComponentDataInternal<ProgressionUserContentDependency>(_entity, out value) ? new ProgressionUserContentDependency?(value) : null;
			}
		}

		public PavementBonusSource? PavementBonusSource
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				PavementBonusSource value;
				return _world.EntityManager.TryGetComponentDataInternal<PavementBonusSource>(_entity, out value) ? new PavementBonusSource?(value) : null;
			}
		}

		public Parent? Parent
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Parent value;
				return _world.EntityManager.TryGetComponentDataInternal<Parent>(_entity, out value) ? new Parent?(value) : null;
			}
		}

		public RotateAroundAxis? RotateAroundAxis
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				RotateAroundAxis value;
				return _world.EntityManager.TryGetComponentDataInternal<RotateAroundAxis>(_entity, out value) ? new RotateAroundAxis?(value) : null;
			}
		}

		public bool CastleBuildingShowOnlyInPreview => _world.EntityManager.HasComponentInternal<CastleBuildingShowOnlyInPreview>(_entity);

		public InventoryOwner? InventoryOwner
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				InventoryOwner value;
				return _world.EntityManager.TryGetComponentDataInternal<InventoryOwner>(_entity, out value) ? new InventoryOwner?(value) : null;
			}
		}

		public Refinementstation? Refinementstation
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Refinementstation value;
				return _world.EntityManager.TryGetComponentDataInternal<Refinementstation>(_entity, out value) ? new Refinementstation?(value) : null;
			}
		}

		public WorkstationAssignedServant? WorkstationAssignedServant
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				WorkstationAssignedServant value;
				return _world.EntityManager.TryGetComponentDataInternal<WorkstationAssignedServant>(_entity, out value) ? new WorkstationAssignedServant?(value) : null;
			}
		}

		public CastleRoomConnection? CastleRoomConnection
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleRoomConnection value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleRoomConnection>(_entity, out value) ? new CastleRoomConnection?(value) : null;
			}
		}

		public ServantInteractPointLocalTransform? ServantInteractPointLocalTransform
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				ServantInteractPointLocalTransform value;
				return _world.EntityManager.TryGetComponentDataInternal<ServantInteractPointLocalTransform>(_entity, out value) ? new ServantInteractPointLocalTransform?(value) : null;
			}
		}

		public StationServants? StationServants
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				StationServants value;
				return _world.EntityManager.TryGetComponentDataInternal<StationServants>(_entity, out value) ? new StationServants?(value) : null;
			}
		}

		public CastleWorkstation? CastleWorkstation
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleWorkstation value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleWorkstation>(_entity, out value) ? new CastleWorkstation?(value) : null;
			}
		}

		public CastleBuildingAttachSettings? CastleBuildingAttachSettings
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleBuildingAttachSettings value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleBuildingAttachSettings>(_entity, out value) ? new CastleBuildingAttachSettings?(value) : null;
			}
		}

		public Interactable? Interactable
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Interactable value;
				return _world.EntityManager.TryGetComponentDataInternal<Interactable>(_entity, out value) ? new Interactable?(value) : null;
			}
		}

		public InteractedUpon? InteractedUpon
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				InteractedUpon value;
				return _world.EntityManager.TryGetComponentDataInternal<InteractedUpon>(_entity, out value) ? new InteractedUpon?(value) : null;
			}
		}

		public List<InventoryBuffer> InventoryBuffers => _world.EntityManager.GetBufferInternal<InventoryBuffer>(_entity);

		public List<StationBonusBuffer> StationBonusBuffers => _world.EntityManager.GetBufferInternal<StationBonusBuffer>(_entity);

		public List<RefinementstationRecipesBuffer> RefinementstationRecipesBuffers => _world.EntityManager.GetBufferInternal<RefinementstationRecipesBuffer>(_entity);

		public List<InteractAbilityBuffer> InteractAbilityBuffers => _world.EntityManager.GetBufferInternal<InteractAbilityBuffer>(_entity);

		public bool TileHeightTag => _world.EntityManager.HasComponentInternal<TileHeightTag>(_entity);

		public bool PickParentTag => _world.EntityManager.HasComponentInternal<PickParentTag>(_entity);

		public bool WallpaperSet => _world.EntityManager.HasComponentInternal<WallpaperSet>(_entity);

		public List<DoorChildren> DoorChildrens => _world.EntityManager.GetBufferInternal<DoorChildren>(_entity);

		public bool ChildPrefabTag => _world.EntityManager.HasComponentInternal<ChildPrefabTag>(_entity);

		public NetherSpawnPosition? NetherSpawnPosition
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				NetherSpawnPosition value;
				return _world.EntityManager.TryGetComponentDataInternal<NetherSpawnPosition>(_entity, out value) ? new NetherSpawnPosition?(value) : null;
			}
		}

		public CastleLimited? CastleLimited
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleLimited value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleLimited>(_entity, out value) ? new CastleLimited?(value) : null;
			}
		}

		public HybridModelSeed? HybridModelSeed
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				HybridModelSeed value;
				return _world.EntityManager.TryGetComponentDataInternal<HybridModelSeed>(_entity, out value) ? new HybridModelSeed?(value) : null;
			}
		}

		public NameableInteractable? NameableInteractable
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				NameableInteractable value;
				return _world.EntityManager.TryGetComponentDataInternal<NameableInteractable>(_entity, out value) ? new NameableInteractable?(value) : null;
			}
		}

		public PrisonCell? PrisonCell
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				PrisonCell value;
				return _world.EntityManager.TryGetComponentDataInternal<PrisonCell>(_entity, out value) ? new PrisonCell?(value) : null;
			}
		}

		public EntityOwner? EntityOwner
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				EntityOwner value;
				return _world.EntityManager.TryGetComponentDataInternal<EntityOwner>(_entity, out value) ? new EntityOwner?(value) : null;
			}
		}

		public EntityCreator? EntityCreator
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				EntityCreator value;
				return _world.EntityManager.TryGetComponentDataInternal<EntityCreator>(_entity, out value) ? new EntityCreator?(value) : null;
			}
		}

		public Prisonstation? Prisonstation
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Prisonstation value;
				return _world.EntityManager.TryGetComponentDataInternal<Prisonstation>(_entity, out value) ? new Prisonstation?(value) : null;
			}
		}

		public List<QueuedWorkstationCraftAction> QueuedWorkstationCraftActions => _world.EntityManager.GetBufferInternal<QueuedWorkstationCraftAction>(_entity);

		public List<QueuedWorkstationCraftActionItems> QueuedWorkstationCraftActionItems => _world.EntityManager.GetBufferInternal<QueuedWorkstationCraftActionItems>(_entity);

		public List<WorkstationRecipesBuffer> WorkstationRecipesBuffers => _world.EntityManager.GetBufferInternal<WorkstationRecipesBuffer>(_entity);

		public UserOwner? UserOwner
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				UserOwner value;
				return _world.EntityManager.TryGetComponentDataInternal<UserOwner>(_entity, out value) ? new UserOwner?(value) : null;
			}
		}

		public Pylonstation? Pylonstation
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				Pylonstation value;
				return _world.EntityManager.TryGetComponentDataInternal<Pylonstation>(_entity, out value) ? new Pylonstation?(value) : null;
			}
		}

		public CastleFloor? CastleFloor
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleFloor value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleFloor>(_entity, out value) ? new CastleFloor?(value) : null;
			}
		}

		public CastleFloorRoof? CastleFloorRoof
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleFloorRoof value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleFloorRoof>(_entity, out value) ? new CastleFloorRoof?(value) : null;
			}
		}

		public MapPylonArea? MapPylonArea
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				MapPylonArea value;
				return _world.EntityManager.TryGetComponentDataInternal<MapPylonArea>(_entity, out value) ? new MapPylonArea?(value) : null;
			}
		}

		public CastleHeart? CastleHeart
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				CastleHeart value;
				return _world.EntityManager.TryGetComponentDataInternal<CastleHeart>(_entity, out value) ? new CastleHeart?(value) : null;
			}
		}

		public DurabilityTarget? DurabilityTarget
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				DurabilityTarget value;
				return _world.EntityManager.TryGetComponentDataInternal<DurabilityTarget>(_entity, out value) ? new DurabilityTarget?(value) : null;
			}
		}

		public List<Restricted_InventoryBuffer> Restricted_InventoryBuffer => _world.EntityManager.GetBufferInternal<Restricted_InventoryBuffer>(_entity);

		public List<AttachMapIconsToEntity> AttachMapIconsToEntities => _world.EntityManager.GetBufferInternal<AttachMapIconsToEntity>(_entity);

		public List<MapIconPerUserData> MapIconPerUserDatas => _world.EntityManager.GetBufferInternal<MapIconPerUserData>(_entity);

		public List<PylonstationUpgradesBuffer> PylonstationUpgradesBuffers => _world.EntityManager.GetBufferInternal<PylonstationUpgradesBuffer>(_entity);

		public List<PylonstationCastleClaimBuffer> PylonstationCastleClaimBuffers => _world.EntityManager.GetBufferInternal<PylonstationCastleClaimBuffer>(_entity);

		public List<PylonstationCastleDestroyBuffer> PylonstationCastleDestroyBuffers => _world.EntityManager.GetBufferInternal<PylonstationCastleDestroyBuffer>(_entity);

		public List<ProgressionDependencyElement> ProgressionDependencyElements => _world.EntityManager.GetBufferInternal<ProgressionDependencyElement>(_entity);

		public Door Door
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				Door value;
				return (Door)(_world.EntityManager.TryGetComponentDataInternal<Door>(_entity, out value) ? value : default(Door));
			}
		}

		public bool AnnounceCastleBreached => _world.EntityManager.HasComponentInternal<AnnounceCastleBreached>(_entity);

		public BloodAltar? BloodAltar
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				BloodAltar value;
				return _world.EntityManager.TryGetComponentDataInternal<BloodAltar>(_entity, out value) ? new BloodAltar?(value) : null;
			}
		}

		public List<BloodHuntBuffer> BloodHuntBuffers => _world.EntityManager.GetBufferInternal<BloodHuntBuffer>(_entity);

		public StartGraveyardExitWaypoint? StartGraveyardExitWaypoint
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: 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)
				StartGraveyardExitWaypoint value;
				return _world.EntityManager.TryGetComponentDataInternal<StartGraveyardExitWaypoint>(_entity, out value) ? new StartGraveyardExitWaypoint?(value) : null;
			}
		}

		public bool AlwaysNetworked => _world.EntityManager.HasComponentInternal<AlwaysNetworked>(_entity);

		public CastleWall? CastleWall
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (mig