Decompiled source of SanguinePact v1.0.0

SanguinePact.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
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 System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using BepInEx.Unity.IL2CPP.Utils.Collections;
using HarmonyLib;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Microsoft.CodeAnalysis;
using ProjectM;
using ProjectM.Network;
using ProjectM.Physics;
using ProjectM.Scripting;
using ProjectM.Shared;
using SanguinePact.Common;
using SanguinePact.Common.Commands.Converters;
using SanguinePact.Common.KindredCommands.Data;
using SanguinePact.Common.KindredCommands.Models;
using SanguinePact.Common.KindredCommands.Services;
using SanguinePact.Common.Utils;
using SanguinePact.SanguinePact.Services;
using Stunlock.Core;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
using UnityEngine;
using VampireCommandFramework;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("dokebi")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Trade defense for offense.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+2390b7c0e19cea1f5539b599c8c982eed3e091fd")]
[assembly: AssemblyProduct("SanguinePact")]
[assembly: AssemblyTitle("SanguinePact")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.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;
		}
	}
}
namespace SanguinePact
{
	[BepInPlugin("dokebi21.SanguinePact", "SanguinePact", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BasePlugin
	{
		internal static Harmony Harmony;

		private const float DefaultDamageMultiplier = 2f;

		private const float DefaultResistMultiplier = 4f;

		public static ConfigEntry<float> DamageMultiplier;

		public static ConfigEntry<float> ResistMultiplier;

		public static ManualLogSource LogInstance { get; private set; }

		public override void Load()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			if (!(Application.productName != "VRisingServer"))
			{
				ManualLogSource log = ((BasePlugin)this).Log;
				bool flag = default(bool);
				BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(27, 2, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("dokebi21.SanguinePact");
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" version ");
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("1.0.0");
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loaded!");
				}
				log.LogInfo(val);
				LogInstance = ((BasePlugin)this).Log;
				Harmony = new Harmony("dokebi21.SanguinePact");
				Harmony.PatchAll(Assembly.GetExecutingAssembly());
				CommandRegistry.RegisterAll();
				InitConfig();
			}
		}

		private void InitConfig()
		{
			DamageMultiplier = ((BasePlugin)this).Config.Bind<float>("DamageMultiplier", "multiplier", 2f, "Damage multiplier. 2 means 2x damage.");
			ResistMultiplier = ((BasePlugin)this).Config.Bind<float>("ResistMultiplier", "multiplier", 4f, "Resist multiplier. 4 means 4x damage.");
		}

		public override bool Unload()
		{
			CommandRegistry.UnregisterAssembly();
			Harmony.UnpatchSelf();
			return true;
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "dokebi21.SanguinePact";

		public const string PLUGIN_NAME = "SanguinePact";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace SanguinePact.SanguinePact.Services
{
	internal class SanguinePactService
	{
		private List<ModifyUnitStatBuff_DOTS> sanguinePactBuffs;

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

		public SanguinePactService()
		{
			//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_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_0030: 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)
			Enumerator<Entity> enumerator = Helper.GetEntitiesByComponentType<PlayerCharacter>(includeAll: false, includeDisabled: true).GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity current = enumerator.Current;
				sanguinePactBuffs = CreateSanguinePactBuffs();
				LoadSanguinePactPlayers(current);
			}
		}

		public bool IsSanguinePactPlayer(Entity charEntity)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return sanguinePactPlayers.Contains(charEntity);
		}

		public IEnumerable<Entity> GetSanguinePactPlayers()
		{
			Enumerator<Entity> enumerator = Helper.GetEntitiesByComponentType<PlayerCharacter>(includeAll: false, includeDisabled: true).GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity charEntity = enumerator.Current;
				if (IsSanguinePactPlayer(charEntity))
				{
					yield return charEntity;
				}
			}
		}

		public bool ToggleSanguinePact(Entity charEntity)
		{
			//IL_0002: 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_0013: Unknown result type (might be due to invalid IL or missing references)
			if (IsSanguinePactPlayer(charEntity))
			{
				sanguinePactPlayers.Remove(charEntity);
				return false;
			}
			sanguinePactPlayers.Add(charEntity);
			return true;
		}

		private void LoadSanguinePactPlayers(Entity charEntity)
		{
			//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_001f: 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_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_0049: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Invalid comparison between Unknown and I4
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			Entity entity = default(Entity);
			if (!BuffUtility.TryGetBuff(Core.Server.EntityManager, charEntity, PrefabIdentifier.op_Implicit(Prefabs.SanguinePactBuff), ref entity) || !entity.Has<ModifyUnitStatBuff_DOTS>())
			{
				return;
			}
			Enumerator<ModifyUnitStatBuff_DOTS> enumerator = entity.ReadBuffer<ModifyUnitStatBuff_DOTS>().GetEnumerator();
			while (enumerator.MoveNext())
			{
				ModifyUnitStatBuff_DOTS current = enumerator.Current;
				UnitStatType statType = current.StatType;
				UnitStatType val = statType;
				if ((int)val == 51)
				{
					sanguinePactPlayers.Add(charEntity);
				}
			}
		}

		public void UpdateSanguinePactPlayer(Entity charEntity)
		{
			//IL_0002: 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_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_0028: 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)
			if (!IsSanguinePactPlayer(charEntity))
			{
				ClearSanguinePactBuff(charEntity);
				return;
			}
			Entity userEntity = charEntity.Read<PlayerCharacter>().UserEntity;
			Core.StartCoroutine(RemoveAndAddSanguinePactBuff(userEntity, charEntity));
		}

		private IEnumerator RemoveAndAddSanguinePactBuff(Entity userEntity, Entity charEntity)
		{
			//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_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			Buffs.RemoveBuff(charEntity, Prefabs.SanguinePactBuff);
			while (BuffUtility.HasBuff(Core.EntityManager, charEntity, PrefabIdentifier.op_Implicit(Prefabs.SanguinePactBuff)))
			{
				yield return null;
			}
			Buffs.AddBuff(userEntity, charEntity, Prefabs.SanguinePactBuff, -1);
		}

		public void UpdateSanguinePactBuff(Entity buffEntity)
		{
			//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_0007: 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_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_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_001c: 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_007a: 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_0094: 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_009e: 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_00a2: 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_004a: 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_004f: 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)
			Entity owner = buffEntity.Read<EntityOwner>().Owner;
			EntityManager entityManager = Core.EntityManager;
			DynamicBuffer<ModifyUnitStatBuff_DOTS> val = ((EntityManager)(ref entityManager)).AddBuffer<ModifyUnitStatBuff_DOTS>(buffEntity);
			val.Clear();
			if (IsSanguinePactPlayer(owner))
			{
				foreach (ModifyUnitStatBuff_DOTS sanguinePactBuff in sanguinePactBuffs)
				{
					ModifyUnitStatBuff_DOTS val2 = sanguinePactBuff;
					val.Add(val2);
				}
			}
			long modificationTypes = 0L;
			buffEntity.Add<BuffModificationFlagData>();
			BuffModificationFlagData val3 = default(BuffModificationFlagData);
			val3.ModificationTypes = modificationTypes;
			val3.ModificationId = ModificationId.NewId(0);
			BuffModificationFlagData componentData = val3;
			buffEntity.Write<BuffModificationFlagData>(componentData);
		}

		private void ClearSanguinePactBuff(Entity charEntity)
		{
			//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)
			Buffs.RemoveBuff(charEntity, Prefabs.SanguinePactBuff);
		}

		public static List<ModifyUnitStatBuff_DOTS> CreateSanguinePactBuffs()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_005d: 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_0062: 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_007c: 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_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_009f: 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_00b9: 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_00d7: 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_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: 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_0125: 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_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: 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_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: 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_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_0372: Unknown result type (might be due to invalid IL or missing references)
			float value = (Plugin.ResistMultiplier.Value - 1f) * -1f;
			float value2 = Plugin.DamageMultiplier.Value;
			ModifyUnitStatBuff_DOTS val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)45;
			val.Value = value;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)46;
			val.Value = value;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item2 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)47;
			val.Value = value;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item3 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)48;
			val.Value = value;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item4 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)49;
			val.Value = value;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item5 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)51;
			val.Value = value;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item6 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)38;
			val.Value = value2;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item7 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)39;
			val.Value = value2;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item8 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)40;
			val.Value = value2;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item9 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)41;
			val.Value = value2;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item10 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)42;
			val.Value = value2;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item11 = val;
			val = default(ModifyUnitStatBuff_DOTS);
			val.StatType = (UnitStatType)44;
			val.Value = value2;
			val.ModificationType = (ModificationType)0;
			val.Modifier = 1f;
			val.Id = ModificationId.NewId(0);
			ModifyUnitStatBuff_DOTS item12 = val;
			return new List<ModifyUnitStatBuff_DOTS>(12)
			{
				item7, item8, item9, item10, item11, item12, item, item2, item3, item4,
				item5, item6
			};
		}
	}
}
namespace SanguinePact.SanguinePact.Patches
{
	[HarmonyPatch(typeof(BuffSystem_Spawn_Server), "OnUpdate")]
	public static class BuffSystem_Spawn_ServerPatch
	{
		public static void Prefix(BuffSystem_Spawn_Server __instance)
		{
			//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_001f: 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_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_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_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_0044: 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_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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_0086: 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)
			if (Core.SanguinePactService == null)
			{
				return;
			}
			EntityManager entityManager = ((ComponentSystemBase)__instance).EntityManager;
			EntityQuery _query_401358634_ = __instance.__query_401358634_0;
			Enumerator<Entity> enumerator = ((EntityQuery)(ref _query_401358634_)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)).GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity current = enumerator.Current;
				PrefabGUID val = current.Read<PrefabGUID>();
				Entity owner = current.Read<EntityOwner>().Owner;
				if (owner.Has<PlayerCharacter>() && Core.SanguinePactService.IsSanguinePactPlayer(owner) && val == Prefabs.SanguinePactBuff)
				{
					Core.SanguinePactService.UpdateSanguinePactBuff(current);
				}
			}
		}
	}
}
namespace SanguinePact.SanguinePact.Commands
{
	[CommandGroup("sanguinepact", "sgp")]
	internal class SanguinePactCommands
	{
		[Command("toggle", "t", null, "Toggle Sanguine Pact on or off.", null, false)]
		public static void ToggleSanguinePact(ChatCommandContext ctx)
		{
			ToggleSanguinePactForPlayer(ctx);
		}

