The current BepInExPack is broken due to the Oakveil update, and mods installed through a mod manager may not work. Join the modding Discord for more information.
Decompiled source of BloodyCore v1.2.4
Bloody.Core.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; 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.Threading; using BepInEx; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using BepInEx.Unity.IL2CPP.Utils.Collections; using Bloodstone.API; using Bloody.Core.API.v1; using Bloody.Core.GameData.v1; using Bloody.Core.Helper.v1; using Bloody.Core.Models.v1; using Bloody.Core.Models.v1.Base; using Bloody.Core.Models.v1.Data; using Bloody.Core.Models.v1.Internals; using Bloody.Core.Patch.Client; using Bloody.Core.Patch.Server; using Bloody.Core.Utils.v1; using HarmonyLib; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem; using Il2CppSystem.Text; using Microsoft.CodeAnalysis; using ProjectM; using ProjectM.Behaviours; using ProjectM.CastleBuilding; using ProjectM.CastleBuilding.AssetSwapping; using ProjectM.CastleBuilding.Placement; using ProjectM.CastleBuilding.Rebuilding; using ProjectM.Gameplay; using ProjectM.Gameplay.Clan; using ProjectM.Gameplay.Scripting; using ProjectM.Gameplay.Systems; using ProjectM.Haptics; using ProjectM.Hybrid; using ProjectM.LightningStorm; using ProjectM.Network; using ProjectM.Physics; using ProjectM.Portrait; using ProjectM.Roofs; using ProjectM.Scripting; using ProjectM.Sequencer; using ProjectM.Shared; using ProjectM.Shared.WarEvents; using ProjectM.Shared.WorldEvents; using ProjectM.SunBlocker; using ProjectM.Terrain; using ProjectM.Tiles; using ProjectM.Transmog; using ProjectM.UI; using Stunlock.Core; using Stunlock.Core.Authoring; using Stunlock.Localization; using Stunlock.Network; using Stunlock.Sequencer; using Unity.Collections; using Unity.Entities; using Unity.Mathematics; using Unity.Physics; using Unity.Physics.Systems; using Unity.Scenes; using Unity.Transforms; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("trodi")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Framework for Bloody Mods")] [assembly: AssemblyFileVersion("1.2.5.0")] [assembly: AssemblyInformationalVersion("1.2.5+1.Branch.master.Sha.083a4d7ddb261aaed479ab7154f880972321fb01")] [assembly: AssemblyProduct("Bloody.Core")] [assembly: AssemblyTitle("Bloody.Core")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/oscarpedrero/BloodyCore")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.5.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsUnmanagedAttribute : Attribute { } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace Bloody.Core { [BepInPlugin("trodi.Bloody.Core", "Bloody.Core", "1.2.5")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Core : BasePlugin { private static Harmony _harmony; private static bool _initialized; internal static bool _worldDataInitialized; internal const string NotInitializedError = "Core is not initialized"; public static bool IsServer = Application.productName == "VRisingServer"; public static bool IsClient = Application.productName == "VRising"; internal static ManualLogSource Log = Logger.CreateLogSource("Bloody.Core"); internal static Logger Logger = new Logger(Log); private static World _world; public static EventsHandlerSystem EventHandlerSystem; internal static Core Instance { get; private set; } public static SystemsCore SystemsCore { get { if (!_worldDataInitialized) { throw new InvalidOperationException("Core is not initialized"); } return SystemsCore.Instance; } } public static World World => _world ?? throw new InvalidOperationException("Core is not initialized"); public Core() { Instance = this; } public override void Load() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!_initialized) { _initialized = true; _harmony = new Harmony("Bloody.Core"); if (IsClient) { Logger.LogInfo("Load Systems for Client"); _harmony.PatchAll(typeof(OnGameClientDataInitializedPatch)); OnGameClientDataInitializedPatch.OnCoreInitialized += OnCoreInitialized; OnGameClientDataInitializedPatch.OnCoreDestroyed += OnCoreDestroyed; } if (IsServer) { Logger.LogInfo("Load Systems for Server"); _harmony.PatchAll(typeof(ActionScheduler)); _harmony.PatchAll(typeof(DeathPatch)); _harmony.PatchAll(typeof(DealDamageSystemPatch)); _harmony.PatchAll(typeof(DeathVBloodPatch)); _harmony.PatchAll(typeof(GameBootstrapPatch)); _harmony.PatchAll(typeof(ServerBootstrapPatch)); _harmony.PatchAll(typeof(TraderPurchasePatch)); _harmony.PatchAll(typeof(UnitSpawnerPatch)); _harmony.PatchAll(typeof(SaveSystemPatch)); _harmony.PatchAll(typeof(BuffPatch)); _harmony.PatchAll(typeof(VampireDownedPatch)); _harmony.PatchAll(typeof(OnGameServerDataInitializedPatch)); OnGameServerDataInitializedPatch.OnCoreInitialized += OnCoreInitialized; } EventHandlerSystem = new EventsHandlerSystem(); Logger.LogInfo("Plugin trodi.Bloody.Core version 1.2.5 is loaded!"); } } internal static void Destroy() { _harmony.UnpatchSelf(); _harmony = null; } internal static void OnCoreDestroyed() { _world = null; _worldDataInitialized = false; } internal static void OnCoreInitialized(World world) { Logger.LogInfo("OnCoreInitialized is loaded!"); _world = world; _worldDataInitialized = true; } } public static class ECSExtensions { private static EntityManager GetEntityManager() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return Core.World.EntityManager; } public unsafe static void Write<T>(this Entity entity, T componentData) where T : struct { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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 = GetEntityManager(); ((EntityManager)(ref entityManager)).SetComponentDataRaw(entity, val.TypeIndex, (void*)ptr, num); } } public static byte[] StructureToByteArray<T>(T structure) where T : struct { int num = Marshal.SizeOf(structure); byte[] array = new byte[num]; IntPtr intPtr = Marshal.AllocHGlobal(num); Marshal.StructureToPtr(structure, intPtr, fDeleteOld: true); Marshal.Copy(intPtr, array, 0, num); Marshal.FreeHGlobal(intPtr); return array; } public unsafe static T Read<T>(this Entity entity) where T : struct { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //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 = GetEntityManager(); return Marshal.PtrToStructure<T>(new IntPtr(((EntityManager)(ref entityManager)).GetComponentDataRawRO(entity, val.TypeIndex))); } public static DynamicBuffer<T> ReadBuffer<T>(this Entity entity) where T : struct { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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) EntityManager entityManager = GetEntityManager(); return ((EntityManager)(ref entityManager)).GetBuffer<T>(entity, false); } public static bool Has<T>(this Entity entity) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = GetEntityManager(); return ((EntityManager)(ref entityManager)).HasComponent(entity, val); } public static string LookupName(this PrefabGUID prefabGuid) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) PrefabCollectionSystem existingSystemManaged = VWorld.Server.GetExistingSystemManaged<PrefabCollectionSystem>(); object obj; if (!existingSystemManaged.PrefabGuidToNameDictionary.ContainsKey(prefabGuid)) { obj = "GUID Not Found"; } else { string text = existingSystemManaged.PrefabGuidToNameDictionary[prefabGuid]; PrefabGUID val = prefabGuid; obj = text + " " + ((object)(PrefabGUID)(ref val)).ToString(); } return obj.ToString(); } public static void Add<T>(this Entity entity) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = GetEntityManager(); ((EntityManager)(ref entityManager)).AddComponent(entity, val); } public static void Remove<T>(this Entity entity) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = GetEntityManager(); ((EntityManager)(ref entityManager)).RemoveComponent(entity, val); } public static bool Exists(this Entity entity) { //IL_0000: 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_0011: Unknown result type (might be due to invalid IL or missing references) if (entity.Index > 0) { EntityManager entityManager = GetEntityManager(); return ((EntityManager)(ref entityManager)).Exists(entity); } return false; } } public class SystemsCore { private static SystemsCore _instance; internal static SystemsCore Instance => _instance ?? (_instance = new SystemsCore()); public EntityManager EntityManager => Core.World.EntityManager; public PrefabCollectionSystem PrefabCollectionSystem => Core.World.GetExistingSystemManaged<PrefabCollectionSystem>(); public GameDataSystem GameDataSystem => Core.World.GetExistingSystemManaged<GameDataSystem>(); public ManagedDataRegistry ManagedDataRegistry => GameDataSystem.ManagedDataRegistry; public DebugEventsSystem DebugEventsSystem => Core.World.GetExistingSystemManaged<DebugEventsSystem>(); public UnitSpawnerUpdateSystem UnitSpawnerUpdateSystem => Core.World.GetExistingSystemManaged<UnitSpawnerUpdateSystem>(); public ServerScriptMapper ServerScriptMapper => Core.World.GetExistingSystemManaged<ServerScriptMapper>(); } public static class MyPluginInfo { public const string PLUGIN_GUID = "trodi.Bloody.Core"; public const string PLUGIN_NAME = "Bloody.Core"; public const string PLUGIN_VERSION = "1.2.5"; } } namespace Bloody.Core.Utils.v1 { public static class ExtensionMethods { public static string GetPrefabName(this PrefabGUID prefabGuid) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) try { return prefabGuid.LookupName(); } catch { return null; } } public static IEnumerable<BaseEntityModel> ToEnumerable(this EntityQuery entityQuery) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) Enumerator<Entity> enumerator = ((EntityQuery)(ref entityQuery)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)).GetEnumerator(); while (enumerator.MoveNext()) { Entity current = enumerator.Current; yield return new BaseEntityModel(Core.World, current); } } public static IEnumerable<NpcModel> AsNpcs(this EntityQuery entityQuery) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) Enumerator<Entity> enumerator = ((EntityQuery)(ref entityQuery)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)).GetEnumerator(); while (enumerator.MoveNext()) { Entity current = enumerator.Current; yield return new NpcModel(current); } } public static DateTime ToDateTime(this long unixDateTime) { return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(unixDateTime); } public static double Distance(this float3 pos1, float3 pos2) { //IL_0000: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) return Math.Sqrt(Math.Pow(pos1.x - pos2.x, 2.0) + Math.Pow(pos1.z - pos2.z, 2.0)); } } internal struct FakeNull { public int value; public bool has_value; } } namespace Bloody.Core.Patch.Server { [HarmonyPatch(typeof(ServerBootstrapSystem), "OnUpdate")] public static class ActionScheduler { public static int CurrentFrameCount = 0; public static Action OnGameFrameUpdate; public static ConcurrentQueue<Action> actionsToExecuteOnMainThread = new ConcurrentQueue<Action>(); private static List<Timer> activeTimers = new List<Timer>(); public static void Postfix() { OnGameFrameUpdate?.Invoke(); CurrentFrameCount++; Action result; while (actionsToExecuteOnMainThread.TryDequeue(out result)) { result?.Invoke(); } } public static Timer RunActionEveryInterval(Action action, double intervalInSeconds) { return new Timer(delegate { actionsToExecuteOnMainThread.Enqueue(action); }, null, TimeSpan.FromSeconds(intervalInSeconds), TimeSpan.FromSeconds(intervalInSeconds)); } public static Timer RunActionOnceAfterDelay(Action action, double delayInSeconds) { Timer timer = null; timer = new Timer(delegate { actionsToExecuteOnMainThread.Enqueue(delegate { action(); timer?.Dispose(); }); }, null, TimeSpan.FromSeconds(delayInSeconds), Timeout.InfiniteTimeSpan); return timer; } public static Timer RunActionOnceAfterFrames(Action action, int frameDelay) { int startFrame = CurrentFrameCount; Timer timer = null; timer = new Timer(delegate { if (CurrentFrameCount - startFrame >= frameDelay) { actionsToExecuteOnMainThread.Enqueue(delegate { action(); }); timer?.Dispose(); } }, null, TimeSpan.Zero, TimeSpan.FromMilliseconds(8.0)); return timer; } public static void RunActionOnMainThread(Action action) { actionsToExecuteOnMainThread.Enqueue(delegate { action(); }); } } [HarmonyPatch] internal static class BuffPatch { internal static event PlayerBuffedEventHandler OnPlayerBuffed; internal static event PlayerBuffRemovedEventHandler OnPlayerBuffRemoved; [HarmonyPatch(typeof(BuffDebugSystem), "OnUpdate")] [HarmonyPostfix] private static void BuffPatch_Postfix(BuffDebugSystem __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_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_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_002f: 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_003a: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) try { EntityQuery _query_401358786_ = __instance.__query_401358786_0; NativeArray<Entity> val = ((EntityQuery)(ref _query_401358786_)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)); Enumerator<Entity> enumerator = val.GetEnumerator(); while (enumerator.MoveNext()) { Entity current = enumerator.Current; PrefabGUID prefabGuid = current.Read<PrefabGUID>(); Entity owner = current.Read<EntityOwner>().Owner; if (owner.Has<PlayerCharacter>()) { try { UserModel player = Bloody.Core.GameData.v1.GameData.Users.FromEntity(owner.Read<PlayerCharacter>().UserEntity); BuffPatch.OnPlayerBuffed?.Invoke(player, current, prefabGuid); } catch (Exception ex) { Core.Logger.LogError("BuffDebugSystem.OnUpdate Error " + ex.Message); } } } val.Dispose(); } catch (Exception exception) { Core.Logger.LogError(exception); } } [HarmonyPatch(typeof(UpdateBuffsBuffer_Destroy), "OnUpdate")] [HarmonyPostfix] public static void Prefix(UpdateBuffsBuffer_Destroy __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_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_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_002f: 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_003a: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) try { EntityQuery _query_401358720_ = __instance.__query_401358720_0; NativeArray<Entity> val = ((EntityQuery)(ref _query_401358720_)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)); Enumerator<Entity> enumerator = val.GetEnumerator(); while (enumerator.MoveNext()) { Entity current = enumerator.Current; PrefabGUID prefabGuid = current.Read<PrefabGUID>(); Entity owner = current.Read<EntityOwner>().Owner; if (owner.Has<PlayerCharacter>()) { try { UserModel player = Bloody.Core.GameData.v1.GameData.Users.FromEntity(owner.Read<PlayerCharacter>().UserEntity); BuffPatch.OnPlayerBuffRemoved?.Invoke(player, current, prefabGuid); } catch { } } } val.Dispose(); } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class DealDamageSystemPatch { internal static event DamageEventHandler OnDamage; [HarmonyPatch(typeof(DealDamageSystem), "DealDamage")] [HarmonyPostfix] private static void DealDamageSystemPatch_Postfix(DealDamageSystem __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) try { EntityQuery query = __instance._Query; NativeArray<DealDamageEvent> damageEvents = ((EntityQuery)(ref query)).ToComponentDataArray<DealDamageEvent>(AllocatorHandle.op_Implicit((Allocator)2)); DealDamageSystemPatch.OnDamage?.Invoke(__instance, damageEvents); } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class DeathPatch { internal static event DeathEventHandler OnDeath; [HarmonyPatch(typeof(DeathEventListenerSystem), "OnUpdate")] [HarmonyPostfix] private static void DeathEventListenerSystemPatch_Postfix(DeathEventListenerSystem __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) try { EntityQuery deathEventQuery = __instance._DeathEventQuery; NativeArray<DeathEvent> deathEvents = ((EntityQuery)(ref deathEventQuery)).ToComponentDataArray<DeathEvent>(AllocatorHandle.op_Implicit((Allocator)2)); DeathPatch.OnDeath?.Invoke(__instance, deathEvents); } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class DeathVBloodPatch { public static event DeathVbloodEventHandler OnDeathVBlood; [HarmonyPatch(typeof(VBloodSystem), "OnUpdate")] [HarmonyPrefix] private static void OnUpdate_Prefix(VBloodSystem __instance) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) try { DeathVBloodPatch.OnDeathVBlood?.Invoke(__instance, __instance.EventList); } catch (Exception exception) { Core.Logger.LogError(exception); } } } internal class GameBootstrapPatch { internal static event GameBootstrapStartEventHandler OnStart; [HarmonyPatch(typeof(GameBootstrap), "Start")] [HarmonyPostfix] private static void Postfix() { try { GameBootstrapPatch.OnStart?.Invoke(); } catch (Exception exception) { Core.Logger.LogError(exception); } } } internal static class OnGameServerDataInitializedPatch { internal static event OnGameDataInitializedEventHandler OnCoreInitialized; [HarmonyPatch(typeof(LoadPersistenceSystemV2), "SetLoadState")] [HarmonyPostfix] private static void ServerStartupStateChange_Postfix(State loadState, LoadPersistenceSystemV2 __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 try { if ((int)loadState == 4) { World server = VWorld.Server; server = ((!VWorld.IsServer) ? VWorld.Client : VWorld.Server); OnGameServerDataInitializedPatch.OnCoreInitialized?.Invoke(server); } } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class SaveSystemPatch { internal static event SaveWorldEventHandler OnSaveWorld; [HarmonyPatch(typeof(TriggerPersistenceSaveSystem), "TriggerSave")] public static void Prefix() { SaveSystemPatch.OnSaveWorld?.Invoke(); } } internal class ServerBootstrapPatch { internal static event OnUserConnectedEventHandler OnUserConnected; internal static event OnUserDisconnectedEventHandler OnUserDisconnected; [HarmonyPatch(typeof(ServerBootstrapSystem), "OnUserConnected")] [HarmonyPrefix] internal static void Postfix(ServerBootstrapSystem __instance, NetConnectionId netConnectionId) { try { ServerBootstrapPatch.OnUserConnected?.Invoke(__instance, netConnectionId); } catch (Exception exception) { Core.Logger.LogError(exception); } } [HarmonyPatch(typeof(ServerBootstrapSystem), "OnUserDisconnected")] [HarmonyPrefix] internal static void Prefix(ServerBootstrapSystem __instance, NetConnectionId netConnectionId, ConnectionStatusChangeReason connectionStatusReason, string extraData) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) try { ServerBootstrapPatch.OnUserDisconnected?.Invoke(__instance, netConnectionId, connectionStatusReason, extraData); } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class TraderPurchasePatch { internal static event TraderPurchaseEventHandler OnTraderPurchase; [HarmonyPatch(typeof(TraderPurchaseSystem), "OnUpdate")] [HarmonyPrefix] internal static void Prefix(TraderPurchaseSystem __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) try { EntityQuery traderPurchaseEventQuery = __instance._TraderPurchaseEventQuery; NativeArray<Entity> entities = ((EntityQuery)(ref traderPurchaseEventQuery)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)); TraderPurchasePatch.OnTraderPurchase?.Invoke(entities); } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class UnitSpawnerPatch { internal static Dictionary<long, (float actualDuration, Action<Entity> Actions)> PostActions = new Dictionary<long, (float, Action<Entity>)>(); internal static bool EnabledCallBack { get; set; } = false; internal static event OnUnitSpawnedEventHandler OnUnitSpawned; [HarmonyPatch(typeof(UnitSpawnerReactSystem), "OnUpdate")] [HarmonyPostfix] internal static void Prefix(UnitSpawnerReactSystem __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_0027: 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_004e: 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_005c: 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_0063: 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_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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) try { EntityQuery query = __instance._Query; NativeArray<Entity> entities = ((EntityQuery)(ref query)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)); if (!EnabledCallBack) { UnitSpawnerPatch.OnUnitSpawned?.Invoke(entities); } Enumerator<Entity> enumerator = entities.GetEnumerator(); while (enumerator.MoveNext()) { Entity current = enumerator.Current; if (!EnabledCallBack || !current.Has<LifeTime>()) { return; } LifeTime val = current.Read<LifeTime>(); long num = (long)Mathf.Round(val.Duration); Core.Logger.LogDebug($"Found durationKey {num} from LifeTime({val.Duration})"); if (PostActions.TryGetValue(num, out (float, Action<Entity>) value)) { var (num2, action) = value; Core.Logger.LogDebug($"Found post actions for {num} with {num2} duration"); PostActions.Remove(num); LifeTimeEndAction endAction = (LifeTimeEndAction)((!(num2 < 0f)) ? 2 : 0); LifeTime componentData = new LifeTime { Duration = num2, EndAction = endAction }; current.Write<LifeTime>(componentData); action(current); } } EnabledCallBack = false; } catch (Exception exception) { Core.Logger.LogError(exception); } } } [HarmonyPatch] internal class VampireDownedPatch { public static event VampireDownedHandler OnVampireDowned; [HarmonyPatch(typeof(VampireDownedServerEventSystem), "OnUpdate")] [HarmonyPrefix] internal static void Prefix(VampireDownedServerEventSystem __instance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) EntityQuery _query_1174204813_ = __instance.__query_1174204813_0; NativeArray<Entity> deathEvents = ((EntityQuery)(ref _query_1174204813_)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)); VampireDownedPatch.OnVampireDowned?.Invoke(__instance, deathEvents); } } } namespace Bloody.Core.Patch.Client { internal static class OnGameClientDataInitializedPatch { private static bool _onCoreInitializedTriggered; internal static event OnGameDataInitializedEventHandler OnCoreInitialized; internal static event OnGameDataDestroyedEventHandler OnCoreDestroyed; [HarmonyPatch(typeof(GameDataManager), "OnUpdate")] [HarmonyPostfix] private static void CoreManagerOnUpdatePostfix(GameDataManager __instance) { if (_onCoreInitializedTriggered) { return; } try { if (__instance.GameDataInitialized) { _onCoreInitializedTriggered = true; OnGameClientDataInitializedPatch.OnCoreInitialized?.Invoke(((ComponentSystemBase)__instance).World); } } catch (Exception exception) { Core.Logger.LogError(exception); } } [HarmonyPatch(typeof(ClientBootstrapSystem), "OnDestroy")] [HarmonyPostfix] private static void ClientBootstrapSystemOnDestroyPostfix(ClientBootstrapSystem __instance) { _onCoreInitializedTriggered = false; try { OnGameClientDataInitializedPatch.OnCoreDestroyed?.Invoke(); } catch (Exception exception) { Core.Logger.LogError(exception); } } } } namespace Bloody.Core.Models.v1 { public class CharacterModel { public Entity Entity { get; } public BaseEntityModel Internals { get; } public EquipmentModel Equipment { get { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (!Internals.Equipment.HasValue) { return null; } return new EquipmentModel(Internals.Equipment.Value); } } internal CharacterModel(Entity entity) { //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_0013: Unknown result type (might be due to invalid IL or missing references) Entity = entity; Internals = new BaseEntityModel(Core.World, entity); } } public class EquipmentModel { public Equipment Internals { get; } public ItemModel Chest { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.ArmorChestSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.ArmorChestSlot.SlotEntity._Entity); } } public ItemModel Leg { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.ArmorLegsSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.ArmorLegsSlot.SlotEntity._Entity); } } public ItemModel Headgear { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.ArmorHeadgearSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.ArmorHeadgearSlot.SlotEntity._Entity); } } public ItemModel Footgear { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.ArmorFootgearSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.ArmorFootgearSlot.SlotEntity._Entity); } } public ItemModel Gloves { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.ArmorGlovesSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.ArmorGlovesSlot.SlotEntity._Entity); } } public ItemModel Cloak { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.CloakSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.CloakSlot.SlotEntity._Entity); } } public ItemModel Weapon { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.WeaponSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.WeaponSlot.SlotEntity._Entity); } } public ItemModel Jewelry { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0015: 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_002e: 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) if (!(Internals.GrimoireSlot.SlotEntity._Entity != Entity.Null)) { return null; } return new ItemModel(Internals.GrimoireSlot.SlotEntity._Entity); } } public float ArmorLevel { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Equipment internals = Internals; return ((ModifiableFloat)(ref internals.ArmorLevel)).Value; } } public float WeaponLevel { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Equipment internals = Internals; return ((ModifiableFloat)(ref internals.WeaponLevel)).Value; } } public float SpellLevel { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Equipment internals = Internals; return ((ModifiableFloat)(ref internals.SpellLevel)).Value; } } public float Level => ArmorLevel + WeaponLevel + SpellLevel; public EquipmentModel(Equipment equipment) { //IL_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) Internals = equipment; } } public class InventoryModel { private readonly CharacterModel _characterModel; public List<InventoryItemData> Items => GetInventoryItems(); internal InventoryModel(CharacterModel characterModel) { _characterModel = characterModel; } private List<InventoryItemData> GetInventoryItems() { //IL_0005: 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_0023: Unknown result type (might be due to invalid IL or missing references) Entity entity = default(Entity); InventoryUtilities.TryGetInventoryEntity(Core.World.EntityManager, _characterModel.Entity, ref entity, 0); List<InventoryBuffer> inventoryBuffers = new BaseEntityModel(Core.World, entity).InventoryBuffers; if (inventoryBuffers == null) { return new List<InventoryItemData>(); } return inventoryBuffers.Select(delegate(InventoryBuffer i, int index) { //IL_002a: 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_002f: 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_0042: Unknown result type (might be due to invalid IL or missing references) Entity entity2 = ((((PrefabGUID)(ref i.ItemType)).GuidHash == 0) ? Entity.Null : ((PrefabLookupMap)(ref ((PrefabCollectionSystem_Base)Core.SystemsCore.PrefabCollectionSystem).PrefabLookupMap))[i.ItemType]); return new InventoryItemData { Item = new ItemModel(entity2), Stacks = i.Amount, Slot = index }; }).ToList(); } } public class ItemModel : EntityModel { public BaseManagedDataModel ManagedCore { get; } public string PrefabName { get; } public string Name { get { //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) BaseManagedDataModel managedCore = ManagedCore; if (managedCore == null) { return null; } ManagedItemData managedItemData = managedCore.ManagedItemData; if (managedItemData == null) { return null; } LocalizationKey name = managedItemData.Name; return ((object)(LocalizationKey)(ref name)).ToString(); } } public ItemCategory ItemCategory => (ItemCategory)(((??)base.Internals.ItemData?.ItemCategory) ?? 0); public ItemType ItemType => (ItemType)(((??)base.Internals.ItemData?.ItemType) ?? 0); public EquipmentType EquipmentType => (EquipmentType)(((??)base.Internals.EquippableData?.EquipmentType) ?? 11); internal ItemModel(Entity entity) : base(entity) { //IL_0001: 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) PrefabName = base.Internals.PrefabGUID?.GetPrefabName(); ManagedCore = new BaseManagedDataModel(Core.World, base.Internals); } } public class NpcModel : EntityModel { private static readonly HashSet<UnitCategory> _npcCategories = new HashSet<UnitCategory> { (UnitCategory)4, (UnitCategory)2, (UnitCategory)0, (UnitCategory)1, (UnitCategory)3 }; public new PrefabGUID PrefabGUID => base.Internals.PrefabGUID.GetValueOrDefault(); public bool IsDead => base.Internals.DeathBuff.HasValue; public float LifeTime => base.Internals.LifeTime?.Duration ?? 0f; public float3 Position { get { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) LocalToWorld? localToWorld = base.Internals.LocalToWorld; if (!localToWorld.HasValue) { return default(float3); } LocalToWorld valueOrDefault = localToWorld.GetValueOrDefault(); return ((LocalToWorld)(ref valueOrDefault)).Position; } } internal NpcModel(Entity entity) : base(entity) { //IL_0001: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) EntityCategory? entityCategory = base.Internals.EntityCategory; if (entityCategory.HasValue) { EntityCategory value = entityCategory.Value; if ((int)((EntityCategory)(ref value)).MainCategory == 0) { HashSet<UnitCategory> npcCategories = _npcCategories; value = entityCategory.Value; if (npcCategories.Contains(((EntityCategory)(ref value)).UnitCategory)) { return; } } } throw new Exception("Given entity is not a NPC."); } } public class UserModel : EntityModel { public InventoryModel Inventory { get; } public CharacterModel Character { get; } public string CharacterName { get { //IL_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) User value = base.Internals.User.Value; return ((object)(FixedString64Bytes)(ref value.CharacterName)).ToString(); } } public EquipmentModel Equipment => Character.Equipment; public FromCharacter FromCharacter { get { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) FromCharacter result = default(FromCharacter); result.User = base.Entity; result.Character = Character.Entity; return result; } } public bool IsAdmin => base.Internals.User.Value.IsAdmin; public bool IsConnected => base.Internals.User.Value.IsConnected; public ulong PlatformId => base.Internals.User.Value.PlatformId; public float3 Position { get { //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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) LocalToWorld? localToWorld = base.Internals.LocalToWorld; if (!localToWorld.HasValue) { return default(float3); } LocalToWorld valueOrDefault = localToWorld.GetValueOrDefault(); return ((LocalToWorld)(ref valueOrDefault)).Position; } } public UserContentFlags UserContent => base.Internals.User.Value.UserContent; internal UserModel(Entity entity) : base(entity) { //IL_0001: 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_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) Character = new CharacterModel(base.Internals.User.Value.LocalCharacter._Entity); Inventory = new InventoryModel(Character); } } } namespace Bloody.Core.Models.v1.Internals { public class BaseEntityModel { private readonly World _world; private readonly Entity _entity; public bool DisallowEntityDestruction => _world.EntityManager.HasComponentInternal<DisallowEntityDestruction>(_entity); public bool Prefab => _world.EntityManager.HasComponentInternal<Prefab>(_entity); public bool Simulate => _world.EntityManager.HasComponentInternal<Simulate>(_entity); public WorldTypeSingleton? WorldTypeSingleton { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<WorldTypeSingleton>(_entity, out WorldTypeSingleton value)) { return null; } return value; } } public SceneSystemConfiguration? SceneSystemConfiguration { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<SceneSystemConfiguration>(_entity, out SceneSystemConfiguration value)) { return null; } return value; } } public ServerRuntimeSettings? ServerRuntimeSettings { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ServerRuntimeSettings>(_entity, out ServerRuntimeSettings value)) { return null; } return value; } } public EntityOwner? EntityOwner { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<EntityOwner>(_entity, out EntityOwner value)) { return null; } return value; } } public Age? Age { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<Age>(_entity, out Age value)) { return null; } return value; } } public LifeTime? LifeTime { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<LifeTime>(_entity, out LifeTime value)) { return null; } return value; } } public ModifyRotation? ModifyRotation { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ModifyRotation>(_entity, out ModifyRotation value)) { return null; } return value; } } public List<RelicDropped> RelicDroppeds => _world.EntityManager.GetBufferInternal<RelicDropped>(_entity); public RotateTowardsAimDirectionDuringCastActive? RotateTowardsAimDirectionDuringCastActive { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<RotateTowardsAimDirectionDuringCastActive>(_entity, out RotateTowardsAimDirectionDuringCastActive value)) { return null; } return value; } } public DestroyData? DestroyData { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<DestroyData>(_entity, out DestroyData value)) { return null; } return value; } } public DestroyState? DestroyState { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<DestroyState>(_entity, out DestroyState value)) { return null; } return value; } } public PhysicsCollider? PhysicsCollider { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsCollider>(_entity, out PhysicsCollider value)) { return null; } return value; } } public StaticPhysicsWorldBodyIndex? StaticPhysicsWorldBodyIndex { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<StaticPhysicsWorldBodyIndex>(_entity, out StaticPhysicsWorldBodyIndex value)) { return null; } return value; } } public LocalToWorld? LocalToWorld { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<LocalToWorld>(_entity, out LocalToWorld value)) { return null; } return value; } } public TeleportationRequest? TeleportationRequest { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TeleportationRequest>(_entity, out TeleportationRequest value)) { return null; } return value; } } public bool TileModelRegistrationState => _world.EntityManager.HasComponentInternal<TileModelRegistrationState>(_entity); public ModifyMovementDuringCastActive? ModifyMovementDuringCastActive { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ModifyMovementDuringCastActive>(_entity, out ModifyMovementDuringCastActive value)) { return null; } return value; } } public Sun? Sun { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<Sun>(_entity, out Sun value)) { return null; } return value; } } public CloudCookieLight CloudCookieLight { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<CloudCookieLight>(_entity, out CloudCookieLight value)) { return null; } return value; } } public ServerGameBalanceSettings? ServerGameBalanceSettings { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ServerGameBalanceSettings>(_entity, out ServerGameBalanceSettings value)) { return null; } return value; } } public TerrainChunkLoadedEvent? TerrainChunkLoadedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TerrainChunkLoadedEvent>(_entity, out TerrainChunkLoadedEvent value)) { return null; } return value; } } public TerrainChunkUnloadedEvent? TerrainChunkUnloadedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TerrainChunkUnloadedEvent>(_entity, out TerrainChunkUnloadedEvent value)) { return null; } return value; } } public TerrainChunkMetadataLoadedEvent? TerrainChunkMetadataLoadedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TerrainChunkMetadataLoadedEvent>(_entity, out TerrainChunkMetadataLoadedEvent value)) { return null; } return value; } } public MapZoneData? MapZoneData { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<MapZoneData>(_entity, out MapZoneData value)) { return null; } return value; } } public List<MapZonePolygonVertexElement> MapZonePolygonVertexElements => _world.EntityManager.GetBufferInternal<MapZonePolygonVertexElement>(_entity); public List<MapZoneDiscoverableElement> MapZoneDiscoverableElements => _world.EntityManager.GetBufferInternal<MapZoneDiscoverableElement>(_entity); public WorldFrame? WorldFrame { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<WorldFrame>(_entity, out WorldFrame value)) { return null; } return value; } } public List<AbilityGroupSlotModificationBuffer> AbilityGroupSlotModificationBuffers => _world.EntityManager.GetBufferInternal<AbilityGroupSlotModificationBuffer>(_entity); public AbilityCastStartedEvent? AbilityCastStartedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityCastStartedEvent>(_entity, out AbilityCastStartedEvent value)) { return null; } return value; } } public AbilityPreCastFinishedEvent? AbilityPreCastFinishedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityPreCastFinishedEvent>(_entity, out AbilityPreCastFinishedEvent value)) { return null; } return value; } } public AbilityPostCastFinishedEvent? AbilityPostCastFinishedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityPostCastFinishedEvent>(_entity, out AbilityPostCastFinishedEvent value)) { return null; } return value; } } public AbilityPreCastEndedEvent? AbilityPreCastEndedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityPreCastEndedEvent>(_entity, out AbilityPreCastEndedEvent value)) { return null; } return value; } } public AbilityPostCastEndedEvent? AbilityPostCastEndedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityPostCastEndedEvent>(_entity, out AbilityPostCastEndedEvent value)) { return null; } return value; } } public AbilityCastEndedEvent? AbilityCastEndedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityCastEndedEvent>(_entity, out AbilityCastEndedEvent value)) { return null; } return value; } } public AbilityInterruptedEvent? AbilityInterruptedEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<AbilityInterruptedEvent>(_entity, out AbilityInterruptedEvent value)) { return null; } return value; } } public ToggleDisabledEvent? ToggleDisabledEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ToggleDisabledEvent>(_entity, out ToggleDisabledEvent value)) { return null; } return value; } } public PhysicsWorldSingleton? PhysicsWorldSingleton { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsWorldSingleton>(_entity, out PhysicsWorldSingleton value)) { return null; } return value; } } public MoveDuringCastActive? MoveDuringCastActive { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<MoveDuringCastActive>(_entity, out MoveDuringCastActive value)) { return null; } return value; } } public DestroyedEntity? DestroyedEntity { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<DestroyedEntity>(_entity, out DestroyedEntity value)) { return null; } return value; } } public FrameChanged? FrameChanged { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<FrameChanged>(_entity, out FrameChanged value)) { return null; } return value; } } public NetworkSnapshot? NetworkSnapshot { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<NetworkSnapshot>(_entity, out NetworkSnapshot value)) { return null; } return value; } } public List<NetSnapshot> NetSnapshots => _world.EntityManager.GetBufferInternal<NetSnapshot>(_entity); public List<SnapshotFrameChangedBuffer> SnapshotFrameChangedBuffers => _world.EntityManager.GetBufferInternal<SnapshotFrameChangedBuffer>(_entity); public bool NewDestroyedEntity => _world.EntityManager.HasComponentInternal<NewDestroyedEntity>(_entity); public List<Snapshot_CastleBuildingAttachedChildrenBuffer> Snapshot_CastleBuildingAttachedChildrenBuffer => _world.EntityManager.GetBufferInternal<Snapshot_CastleBuildingAttachedChildrenBuffer>(_entity); public List<Snapshot_CastleBuildingAttachToParentsBuffer> Snapshot_CastleBuildingAttachToParentsBuffer => _world.EntityManager.GetBufferInternal<Snapshot_CastleBuildingAttachToParentsBuffer>(_entity); public List<Snapshot_ResearchBuffer> Snapshot_ResearchBuffer => _world.EntityManager.GetBufferInternal<Snapshot_ResearchBuffer>(_entity); public List<Snapshot_InventoryInstanceElement> Snapshot_InventoryInstanceElement => _world.EntityManager.GetBufferInternal<Snapshot_InventoryInstanceElement>(_entity); public List<Snapshot_AbilityStateBuffer> Snapshot_AbilityStateBuffer => _world.EntityManager.GetBufferInternal<Snapshot_AbilityStateBuffer>(_entity); public List<Snapshot_RefinementstationRecipesBuffer> Snapshot_RefinementstationRecipesBuffer => _world.EntityManager.GetBufferInternal<Snapshot_RefinementstationRecipesBuffer>(_entity); public List<Snapshot_QueuedWorkstationCraftAction> Snapshot_QueuedWorkstationCraftAction => _world.EntityManager.GetBufferInternal<Snapshot_QueuedWorkstationCraftAction>(_entity); public List<Snapshot_SpawnedUnitsBuffer> Snapshot_SpawnedUnitsBuffer => _world.EntityManager.GetBufferInternal<Snapshot_SpawnedUnitsBuffer>(_entity); public List<Snapshot_MegaStaticDestroyedBuffer> Snapshot_MegaStaticDestroyedBuffer => _world.EntityManager.GetBufferInternal<Snapshot_MegaStaticDestroyedBuffer>(_entity); public List<Snapshot_MegaStaticPrefabBuffer> Snapshot_MegaStaticPrefabBuffer => _world.EntityManager.GetBufferInternal<Snapshot_MegaStaticPrefabBuffer>(_entity); public List<Snapshot_AllyPermission> Snapshot_AllyPermission => _world.EntityManager.GetBufferInternal<Snapshot_AllyPermission>(_entity); public List<Snapshot_RespawnPointOwnerBuffer> Snapshot_RespawnPointOwnerBuffer => _world.EntityManager.GetBufferInternal<Snapshot_RespawnPointOwnerBuffer>(_entity); public List<Snapshot_UnlockedWaypointElement> Snapshot_UnlockedWaypointElement => _world.EntityManager.GetBufferInternal<Snapshot_UnlockedWaypointElement>(_entity); public List<Snapshot_UserMapZoneElement> Snapshot_UserMapZoneElement => _world.EntityManager.GetBufferInternal<Snapshot_UserMapZoneElement>(_entity); public List<Snapshot_ClanMemberStatus> Snapshot_ClanMemberStatus => _world.EntityManager.GetBufferInternal<Snapshot_ClanMemberStatus>(_entity); public List<Snapshot_FollowerBuffer> Snapshot_FollowerBuffer => _world.EntityManager.GetBufferInternal<Snapshot_FollowerBuffer>(_entity); public List<Snapshot_UnlockedSpellBookAbility> Snapshot_UnlockedSpellBookAbility => _world.EntityManager.GetBufferInternal<Snapshot_UnlockedSpellBookAbility>(_entity); public List<Snapshot_PerksBuffer> Snapshot_PerksBuffer => _world.EntityManager.GetBufferInternal<Snapshot_PerksBuffer>(_entity); public List<Snapshot_AchievementInProgressElement> Snapshot_AchievementInProgressElement => _world.EntityManager.GetBufferInternal<Snapshot_AchievementInProgressElement>(_entity); public List<Snapshot_InventoryBuffer> Snapshot_InventoryBuffer => _world.EntityManager.GetBufferInternal<Snapshot_InventoryBuffer>(_entity); public List<Snapshot_ActiveServantMission> Snapshot_ActiveServantMission => _world.EntityManager.GetBufferInternal<Snapshot_ActiveServantMission>(_entity); public List<Snapshot_CastleMemberNames> Snapshot_CastleMemberNames => _world.EntityManager.GetBufferInternal<Snapshot_CastleMemberNames>(_entity); public List<Snapshot_CastleTeleporterElement> Snapshot_CastleTeleporterElement => _world.EntityManager.GetBufferInternal<Snapshot_CastleTeleporterElement>(_entity); public List<Snapshot_LearnablePassivesBuffer> Snapshot_LearnablePassivesBuffer => _world.EntityManager.GetBufferInternal<Snapshot_LearnablePassivesBuffer>(_entity); public List<Snapshot_TradeCost> Snapshot_TradeCost => _world.EntityManager.GetBufferInternal<Snapshot_TradeCost>(_entity); public List<Snapshot_TradeOutput> Snapshot_TradeOutput => _world.EntityManager.GetBufferInternal<Snapshot_TradeOutput>(_entity); public List<Snapshot_TraderEntry> Snapshot_TraderEntry => _world.EntityManager.GetBufferInternal<Snapshot_TraderEntry>(_entity); public List<Snapshot_CastleBuildingFusedChildrenBuffer> Snapshot_CastleBuildingFusedChildrenBuffer => _world.EntityManager.GetBufferInternal<Snapshot_CastleBuildingFusedChildrenBuffer>(_entity); public List<Snapshot_CastleTerritoryDecay> Snapshot_CastleTerritoryDecay => _world.EntityManager.GetBufferInternal<Snapshot_CastleTerritoryDecay>(_entity); public List<Snapshot_CastleTerritoryOccupant> Snapshot_CastleTerritoryOccupant => _world.EntityManager.GetBufferInternal<Snapshot_CastleTerritoryOccupant>(_entity); public List<Snapshot_Script_Dracula_WarpRiftTargetData> Snapshot_Script_Dracula_WarpRiftTargetData => _world.EntityManager.GetBufferInternal<Snapshot_Script_Dracula_WarpRiftTargetData>(_entity); public List<Snapshot_MusicPlayerStation_PlaylistElement> Snapshot_MusicPlayerStation_PlaylistElement => _world.EntityManager.GetBufferInternal<Snapshot_MusicPlayerStation_PlaylistElement>(_entity); public List<Snapshot_MusicPlayerStation_UnlockedTrackElement> Snapshot_MusicPlayerStation_UnlockedTrackElement => _world.EntityManager.GetBufferInternal<Snapshot_MusicPlayerStation_UnlockedTrackElement>(_entity); public WorldTime? WorldTime { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<WorldTime>(_entity, out WorldTime value)) { return null; } return value; } } public List<WorldTimeQueue> WorldTimeQueues => _world.EntityManager.GetBufferInternal<WorldTimeQueue>(_entity); public PhysicsStep? PhysicsStep { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsStep>(_entity, out PhysicsStep value)) { return null; } return value; } } public KnockbackAssetsSingleton? KnockbackAssetsSingleton { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<KnockbackAssetsSingleton>(_entity, out KnockbackAssetsSingleton value)) { return null; } return value; } } public bool GameDataLoadingStartedSingleton => _world.EntityManager.HasComponentInternal<GameDataLoadingStartedSingleton>(_entity); public List<PublicEntityRef> PublicEntityRefs => _world.EntityManager.GetBufferInternal<PublicEntityRef>(_entity); public bool StaticSceneTag => _world.EntityManager.HasComponentInternal<StaticSceneTag>(_entity); public WarEvent_MapNode? WarEvent_MapNode { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<WarEvent_MapNode>(_entity, out WarEvent_MapNode value)) { return null; } return value; } } public bool BlobAssetOwner => _world.EntityManager.HasComponentInternal<BlobAssetOwner>(_entity); public LoadToTargetWorld? LoadToTargetWorld { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<LoadToTargetWorld>(_entity, out LoadToTargetWorld value)) { return null; } return value; } } public SceneEntityReference? SceneEntityReference { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<SceneEntityReference>(_entity, out SceneEntityReference value)) { return null; } return value; } } public SceneSectionData? SceneSectionData { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<SceneSectionData>(_entity, out SceneSectionData value)) { return null; } return value; } } public RequestSceneLoaded? RequestSceneLoaded { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<RequestSceneLoaded>(_entity, out RequestSceneLoaded value)) { return null; } return value; } } public ResolvedSectionPath? ResolvedSectionPath { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ResolvedSectionPath>(_entity, out ResolvedSectionPath value)) { return null; } return value; } } public SceneBoundingVolume? SceneBoundingVolume { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<SceneBoundingVolume>(_entity, out SceneBoundingVolume value)) { return null; } return value; } } public bool IsSectionLoaded => _world.EntityManager.HasComponentInternal<IsSectionLoaded>(_entity); public ResolvedSceneHash? ResolvedSceneHash { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<ResolvedSceneHash>(_entity, out ResolvedSceneHash value)) { return null; } return value; } } public SceneReference? SceneReference { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<SceneReference>(_entity, out SceneReference value)) { return null; } return value; } } public List<LinkedEntityGroup> LinkedEntityGroups => _world.EntityManager.GetBufferInternal<LinkedEntityGroup>(_entity); public List<ResolvedSectionEntity> ResolvedSectionEntities => _world.EntityManager.GetBufferInternal<ResolvedSectionEntity>(_entity); public PostLoadCommandBuffer PostLoadCommandBuffer { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown if (!_world.EntityManager.TryGetComponentDataInternal<PostLoadCommandBuffer>(_entity, out PostLoadCommandBuffer value)) { return new PostLoadCommandBuffer(); } return value; } } public List<WorldAssetChunks> WorldAssetChunks => _world.EntityManager.GetBufferInternal<WorldAssetChunks>(_entity); public bool WorldAssetSingleton => _world.EntityManager.HasComponentInternal<WorldAssetSingleton>(_entity); public bool WorldConfigSingleton => _world.EntityManager.HasComponentInternal<WorldConfigSingleton>(_entity); public PrefabGUID? PrefabGUID { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PrefabGUID>(_entity, out PrefabGUID value)) { return null; } return value; } } public bool ConvertedScriptableObject => _world.EntityManager.HasComponentInternal<ConvertedScriptableObject>(_entity); public Rotation? Rotation { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<Rotation>(_entity, out Rotation value)) { return null; } return value; } } public Translation? Translation { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<Translation>(_entity, out Translation value)) { return null; } return value; } } public LocalTransform? LocalTransform { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<LocalTransform>(_entity, out LocalTransform value)) { return null; } return value; } } public bool ScriptableObjectCollectionTag => _world.EntityManager.HasComponentInternal<ScriptableObjectCollectionTag>(_entity); public bool GameDataSubSceneTag => _world.EntityManager.HasComponentInternal<GameDataSubSceneTag>(_entity); public RegisterCurveBlobEvent? RegisterCurveBlobEvent { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<RegisterCurveBlobEvent>(_entity, out RegisterCurveBlobEvent value)) { return null; } return value; } } public bool Disabled => _world.EntityManager.HasComponentInternal<Disabled>(_entity); public PhysicsMass? PhysicsMass { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsMass>(_entity, out PhysicsMass value)) { return null; } return value; } } public PhysicsVelocity? PhysicsVelocity { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsVelocity>(_entity, out PhysicsVelocity value)) { return null; } return value; } } public PhysicsDamping? PhysicsDamping { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsDamping>(_entity, out PhysicsDamping value)) { return null; } return value; } } public PhysicsGravityFactor? PhysicsGravityFactor { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsGravityFactor>(_entity, out PhysicsGravityFactor value)) { return null; } return value; } } public bool PhysicsWorldIndex => _world.EntityManager.HasComponentInternal<PhysicsWorldIndex>(_entity); public PostTransformMatrix? PostTransformMatrix { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PostTransformMatrix>(_entity, out PostTransformMatrix value)) { return null; } return value; } } public bool SpawnTag => _world.EntityManager.HasComponentInternal<SpawnTag>(_entity); public PhysicsRubble? PhysicsRubble { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PhysicsRubble>(_entity, out PhysicsRubble value)) { return null; } return value; } } public PlacementDestroyData? PlacementDestroyData { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<PlacementDestroyData>(_entity, out PlacementDestroyData value)) { return null; } return value; } } public TileBounds? TileBounds { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TileBounds>(_entity, out TileBounds value)) { return null; } return value; } } public TileModelSpatialData? TileModelSpatialData { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TileModelSpatialData>(_entity, out TileModelSpatialData value)) { return null; } return value; } } public TileData? TileData { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TileData>(_entity, out TileData value)) { return null; } return value; } } public StaticTransformCompatible? StaticTransformCompatible { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<StaticTransformCompatible>(_entity, out StaticTransformCompatible value)) { return null; } return value; } } public Networked? Networked { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<Networked>(_entity, out Networked value)) { return null; } return value; } } public UpToDateUserBitMask? UpToDateUserBitMask { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<UpToDateUserBitMask>(_entity, out UpToDateUserBitMask value)) { return null; } return value; } } public TileModel? TileModel { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TileModel>(_entity, out TileModel value)) { return null; } return value; } } public TilePosition? TilePosition { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<TilePosition>(_entity, out TilePosition value)) { return null; } return value; } } public NetworkId? NetworkId { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<NetworkId>(_entity, out NetworkId value)) { return null; } return value; } } public bool TilePlacementTag => _world.EntityManager.HasComponentInternal<TilePlacementTag>(_entity); public bool DisableWhenNoPlayersInRange => _world.EntityManager.HasComponentInternal<DisableWhenNoPlayersInRange>(_entity); public bool MegaStaticCompatibleTag => _world.EntityManager.HasComponentInternal<MegaStaticCompatibleTag>(_entity); public bool RunCastleCleanupOnDeath => _world.EntityManager.HasComponentInternal<RunCastleCleanupOnDeath>(_entity); public bool StaticTileModel => _world.EntityManager.HasComponentInternal<StaticTileModel>(_entity); public bool NetworkSnapshotType => _world.EntityManager.HasComponentInternal<NetworkSnapshotType>(_entity); public bool TileModelLayer => _world.EntityManager.HasComponentInternal<TileModelLayer>(_entity); public SpawnPhysicsObjectOnDeath? SpawnPhysicsObjectOnDeath { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<SpawnPhysicsObjectOnDeath>(_entity, out SpawnPhysicsObjectOnDeath value)) { return null; } return value; } } public Health? Health { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<Health>(_entity, out Health value)) { return null; } return value; } } public HealthConstants? HealthConstants { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<HealthConstants>(_entity, out HealthConstants value)) { return null; } return value; } } public CollisionRadius? CollisionRadius { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!_world.EntityManager.TryGetComponentDataInternal<CollisionRadius>(_entity, out CollisionRadius value)) { return null; } return value; } } public Team? Team { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0