		[Command("toggleplayer", "tp", null, "Toggle Sanguine Pact on or off for player.", null, true)]
		public static void ToggleSanguinePactForPlayer(ChatCommandContext ctx, OnlinePlayer player = null)
		{
			//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_0029: 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_002e: 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_0038: 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_004e: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: 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_0169: Unknown result type (might be due to invalid IL or missing references)
			FixedString64Bytes value = player?.Value.UserEntity.Read<User>().CharacterName ?? ctx.Event.User.CharacterName;
			Entity val = player?.Value.CharEntity ?? ctx.Event.SenderCharacterEntity;
			if (Helper.IsPlayerInCombat(val))
			{
				ctx.Reply($"Cannot toggle Sanguine Pact for <color=white>{value}</color>. Player is in combat.");
				return;
			}
			if (Core.SanguinePactService.ToggleSanguinePact(val))
			{
				ctx.Reply($"Sanguine Pact ON for <color=white>{value}</color>. Deal {Plugin.DamageMultiplier.Value}x damage. Take {Plugin.ResistMultiplier.Value}x damage.");
			}
			else
			{
				ctx.Reply($"Sanguine Pact OFF for <color=white>{value}</color>");
			}
			Core.SanguinePactService.UpdateSanguinePactPlayer(val);
		}

		[Command("list", "l", null, "List players in Sanguine Pact.", null, false)]
		public static void ListSanguinePactPlayers(ChatCommandContext ctx)
		{
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0059: 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_0076: Unknown result type (might be due to invalid IL or missing references)
			IEnumerable<Entity> sanguinePactPlayers = Core.SanguinePactService.GetSanguinePactPlayers();
			if (sanguinePactPlayers == null)
			{
				ctx.Reply("No players are playing on Sanguine Pact");
				return;
			}
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("Sanguine Pact players: ");
			bool flag = true;
			foreach (Entity item in sanguinePactPlayers)
			{
				PlayerCharacter val = item.Read<PlayerCharacter>();
				string text = $"<color=white>{val.Name}</color>";
				if (stringBuilder.Length + text.Length + 2 > 509)
				{
					ctx.Reply(stringBuilder.ToString());
					stringBuilder.Clear();
					flag = true;
				}
				if (flag)
				{
					stringBuilder.Append(text);
				}
				else
				{
					StringBuilder stringBuilder2 = stringBuilder;
					StringBuilder.AppendInterpolatedStringHandler handler = new StringBuilder.AppendInterpolatedStringHandler(2, 1, stringBuilder2);
					handler.AppendLiteral(", ");
					handler.AppendFormatted(text);
					stringBuilder2.Append(ref handler);
				}
				flag = false;
			}
			ctx.Reply(stringBuilder.ToString());
		}
	}
}
namespace SanguinePact.Common
{
	internal static class Core
	{
		private static MonoBehaviour monoBehaviour;

		public const int MAX_REPLY_LENGTH = 509;

		private static bool _hasInitialized = false;

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


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


		public static GameDataSystem GameDataSystem { get; } = Server.GetExistingSystemManaged<GameDataSystem>();


		public static PrefabCollectionSystem PrefabCollectionSystem { get; internal set; }

		public static RelicDestroySystem RelicDestroySystem { get; internal set; }

		public static ServerScriptMapper ServerScriptMapper { get; internal set; }

		public static double ServerTime => ServerGameManager.ServerTime;

		public static ServerGameManager ServerGameManager => ServerScriptMapper.GetServerGameManager();

		public static ServerGameSettingsSystem ServerGameSettingsSystem { get; internal set; }

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


		public static PlayerService Players { get; internal set; }

		public static SanguinePactService SanguinePactService { get; internal set; }

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

		internal static void InitializeAfterLoaded()
		{
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			if (!_hasInitialized)
			{
				PrefabCollectionSystem = Server.GetExistingSystemManaged<PrefabCollectionSystem>();
				RelicDestroySystem = Server.GetExistingSystemManaged<RelicDestroySystem>();
				ServerGameSettingsSystem = Server.GetExistingSystemManaged<ServerGameSettingsSystem>();
				ServerScriptMapper = Server.GetExistingSystemManaged<ServerScriptMapper>();
				Players = new PlayerService();
				SanguinePactService = new SanguinePactService();
				_hasInitialized = true;
				ManualLogSource log = Log;
				bool flag = default(bool);
				BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(10, 1, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("InitializeAfterLoaded");
					((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" completed");
				}
				log.LogInfo(val);
			}
		}

		private static World GetWorld(string name)
		{
			Enumerator<World> enumerator = World.s_AllWorlds.GetEnumerator();
			while (enumerator.MoveNext())
			{
				World current = enumerator.Current;
				if (current.Name == name)
				{
					return current;
				}
			}
			return null;
		}

		public static Coroutine StartCoroutine(IEnumerator routine)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			if ((Object)(object)monoBehaviour == (Object)null)
			{
				GameObject val = new GameObject("SanguinePact");
				monoBehaviour = (MonoBehaviour)(object)val.AddComponent<IgnorePhysicsDebugSystem>();
				Object.DontDestroyOnLoad((Object)(object)val);
			}
			return monoBehaviour.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(routine));
		}

		public static void StopCoroutine(Coroutine coroutine)
		{
			if (!((Object)(object)monoBehaviour == (Object)null))
			{
				monoBehaviour.StopCoroutine(coroutine);
			}
		}
	}
}
namespace SanguinePact.Common.Utils
{
	internal class Buffs
	{
		public static bool AddBuff(Entity User, Entity Character, PrefabGUID buffPrefab, int duration = 0, bool immortal = true)
		{
			//IL_000e: 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_001c: 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_0021: 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_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_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_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_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_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_0073: 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_008a: 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_0097: 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_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: 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_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: 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_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: 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_0118: 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_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_018d: 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_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			DebugEventsSystem existingSystemManaged = Core.Server.GetExistingSystemManaged<DebugEventsSystem>();
			ApplyBuffDebugEvent val = default(ApplyBuffDebugEvent);
			val.BuffPrefabGUID = buffPrefab;
			ApplyBuffDebugEvent val2 = val;
			FromCharacter val3 = default(FromCharacter);
			val3.User = User;
			val3.Character = Character;
			FromCharacter val4 = val3;
			Entity entity = default(Entity);
			if (!BuffUtility.TryGetBuff(Core.Server.EntityManager, Character, PrefabIdentifier.op_Implicit(buffPrefab), ref entity))
			{
				existingSystemManaged.ApplyBuff(val4, val2);
				if (BuffUtility.TryGetBuff(Core.Server.EntityManager, Character, PrefabIdentifier.op_Implicit(buffPrefab), ref entity))
				{
					if (entity.Has<CreateGameplayEventsOnSpawn>())
					{
						entity.Remove<CreateGameplayEventsOnSpawn>();
					}
					if (entity.Has<GameplayEventListeners>())
					{
						entity.Remove<GameplayEventListeners>();
					}
					if (immortal)
					{
						entity.Add<Buff_Persists_Through_Death>();
						if (entity.Has<RemoveBuffOnGameplayEvent>())
						{
							entity.Remove<RemoveBuffOnGameplayEvent>();
						}
						if (entity.Has<RemoveBuffOnGameplayEventEntry>())
						{
							entity.Remove<RemoveBuffOnGameplayEventEntry>();
						}
					}
					if (duration > -1 && duration != 0)
					{
						if (!entity.Has<LifeTime>())
						{
							entity.Add<LifeTime>();
							entity.Write<LifeTime>(new LifeTime
							{
								EndAction = (LifeTimeEndAction)2
							});
						}
						LifeTime componentData = entity.Read<LifeTime>();
						componentData.Duration = duration;
						entity.Write<LifeTime>(componentData);
					}
					else if (duration == -1)
					{
						if (entity.Has<LifeTime>())
						{
							LifeTime componentData2 = entity.Read<LifeTime>();
							componentData2.Duration = -1f;
							componentData2.EndAction = (LifeTimeEndAction)0;
							entity.Write<LifeTime>(componentData2);
						}
						if (entity.Has<RemoveBuffOnGameplayEvent>())
						{
							entity.Remove<RemoveBuffOnGameplayEvent>();
						}
						if (entity.Has<RemoveBuffOnGameplayEventEntry>())
						{
							entity.Remove<RemoveBuffOnGameplayEventEntry>();
						}
					}
					return true;
				}
				return false;
			}
			return false;
		}

		public static void RemoveBuff(Entity Character, PrefabGUID buffPrefab)
		{
			//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_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)
			Entity val = default(Entity);
			if (BuffUtility.TryGetBuff(Core.EntityManager, Character, PrefabIdentifier.op_Implicit(buffPrefab), ref val))
			{
				DestroyUtility.Destroy(Core.EntityManager, val, (DestroyDebugReason)13, (string)null, 0);
			}
		}
	}
	public class ChatColor
	{
		public static string Color(string hexColor, string text)
		{
			return $"<color={hexColor}>{text}</color>";
		}

		public static string White(string text)
		{
			return Color("#FFFFFF", text);
		}

		public static string Red(string text)
		{
			return Color("#E90000", text);
		}

		public static string Green(string text)
		{
			return Color("#7FE030", text);
		}

		public static string Blue(string text)
		{
			return Color("#256DFE", text);
		}

		public static string Yellow(string text)
		{
			return Color("#FFE100", text);
		}

		public static string Gray(string text)
		{
			return Color("#A9A9A9", text);
		}

		public static string Purple(string text)
		{
			return Color("#D900FF", text);
		}
	}
	public static class ECSExtensions
	{
		public delegate void ActionRef<T>(ref T item);

		public unsafe static void Write<T>(this Entity entity, T componentData) where T : struct
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: 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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			byte[] array = StructureToByteArray(componentData);
			int num = Marshal.SizeOf<T>();
			fixed (byte* ptr = array)
			{
				EntityManager entityManager = Core.EntityManager;
				((EntityManager)(ref entityManager)).SetComponentDataRaw(entity, val.TypeIndex, (void*)ptr, num);
			}
		}

		public static void With<T>(this Entity entity, ActionRef<T> action) where T : struct
		{
			//IL_0001: 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_0019: Unknown result type (might be due to invalid IL or missing references)
			T item = entity.ReadRW<T>();
			action(ref item);
			EntityManager entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).SetComponentData<T>(entity, item);
		}

		public unsafe static T ReadRW<T>(this Entity entity) where T : struct
		{
			//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_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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			void* componentDataRawRW = ((EntityManager)(ref entityManager)).GetComponentDataRawRW(entity, val.TypeIndex);
			return Marshal.PtrToStructure<T>(new IntPtr(componentDataRawRW));
		}

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

		public unsafe static T Read<T>(this Entity entity) where T : struct
		{
			//IL_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_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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			void* componentDataRawRO = ((EntityManager)(ref entityManager)).GetComponentDataRawRO(entity, val.TypeIndex);
			return Marshal.PtrToStructure<T>(new IntPtr(componentDataRawRO));
		}

		public static DynamicBuffer<T> ReadBuffer<T>(this Entity entity) where T : struct
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = Core.Server.EntityManager;
			return ((EntityManager)(ref entityManager)).GetBuffer<T>(entity, false);
		}

		public static bool Has<T>(this Entity entity)
		{
			//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_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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			return ((EntityManager)(ref entityManager)).HasComponent(entity, val);
		}

		public static string LookupName(this PrefabGUID prefabGuid)
		{
			//IL_0012: 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)
			PrefabCollectionSystem existingSystemManaged = Core.Server.GetExistingSystemManaged<PrefabCollectionSystem>();
			return (existingSystemManaged.PrefabGuidToNameDictionary.ContainsKey(prefabGuid) ? existingSystemManaged.PrefabGuidToNameDictionary[prefabGuid] : "GUID Not Found").ToString();
		}

		public static string GetPrefabName(this PrefabGUID prefabGuid)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			string text = default(string);
			return Core.PrefabCollectionSystem.PrefabGuidToNameDictionary.TryGetValue(prefabGuid, ref text) ? (text ?? "") : "String.Empty";
		}

		public static void Add<T>(this Entity entity)
		{
			//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_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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).AddComponent(entity, val);
		}

		public static void Remove<T>(this Entity entity)
		{
			//IL_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_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)
			ComponentType val = default(ComponentType);
			((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0);
			EntityManager entityManager = Core.EntityManager;
			((EntityManager)(ref entityManager)).RemoveComponent(entity, val);
		}
	}
	internal static class Helper
	{
		private static EntityQuery tilePositionQuery = default(EntityQuery);

		private const float ReviveDelaySeconds = 20f;

		public static PrefabGUID GetPrefabGUID(Entity entity)
		{
			//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_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_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_0025: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = Core.EntityManager;
			PrefabGUID componentData = default(PrefabGUID);
			try
			{
				componentData = ((EntityManager)(ref entityManager)).GetComponentData<PrefabGUID>(entity);
				return componentData;
			}
			catch
			{
				((PrefabGUID)(ref componentData))..ctor(0);
			}
			return componentData;
		}

		public static bool TryGetClanEntityFromPlayer(Entity User, out Entity ClanEntity)
		{
			//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_0007: 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_0054: 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_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_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_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			if (User.Read<TeamReference>().Value._Value.ReadBuffer<TeamAllies>().Length > 0)
			{
				ClanEntity = User.Read<TeamReference>().Value._Value.ReadBuffer<TeamAllies>()[0].Value;
				return true;
			}
			ClanEntity = default(Entity);
			return false;
		}

		public static Entity AddItemToInventory(Entity recipient, PrefabGUID guid, int amount)
		{
			//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_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: 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_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_0023: 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_003f: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				ServerGameManager serverGameManager = Core.Server.GetExistingSystemManaged<ServerScriptMapper>()._ServerGameManager;
				AddItemResponse val = ((ServerGameManager)(ref serverGameManager)).TryAddInventoryItem(recipient, guid, amount);
				return val.NewEntity;
			}
			catch (Exception e)
			{
				Core.LogException(e, "AddItemToInventory");
			}
			return default(Entity);
		}

		public static NativeArray<Entity> GetEntitiesByComponentType<T1>(bool includeAll = false, bool includeDisabled = false, bool includeSpawn = false, bool includePrefab = false, bool includeDestroyed = false)
		{
			//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_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_0019: 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_001c: 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_0027: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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_0081: 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_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_00a2: 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_003c: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
			EntityQueryOptions val = (EntityQueryOptions)0;
			if (includeAll)
			{
				val = (EntityQueryOptions)(val | 0xC3);
			}
			if (includeDisabled)
			{
				val = (EntityQueryOptions)(val | 2);
			}
			if (includeSpawn)
			{
				val = (EntityQueryOptions)(val | 0x40);
			}
			if (includePrefab)
			{
				val = (EntityQueryOptions)(val | 1);
			}
			if (includeDestroyed)
			{
				val = (EntityQueryOptions)(val | 0x80);
			}
			EntityQueryDesc val2 = new EntityQueryDesc();
			val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[1]
			{
				new ComponentType(Il2CppType.Of<T1>(), (AccessMode)0)
			});
			val2.Options = val;
			EntityQueryDesc val3 = val2;
			EntityManager entityManager = Core.EntityManager;
			EntityQuery val4 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)new EntityQueryDesc[1] { val3 });
			return ((EntityQuery)(ref val4)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
		}

		public static NativeArray<Entity> GetEntitiesByComponentTypes<T1, T2>(bool includeAll = false, bool includeDisabled = false, bool includeSpawn = false, bool includePrefab = false, bool includeDestroyed = false)
		{
			//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_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_0019: 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_001c: 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_0027: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0084: 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_0093: 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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: 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_00b6: 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_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_00ba: Unknown result type (might be due to invalid IL or missing references)
			EntityQueryOptions val = (EntityQueryOptions)0;
			if (includeAll)
			{
				val = (EntityQueryOptions)(val | 0xC3);
			}
			if (includeDisabled)
			{
				val = (EntityQueryOptions)(val | 2);
			}
			if (includeSpawn)
			{
				val = (EntityQueryOptions)(val | 0x40);
			}
			if (includePrefab)
			{
				val = (EntityQueryOptions)(val | 1);
			}
			if (includeDestroyed)
			{
				val = (EntityQueryOptions)(val | 0x80);
			}
			EntityQueryDesc val2 = new EntityQueryDesc();
			val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[2]
			{
				new ComponentType(Il2CppType.Of<T1>(), (AccessMode)0),
				new ComponentType(Il2CppType.Of<T2>(), (AccessMode)0)
			});
			val2.Options = val;
			EntityQueryDesc val3 = val2;
			EntityManager entityManager = Core.EntityManager;
			EntityQuery val4 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)new EntityQueryDesc[1] { val3 });
			return ((EntityQuery)(ref val4)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
		}

		public static NativeArray<Entity> GetEntitiesByComponentTypes<T1, T2, T3>(bool includeAll = false, bool includeDisabled = false, bool includeSpawn = false, bool includePrefab = false, bool includeDestroyed = false)
		{
			//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_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_0019: 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_001c: 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_0027: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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_00c6: 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_003c: 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_00cc: Unknown result type (might be due to invalid IL or missing references)
			EntityQueryOptions val = (EntityQueryOptions)0;
			if (includeAll)
			{
				val = (EntityQueryOptions)(val | 0xC3);
			}
			if (includeDisabled)
			{
				val = (EntityQueryOptions)(val | 2);
			}
			if (includeSpawn)
			{
				val = (EntityQueryOptions)(val | 0x40);
			}
			if (includePrefab)
			{
				val = (EntityQueryOptions)(val | 1);
			}
			if (includeDestroyed)
			{
				val = (EntityQueryOptions)(val | 0x80);
			}
			EntityQueryDesc val2 = new EntityQueryDesc();
			val2.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[3]
			{
				new ComponentType(Il2CppType.Of<T1>(), (AccessMode)0),
				new ComponentType(Il2CppType.Of<T2>(), (AccessMode)0),
				new ComponentType(Il2CppType.Of<T3>(), (AccessMode)0)
			});
			val2.Options = val;
			EntityQueryDesc val3 = val2;
			EntityManager entityManager = Core.EntityManager;
			EntityQuery val4 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)new EntityQueryDesc[1] { val3 });
			return ((EntityQuery)(ref val4)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
		}

		public static IEnumerable<Entity> GetAllEntitiesInRadius<T>(float2 center, float radius)
		{
			//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)
			NativeArray<Entity> entities = GetEntitiesByComponentType<T>(includeAll: false, includeDisabled: true, includeSpawn: true);
			Enumerator<Entity> enumerator = entities.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity entity = enumerator.Current;
				if (entity.Has<Translation>())
				{
					float3 pos = entity.Read<Translation>().Value;
					if (math.distance(center, ((float3)(ref pos)).xz) <= radius)
					{
						yield return entity;
					}
					pos = default(float3);
				}
			}
			entities.Dispose();
		}

		public static Entity FindClosestTilePosition(Vector3 pos)
		{
			//IL_0001: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: 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_0059: 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_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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: 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_00c1: 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_00c8: 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_00cf: 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_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: 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_00ec: 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_0114: Unknown result type (might be due to invalid IL or missing references)
			if (tilePositionQuery == default(EntityQuery))
			{
				EntityManager entityManager = Core.EntityManager;
				EntityQueryDesc[] array = new EntityQueryDesc[1];
				EntityQueryDesc val = new EntityQueryDesc();
				val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[2]
				{
					new ComponentType(Il2CppType.Of<TilePosition>(), (AccessMode)1),
					new ComponentType(Il2CppType.Of<Translation>(), (AccessMode)1)
				});
				val.Options = (EntityQueryOptions)66;
				array[0] = val;
				tilePositionQuery = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
			}
			Entity result = Entity.Null;
			float num = float.MaxValue;
			NativeArray<Entity> val2 = ((EntityQuery)(ref tilePositionQuery)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
			for (int i = 0; i < val2.Length; i++)
			{
				Entity val3 = val2[i];
				if (!val3.Has<TilePosition>())
				{
					continue;
				}
				float3 value = val3.Read<Translation>().Value;
				float num2 = math.distancesq(float3.op_Implicit(pos), value);
				if (num2 < num)
				{
					string text = GetPrefabGUID(val3).LookupName();
					if (text.StartsWith("TM_"))
					{
						num = num2;
						result = val3;
					}
				}
			}
			val2.Dispose();
			return result;
		}

		public static Entity FindClosestTilePosition<T>(Vector3 pos, float maxDist = 5f)
		{
			//IL_0001: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: 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_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: 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_00cf: 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_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: 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_014c: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			if (tilePositionQuery == default(EntityQuery))
			{
				EntityManager entityManager = Core.EntityManager;
				EntityQueryDesc[] array = new EntityQueryDesc[1];
				EntityQueryDesc val = new EntityQueryDesc();
				val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[3]
				{
					new ComponentType(Il2CppType.Of<TilePosition>(), (AccessMode)1),
					new ComponentType(Il2CppType.Of<Translation>(), (AccessMode)1),
					new ComponentType(Il2CppType.Of<T>(), (AccessMode)1)
				});
				val.Options = (EntityQueryOptions)66;
				array[0] = val;
				tilePositionQuery = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
			}
			Entity result = Entity.Null;
			float num = maxDist;
			NativeArray<Entity> val2 = ((EntityQuery)(ref tilePositionQuery)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
			for (int i = 0; i < val2.Length; i++)
			{
				Entity val3 = val2[i];
				if (!val3.Has<TilePosition>())
				{
					continue;
				}
				float3 value = val3.Read<Translation>().Value;
				float num2 = math.distancesq(float3.op_Implicit(pos), value);
				if (num2 < num)
				{
					string text = GetPrefabGUID(val3).LookupName();
					if (text.StartsWith("TM_"))
					{
						num = num2;
						result = val3;
					}
				}
			}
			val2.Dispose();
			return result;
		}

		public static void RepairGear(Entity Character, bool repair = true)
		{
			//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_0007: 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_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_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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: 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_0046: 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_0091: 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_006f: 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_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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			Equipment val = Character.Read<Equipment>();
			NativeList<Entity> val2 = default(NativeList<Entity>);
			val2..ctor(AllocatorHandle.op_Implicit((Allocator)2));
			((Equipment)(ref val)).GetAllEquipmentEntities(val2, false);
			Enumerator<Entity> enumerator = val2.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity current = enumerator.Current;
				if (current.Has<Durability>())
				{
					Durability val3 = current.Read<Durability>();
					if (repair)
					{
						val3.Value = val3.MaxDurability;
					}
					else
					{
						val3.Value = 0f;
					}
					current.Write<Durability>(val3);
				}
			}
			val2.Dispose();
			InventoryBuffer val4 = default(InventoryBuffer);
			for (int i = 0; i < 36; i++)
			{
				if (!InventoryUtilities.TryGetItemAtSlot(Core.EntityManager, Character, i, ref val4))
				{
					continue;
				}
				Entity entity = val4.ItemEntity._Entity;
				if (entity.Has<Durability>())
				{
					Durability val5 = entity.Read<Durability>();
					if (repair)
					{
						val5.Value = val5.MaxDurability;
					}
					else
					{
						val5.Value = 0f;
					}
					entity.Write<Durability>(val5);
				}
			}
		}

		public static void ReviveCharacter(Entity Character, Entity User, ChatCommandContext ctx = null)
		{
			//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_000c: 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_00a0: 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_0027: 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_003c: 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)
			Entity entity = default(Entity);
			if (BuffUtility.TryGetBuff(Core.EntityManager, Character, PrefabIdentifier.op_Implicit(Prefabs.Buff_General_Vampire_Wounded_Buff), ref entity))
			{
				Age val = entity.Read<Age>();
				if (val.Value >= 20f)
				{
					ReviveCharacterNow(Character, User, ctx);
				}
				else
				{
					float value = 20f - val.Value;
					if (ctx != null)
					{
						ctx.Reply($"Cannot revive yet. Try again in {value:F1} seconds...");
					}
				}
			}
			ReviveCharacterNow(Character, User, ctx);
		}

		public static void ReviveCharacterNow(Entity Character, Entity User, ChatCommandContext ctx = null)
		{
			//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_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_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_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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_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_0079: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: 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_00bb: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			Health val = Character.Read<Health>();
			Entity val2 = default(Entity);
			if (BuffUtility.TryGetBuff(Core.EntityManager, Character, PrefabIdentifier.op_Implicit(Prefabs.Buff_General_Vampire_Wounded_Buff), ref val2))
			{
				DestroyUtility.Destroy(Core.EntityManager, val2, (DestroyDebugReason)13, (string)null, 0);
				val.Value = ModifiableFloat.op_Implicit(val.MaxHealth);
				val.MaxRecoveryHealth = ModifiableFloat.op_Implicit(val.MaxHealth);
				Character.Write<Health>(val);
				ctx.Reply($"Revived {User.Read<User>().CharacterName}");
			}
			if (val.IsDead)
			{
				LocalToWorld val3 = Character.Read<LocalToWorld>();
				float3 position = ((LocalToWorld)(ref val3)).Position;
				Nullable_Unboxed<float3> val4 = default(Nullable_Unboxed<float3>);
				val4.value = position;
				Nullable_Unboxed<float3> val5 = val4;
				ServerBootstrapSystem existingSystemManaged = Core.Server.GetExistingSystemManaged<ServerBootstrapSystem>();
				EntityCommandBufferSystem existingSystemManaged2 = Core.Server.GetExistingSystemManaged<EntityCommandBufferSystem>();
				EntityCommandBuffer val6 = existingSystemManaged2.CreateCommandBuffer();
				existingSystemManaged.RespawnCharacter(val6, User, val5, Character, default(Entity), -1);
				ctx.Reply($"Revived {User.Read<User>().CharacterName}");
			}
		}

		public static void KickPlayer(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_000c: 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_001b: 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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: 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_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_005d: 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_0063: 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_006e: 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_0081: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = Core.Server.EntityManager;
			User val = userEntity.Read<User>();
			if (val.IsConnected && val.PlatformId != 0)
			{
				Entity entity = ((EntityManager)(ref entityManager)).CreateEntity((ComponentType[])(object)new ComponentType[3]
				{
					ComponentType.ReadOnly<NetworkEventType>(),
					ComponentType.ReadOnly<SendEventToUser>(),
					ComponentType.ReadOnly<KickEvent>()
				});
				entity.Write<KickEvent>(new KickEvent
				{
					PlatformId = val.PlatformId
				});
				entity.Write<SendEventToUser>(new SendEventToUser
				{
					UserIndex = val.Index
				});
				entity.Write<NetworkEventType>(new NetworkEventType
				{
					EventId = NetworkEvents.EventId_KickEvent,
					IsAdminEvent = false,
					IsDebugEvent = false
				});
			}
		}

		public static void UnlockWaypoints(Entity userEntity)
		{
			//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_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_000f: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_003b: 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_0045: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = Core.EntityManager;
			DynamicBuffer<UnlockedWaypointElement> val = ((EntityManager)(ref entityManager)).AddBuffer<UnlockedWaypointElement>(userEntity);
			val.Clear();
			Enumerator<Entity> enumerator = GetEntitiesByComponentType<ChunkWaypoint>().GetEnumerator();
			while (enumerator.MoveNext())
			{
				Entity current = enumerator.Current;
				val.Add(new UnlockedWaypointElement
				{
					Waypoint = current.Read<NetworkId>()
				});
			}
		}

		public static void RevealMapForPlayer(Entity userEntity)
		{
			//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_0009: 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_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_001e: 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_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_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_0036: 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_003e: 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_0046: 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_0064: 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_0070: Unknown result type (might be due to invalid IL or missing references)
			EntityManager entityManager = Core.EntityManager;
			Enumerator<UserMapZoneElement> enumerator = ((EntityManager)(ref entityManager)).GetBuffer<UserMapZoneElement>(userEntity, false).GetEnumerator();
			while (enumerator.MoveNext())
			{
				UserMapZoneElement current = enumerator.Current;
				NetworkedEntity userZoneEntity = current.UserZoneEntity;
				Entity entityOnServer = ((NetworkedEntity)(ref userZoneEntity)).GetEntityOnServer();
				entityManager = Core.EntityManager;
				DynamicBuffer<UserMapZonePackedRevealElement> buffer = ((EntityManager)(ref entityManager)).GetBuffer<UserMapZonePackedRevealElement>(entityOnServer, false);
				buffer.Clear();
				UserMapZonePackedRevealElement val = default(UserMapZonePackedRevealElement);
				val.PackedPixel = byte.MaxValue;
				UserMapZonePackedRevealElement val2 = val;
				for (int i = 0; i < 8192; i++)
				{
					buffer.Add(val2);
				}
			}
		}

		public static bool IsPlayerInCombat(Entity player)
		{
			//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_000c: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			return BuffUtility.HasBuff(Core.EntityManager, player, PrefabIdentifier.op_Implicit(Prefabs.Buff_InCombat)) || BuffUtility.HasBuff(Core.EntityManager, player, PrefabIdentifier.op_Implicit(Prefabs.Buff_InCombat_PvPVampire));
		}

		public static bool IsPlayerDeathFromPvP(Entity player)
		{
			//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_000c: Unknown result type (might be due to invalid IL or missing references)
			return BuffUtility.HasBuff(Core.EntityManager, player, PrefabIdentifier.op_Implicit(Prefabs.Buff_General_VampirePvPDeathDebuff));
		}

		public static float GetPlayerEquipmentLevel(Player player)
		{
			//IL_0002: 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_0009: 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_0010: 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_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)
			Entity character = player.Character;
			Equipment val = character.Read<Equipment>();
			return ModifiableFloat.op_Implicit(val.ArmorLevel) + ModifiableFloat.op_Implicit(val.SpellLevel) + ModifiableFloat.op_Implicit(val.WeaponLevel);
		}
	}
}
namespace SanguinePact.Common.KindredCommands.Services
{
	internal class PlayerService
	{
		private readonly Dictionary<FixedString64Bytes, PlayerData> namePlayerCache = new Dictionary<FixedString64Bytes, PlayerData>();

		private readonly Dictionary<ulong, PlayerData> steamPlayerCache = new Dictionary<ulong, PlayerData>();

		private readonly Dictionary<NetworkId, PlayerData> i