using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Cpp2IL.Core.Extensions;
using HarmonyLib;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Il2CppSystem.Reflection;
using Microsoft.CodeAnalysis;
using ProjectM;
using ProjectM.CastleBuilding;
using ProjectM.Gameplay.Scripting;
using ProjectM.Network;
using ProjectM.Scripting;
using ProjectM.Shared;
using ProjectM.Terrain;
using ProjectM.UI;
using Stunlock.Core;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;
using VRisingMods.Core.CastleTerritory.Models;
using VRisingMods.Core.Player;
using VRisingMods.Core.Prefabs;
using VRisingMods.Core.Utilities;
using VampireCommandFramework;
using cheesasaurus.VRisingMods.SystemsDumper.CodeGeneration;
using cheesasaurus.VRisingMods.SystemsDumper.Commands;
using cheesasaurus.VRisingMods.SystemsDumper.Dumpers;
using cheesasaurus.VRisingMods.SystemsDumper.Models;
using cheesasaurus.VRisingMods.SystemsDumper.Patches;
using cheesasaurus.VRisingMods.SystemsDumper.Services;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("Nicholas Toby")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyCopyright("Copyright (c) Nicholas Toby 2025")]
[assembly: AssemblyDescription("Development tool. Dumps information about ECS Systems.")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0+45cf6998f8fb52346a58bc32c3411c8c3d36cc42")]
[assembly: AssemblyProduct("SystemsDumper")]
[assembly: AssemblyTitle("SystemsDumper")]
[assembly: AssemblyMetadata("Reloadable", "True")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace VRisingMods.Core.Utilities
{
public static class AotWorkaroundUtil
{
public static bool HasComponent<T>(Entity entity) where T : struct
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
return ((EntityManager)(ref entityManager)).HasComponent(entity, ComponentType<T>());
}
public static bool AddComponent<T>(Entity entity) where T : struct
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
return ((EntityManager)(ref entityManager)).AddComponent(entity, ComponentType<T>());
}
public static void AddComponentData<T>(Entity entity, T componentData) where T : struct
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
AddComponent<T>(entity);
SetComponentData(entity, componentData);
}
public static bool RemoveComponent<T>(Entity entity) where T : struct
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
return ((EntityManager)(ref entityManager)).RemoveComponent(entity, ComponentType<T>());
}
public unsafe static T GetComponentData<T>(Entity entity) where T : struct
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
void* componentDataRawRO = ((EntityManager)(ref entityManager)).GetComponentDataRawRO(entity, TypeIndex.op_Implicit(ComponentTypeIndex<T>()));
return Marshal.PtrToStructure<T>(new IntPtr(componentDataRawRO));
}
public unsafe static void SetComponentData<T>(Entity entity, T componentData) where T : struct
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
int num = Marshal.SizeOf(componentData);
fixed (byte* ptr = StructureToByteArray(componentData))
{
EntityManager entityManager = WorldUtil.Server.EntityManager;
((EntityManager)(ref entityManager)).SetComponentDataRaw(entity, TypeIndex.op_Implicit(ComponentTypeIndex<T>()), (void*)ptr, num);
}
}
private static ComponentType ComponentType<T>()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
return new ComponentType(Il2CppType.Of<T>(), (AccessMode)0);
}
private static int ComponentTypeIndex<T>()
{
//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)
return TypeIndex.op_Implicit(ComponentType<T>().TypeIndex);
}
private static byte[] StructureToByteArray<T>(T structure) where T : struct
{
int num = Marshal.SizeOf(structure);
byte[] array = new byte[num];
IntPtr intPtr = Marshal.AllocHGlobal(num);
try
{
Marshal.StructureToPtr(structure, intPtr, fDeleteOld: true);
Marshal.Copy(intPtr, array, 0, num);
}
finally
{
Marshal.FreeHGlobal(intPtr);
}
return array;
}
}
public static class DebugUtil
{
public static void LogComponentTypesFromQueries(ComponentSystemBase systemBase)
{
//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_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
LogUtil.LogInfo("========================================");
int num = 0;
foreach (EntityQuery item in (Il2CppArrayBase<EntityQuery>)(object)systemBase.EntityQueries)
{
EntityQuery current = item;
LogUtil.LogInfo($"query#{num}--------------------------------");
NativeArray<Entity> val = ((EntityQuery)(ref current)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
for (int i = 0; i < val.Length; i++)
{
LogComponentTypes(val[i]);
}
num++;
}
}
public static void LogComponentTypes(Entity entity)
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_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)
LogUtil.LogMessage("-------------------------------------------");
EntityManager entityManager = WorldUtil.Game.EntityManager;
Enumerator<ComponentType> enumerator = ((EntityManager)(ref entityManager)).GetComponentTypes(entity, (Allocator)2).GetEnumerator();
while (enumerator.MoveNext())
{
ComponentType current = enumerator.Current;
LogUtil.LogMessage(((object)(ComponentType)(ref current)).ToString());
}
LogUtil.LogMessage("-------------------------------------------");
}
public static void LogPrefabGuid(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasComponent<PrefabGUID>(entity))
{
PrefabGUID componentData = ((EntityManager)(ref entityManager)).GetComponentData<PrefabGUID>(entity);
LogUtil.LogInfo(" PrefabGUID: " + LookupPrefabName(componentData));
}
}
public static void LogPlayerCharacter(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: 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_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasComponent<PlayerCharacter>(entity))
{
PlayerCharacter componentData = ((EntityManager)(ref entityManager)).GetComponentData<PlayerCharacter>(entity);
LogUtil.LogInfo(" PlayerCharacter:");
LogUtil.LogInfo($" Name: {componentData.Name}");
LogUtil.LogInfo($" SmartClanName: {componentData.SmartClanName}");
LogUtil.LogInfo($" UserEntity: {componentData.UserEntity}");
}
}
public static void LogVampireSpecificAttributes(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: 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_05c6: Unknown result type (might be due to invalid IL or missing references)
//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
//IL_05f9: Unknown result type (might be due to invalid IL or missing references)
//IL_062a: Unknown result type (might be due to invalid IL or missing references)
//IL_062b: Unknown result type (might be due to invalid IL or missing references)
//IL_065c: Unknown result type (might be due to invalid IL or missing references)
//IL_065d: Unknown result type (might be due to invalid IL or missing references)
//IL_068e: Unknown result type (might be due to invalid IL or missing references)
//IL_068f: Unknown result type (might be due to invalid IL or missing references)
//IL_06f8: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasComponent<VampireSpecificAttributes>(entity))
{
VampireSpecificAttributes componentData = ((EntityManager)(ref entityManager)).GetComponentData<VampireSpecificAttributes>(entity);
LogUtil.LogInfo(" VampireSpecificAttributes:");
LogUtil.LogInfo($" SilverCoinResisteance: {((ModifiableInt)(ref componentData.SilverCoinResistance)).Value}");
LogUtil.LogInfo($" PvPResilience: {((ModifiableInt)(ref componentData.PvPResilience)).Value}");
LogUtil.LogInfo($" HolyResistance: {((ModifiableInt)(ref componentData.HolyResistance)).Value}");
LogUtil.LogInfo($" SilverResistance: {((ModifiableInt)(ref componentData.SilverResistance)).Value}");
LogUtil.LogInfo($" GarlicResistance: {((ModifiableInt)(ref componentData.GarlicResistance)).Value}");
LogUtil.LogInfo($" SunResistance: {((ModifiableInt)(ref componentData.SunResistance)).Value}");
LogUtil.LogInfo($" PhysicalCriticalStrikeChance: {((ModifiableFloat)(ref componentData.PhysicalCriticalStrikeChance)).Value}");
LogUtil.LogInfo($" PhysicalCriticalStrikeDamage: {((ModifiableFloat)(ref componentData.PhysicalCriticalStrikeDamage)).Value}");
LogUtil.LogInfo($" SpellCriticalStrikeChance: {((ModifiableFloat)(ref componentData.SpellCriticalStrikeChance)).Value}");
LogUtil.LogInfo($" SpellCriticalStrikeDamage: {((ModifiableFloat)(ref componentData.SpellCriticalStrikeDamage)).Value}");
LogUtil.LogInfo($" BonusPhysicalPower: {((ModifiableFloat)(ref componentData.BonusPhysicalPower)).Value}");
LogUtil.LogInfo($" BonusSpellPower: {((ModifiableFloat)(ref componentData.BonusSpellPower)).Value}");
LogUtil.LogInfo($" BonusMaxHealth: {((ModifiableFloat)(ref componentData.BonusMaxHealth)).Value}");
LogUtil.LogInfo($" BonusMovementSpeed: {((ModifiableFloat)(ref componentData.BonusMovementSpeed)).Value}");
LogUtil.LogInfo($" BonusShapeshiftMovementSpeed: {((ModifiableFloat)(ref componentData.BonusShapeshiftMovementSpeed)).Value}");
LogUtil.LogInfo($" ResourceYieldModifier: {((ModifiableFloat)(ref componentData.ResourceYieldModifier)).Value}");
LogUtil.LogInfo($" ReducedResourceDurabilityLoss: {((ModifiableFloat)(ref componentData.ReducedResourceDurabilityLoss)).Value}");
LogUtil.LogInfo($" IncreasedShieldEfficiency: {((ModifiableFloat)(ref componentData.IncreasedShieldEfficiency)).Value}");
LogUtil.LogInfo($" UltimateEfficiency: {((ModifiableFloat)(ref componentData.UltimateEfficiency)).Value}");
LogUtil.LogInfo($" WeaponSkillPower: {((ModifiableFloat)(ref componentData.WeaponSkillPower)).Value}");
LogUtil.LogInfo($" SpellFreeCast: {((ModifiableFloat)(ref componentData.SpellFreeCast)).Value}");
LogUtil.LogInfo($" WeaponFreeCast: {((ModifiableFloat)(ref componentData.WeaponFreeCast)).Value}");
LogUtil.LogInfo($" BloodMendHealEfficiency: {((ModifiableFloat)(ref componentData.BloodMendHealEfficiency)).Value}");
LogUtil.LogInfo($" DemountProtection: {((ModifiableFloat)(ref componentData.DemountProtection)).Value}");
LogUtil.LogInfo($" AdditionalInventorySlots: {((ModifiableFloat)(ref componentData.AdditionalInventorySlots)).Value}");
LogUtil.LogInfo($" BonusPhysicalPowerModId: {componentData.BonusPhysicalPowerModId}");
LogUtil.LogInfo($" BonusSpellPowerModId: {componentData.BonusSpellPowerModId}");
LogUtil.LogInfo($" BonusMaxHealthModId: {componentData.BonusMaxHealthModId}");
LogUtil.LogInfo($" BonusMovementSpeedModId: {componentData.BonusMovementSpeedModId}");
LogUtil.LogInfo($" BonusShapeshiftMovementSpeedModId: {componentData.BonusShapeshiftMovementSpeedModId}");
LogUtil.LogInfo($" PvPProtected: {((ModifiableBool)(ref componentData.PvPProtected)).Value}");
LogUtil.LogInfo($" PassiveSlots: {componentData.PassiveSlots}");
}
}
public static void LogBuffs(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<BuffBuffer>(entity))
{
LogUtil.LogInfo(" buffs:");
Enumerator<BuffBuffer> enumerator = ((EntityManager)(ref entityManager)).GetBuffer<BuffBuffer>(entity, false).GetEnumerator();
while (enumerator.MoveNext())
{
BuffBuffer current = enumerator.Current;
LogUtil.LogInfo(" " + LookupPrefabName(current.PrefabGuid));
}
}
}
public static void LogSpellModSet(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_0154: 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)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasComponent<SpellModSetComponent>(entity))
{
LogUtil.LogInfo(" spell mods:");
SpellModSetComponent componentData = ((EntityManager)(ref entityManager)).GetComponentData<SpellModSetComponent>(entity);
SpellModSet spellMods = componentData.SpellMods;
LogUtil.LogInfo($" count:{spellMods.Count}");
LogUtil.LogInfo(" 0:" + LookupPrefabName(spellMods.Mod0.Id));
LogUtil.LogInfo(" 1:" + LookupPrefabName(spellMods.Mod1.Id));
LogUtil.LogInfo(" 2:" + LookupPrefabName(spellMods.Mod2.Id));
LogUtil.LogInfo(" 3:" + LookupPrefabName(spellMods.Mod3.Id));
LogUtil.LogInfo(" 4:" + LookupPrefabName(spellMods.Mod4.Id));
LogUtil.LogInfo(" 5:" + LookupPrefabName(spellMods.Mod5.Id));
LogUtil.LogInfo(" 6:" + LookupPrefabName(spellMods.Mod6.Id));
LogUtil.LogInfo(" 7:" + LookupPrefabName(spellMods.Mod7.Id));
LogUtil.LogInfo(" ----");
}
}
public static void LogApplyBuffOnGameplayEvent(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
//IL_010c: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<ApplyBuffOnGameplayEvent>(entity))
{
LogUtil.LogInfo(" Buffs to apply on gameplay events:");
Enumerator<ApplyBuffOnGameplayEvent> enumerator = ((EntityManager)(ref entityManager)).GetBuffer<ApplyBuffOnGameplayEvent>(entity, false).GetEnumerator();
while (enumerator.MoveNext())
{
ApplyBuffOnGameplayEvent current = enumerator.Current;
LogUtil.LogInfo($" stacks:{current.Stacks}");
LogUtil.LogInfo(" 0:" + LookupPrefabName(current.Buff0));
LogUtil.LogInfo(" 1:" + LookupPrefabName(current.Buff1));
LogUtil.LogInfo(" 2:" + LookupPrefabName(current.Buff2));
LogUtil.LogInfo(" 3:" + LookupPrefabName(current.Buff3));
LogUtil.LogInfo($" spellModSource:{current.CustomAbilitySpellModsSource}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogProjectilDestroyData(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasComponent<ProjectileDestroyData>(entity))
{
ProjectileDestroyData componentData = ((EntityManager)(ref entityManager)).GetComponentData<ProjectileDestroyData>(entity);
LogUtil.LogInfo(" ProjectileDestroyData:");
LogUtil.LogInfo($" HasHitTarget: {componentData.HasHitTarget}");
}
}
public static void LogHitColliderCast(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_014e: Unknown result type (might be due to invalid IL or missing references)
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
//IL_022f: Unknown result type (might be due to invalid IL or missing references)
//IL_0231: Unknown result type (might be due to invalid IL or missing references)
//IL_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: Unknown result type (might be due to invalid IL or missing references)
//IL_029f: Unknown result type (might be due to invalid IL or missing references)
//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
//IL_030f: Unknown result type (might be due to invalid IL or missing references)
//IL_0311: Unknown result type (might be due to invalid IL or missing references)
//IL_0347: Unknown result type (might be due to invalid IL or missing references)
//IL_0349: Unknown result type (might be due to invalid IL or missing references)
//IL_037f: Unknown result type (might be due to invalid IL or missing references)
//IL_0381: Unknown result type (might be due to invalid IL or missing references)
//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0418: Unknown result type (might be due to invalid IL or missing references)
//IL_044b: Unknown result type (might be due to invalid IL or missing references)
//IL_047e: Unknown result type (might be due to invalid IL or missing references)
//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<HitColliderCast>(entity))
{
LogUtil.LogInfo(" HitColliderCast [Buffer]:");
DynamicBuffer<HitColliderCast> buffer = ((EntityManager)(ref entityManager)).GetBuffer<HitColliderCast>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
HitColliderCast val = buffer[i];
LogUtil.LogInfo($" HitColliderCast [{i}]");
LogUtil.LogInfo(" Shape");
LogUtil.LogInfo($" Type: {val.Shape.Type}");
LogUtil.LogInfo($" RadiusOrWidth: {val.Shape.RadiusOrWidth}");
LogUtil.LogInfo($" InnerRadiusOrHeight: {val.Shape.InnerRadiusOrHeight}");
LogUtil.LogInfo($" Length: {val.Shape.Length}");
LogUtil.LogInfo($" Angle: {val.Shape.Angle}");
LogUtil.LogInfo($" AfterDuration: {val.AfterDuration}");
LogUtil.LogInfo($" TerrainColliderModifier: {val.TerrainColliderModifier}");
LogUtil.LogInfo(" PrioritySettings");
LogUtil.LogInfo($" Near_Origin_Factor: {val.PrioritySettings.Near_Origin_Factor}");
LogUtil.LogInfo($" Near_Origin_Distance: {val.PrioritySettings.Near_Origin_Distance}");
LogUtil.LogInfo($" Target_Priority_Factor: {val.PrioritySettings.Target_Priority_Factor}");
LogUtil.LogInfo($" UseMeleeCone: {val.PrioritySettings.UseMeleeCone}");
LogUtil.LogInfo($" Melee_Cone_Angle {val.PrioritySettings.Melee_Cone_Angle}");
LogUtil.LogInfo($" UseColliderCenterAsOriginPosition: {val.PrioritySettings.UseColliderCenterAsOriginPosition}");
LogUtil.LogInfo($" CollisionCheckType: {val.CollisionCheckType}");
LogUtil.LogInfo($" PrimaryFilterFlags: {val.PrimaryFilterFlags}");
LogUtil.LogInfo($" PrimaryTargets_Count: {val.PrimaryTargets_Count}");
LogUtil.LogInfo($" SecondaryTargets_Count: {val.SecondaryTargets_Count}");
LogUtil.LogInfo($" ContinuousCollision: {val.ContinuousCollision}");
LogUtil.LogInfo($" IncludeTerrain: {val.IncludeTerrain}");
LogUtil.LogInfo($" CanHitThroughBlockSpellCollision: {val.CanHitThroughBlockSpellCollision}");
LogUtil.LogInfo($" IgnoreImmaterial: {val.IgnoreImmaterial}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogHitTriggers(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
//IL_0200: Unknown result type (might be due to invalid IL or missing references)
//IL_0202: Unknown result type (might be due to invalid IL or missing references)
//IL_0233: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<HitTrigger>(entity))
{
LogUtil.LogInfo(" HitTrigger [Buffer]:");
DynamicBuffer<HitTrigger> buffer = ((EntityManager)(ref entityManager)).GetBuffer<HitTrigger>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
HitTrigger val = buffer[i];
LogUtil.LogInfo($" HitTrigger [{i}]");
LogUtil.LogInfo($" HitTime: {val.HitTime}");
LogUtil.LogInfo($" Target: {val.Target}");
LogUtil.LogInfo($" OriginPosition: {val.OriginPosition}");
LogUtil.LogInfo($" CollisionPosition: {val.CollisionPosition}");
LogUtil.LogInfo($" CollisionRotation: {val.CollisionRotation}");
LogUtil.LogInfo($" Handled: {val.Handled}");
LogUtil.LogInfo($" Ignore: {val.Ignore}");
LogUtil.LogInfo($" HitGroup: {val.HitGroup}");
LogUtil.LogInfo($" CastIndex: {val.CastIndex}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogTriggerHitConsume(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<TriggerHitConsume>(entity))
{
LogUtil.LogInfo(" TriggerHitConsume [Buffer]:");
DynamicBuffer<TriggerHitConsume> buffer = ((EntityManager)(ref entityManager)).GetBuffer<TriggerHitConsume>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
TriggerHitConsume val = buffer[i];
LogUtil.LogInfo($" TriggerHitConsume [{i}]");
LogUtil.LogInfo($" SpellCategory: {val.SpellCategory}");
LogUtil.LogInfo($" EventIdIndex: {val.EventIdIndex}");
LogUtil.LogInfo($" EventIdCount: {val.EventIdCount}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogPlayImpactOnGameplayEvent(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<PlayImpactOnGameplayEvent>(entity))
{
LogUtil.LogInfo(" PlayImpactOnGameplayEvent [Buffer]:");
DynamicBuffer<PlayImpactOnGameplayEvent> buffer = ((EntityManager)(ref entityManager)).GetBuffer<PlayImpactOnGameplayEvent>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
PlayImpactOnGameplayEvent val = buffer[i];
LogUtil.LogInfo($" PlayImpactOnGameplayEvent [{i}]");
LogUtil.LogInfo($" PrimarySequenceGuid: {val.PrimarySequenceGuid}");
LogUtil.LogInfo(" ImpactMappingGuid: " + LookupPrefabName(val.ImpactMappingGuid));
LogUtil.LogInfo($" SkipMaterialSequence: {val.SkipMaterialSequence}");
LogUtil.LogInfo($" RotationOffsetEulerMin: {val.RotationOffsetEulerMin}");
LogUtil.LogInfo($" RotationOffsetEulerMax: {val.RotationOffsetEulerMax}");
LogUtil.LogInfo($" Scale: {val.Scale}");
LogUtil.LogInfo($" SequenceRotationTarget: {val.SequenceRotationTarget}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogDealDamageOnGameplayEvent(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
//IL_020f: Unknown result type (might be due to invalid IL or missing references)
//IL_0211: Unknown result type (might be due to invalid IL or missing references)
//IL_0216: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Unknown result type (might be due to invalid IL or missing references)
//IL_024e: Unknown result type (might be due to invalid IL or missing references)
//IL_0253: Unknown result type (might be due to invalid IL or missing references)
//IL_0289: Unknown result type (might be due to invalid IL or missing references)
//IL_028b: Unknown result type (might be due to invalid IL or missing references)
//IL_0290: Unknown result type (might be due to invalid IL or missing references)
//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: Unknown result type (might be due to invalid IL or missing references)
//IL_0305: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_0340: Unknown result type (might be due to invalid IL or missing references)
//IL_0342: Unknown result type (might be due to invalid IL or missing references)
//IL_0347: Unknown result type (might be due to invalid IL or missing references)
//IL_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_037f: Unknown result type (might be due to invalid IL or missing references)
//IL_0384: Unknown result type (might be due to invalid IL or missing references)
//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0434: Unknown result type (might be due to invalid IL or missing references)
//IL_0436: Unknown result type (might be due to invalid IL or missing references)
//IL_043b: Unknown result type (might be due to invalid IL or missing references)
//IL_0471: Unknown result type (might be due to invalid IL or missing references)
//IL_0473: Unknown result type (might be due to invalid IL or missing references)
//IL_0478: Unknown result type (might be due to invalid IL or missing references)
//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0528: Unknown result type (might be due to invalid IL or missing references)
//IL_052a: Unknown result type (might be due to invalid IL or missing references)
//IL_052f: Unknown result type (might be due to invalid IL or missing references)
//IL_0565: Unknown result type (might be due to invalid IL or missing references)
//IL_0567: Unknown result type (might be due to invalid IL or missing references)
//IL_056c: Unknown result type (might be due to invalid IL or missing references)
//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
//IL_05df: Unknown result type (might be due to invalid IL or missing references)
//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
//IL_05e6: Unknown result type (might be due to invalid IL or missing references)
//IL_061c: Unknown result type (might be due to invalid IL or missing references)
//IL_061e: Unknown result type (might be due to invalid IL or missing references)
//IL_0623: Unknown result type (might be due to invalid IL or missing references)
//IL_0659: Unknown result type (might be due to invalid IL or missing references)
//IL_065b: Unknown result type (might be due to invalid IL or missing references)
//IL_0691: Unknown result type (might be due to invalid IL or missing references)
//IL_0693: Unknown result type (might be due to invalid IL or missing references)
//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
//IL_06cb: Unknown result type (might be due to invalid IL or missing references)
//IL_0701: Unknown result type (might be due to invalid IL or missing references)
//IL_0703: Unknown result type (might be due to invalid IL or missing references)
//IL_0739: Unknown result type (might be due to invalid IL or missing references)
//IL_073b: Unknown result type (might be due to invalid IL or missing references)
//IL_0771: Unknown result type (might be due to invalid IL or missing references)
//IL_0773: Unknown result type (might be due to invalid IL or missing references)
//IL_07a9: Unknown result type (might be due to invalid IL or missing references)
//IL_07ab: Unknown result type (might be due to invalid IL or missing references)
//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
//IL_07e1: Unknown result type (might be due to invalid IL or missing references)
//IL_0814: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<DealDamageOnGameplayEvent>(entity))
{
LogUtil.LogInfo(" DealDamageOnGameplayEvent [Buffer]:");
DynamicBuffer<DealDamageOnGameplayEvent> buffer = ((EntityManager)(ref entityManager)).GetBuffer<DealDamageOnGameplayEvent>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
DealDamageOnGameplayEvent val = buffer[i];
LogUtil.LogInfo($" DealDamageOnGameplayEvent [{i}]");
LogUtil.LogInfo(" Parameters");
LogUtil.LogInfo($" MaterialModifiers: {val.Parameters.MaterialModifiers}");
LogUtil.LogInfo($" Human: {val.Parameters.MaterialModifiers.Human}");
LogUtil.LogInfo($" Undead: {val.Parameters.MaterialModifiers.Undead}");
LogUtil.LogInfo($" Demon: {val.Parameters.MaterialModifiers.Demon}");
LogUtil.LogInfo($" Mechanical: {val.Parameters.MaterialModifiers.Mechanical}");
LogUtil.LogInfo($" Beast: {val.Parameters.MaterialModifiers.Beast}");
LogUtil.LogInfo($" CastleObject: {val.Parameters.MaterialModifiers.CastleObject}");
LogUtil.LogInfo($" PlayerVampire: {val.Parameters.MaterialModifiers.PlayerVampire}");
LogUtil.LogInfo($" PvEVampire: {val.Parameters.MaterialModifiers.PvEVampire}");
LogUtil.LogInfo($" ShadowVBlood: {val.Parameters.MaterialModifiers.ShadowVBlood}");
LogUtil.LogInfo($" BasicStructure: {val.Parameters.MaterialModifiers.BasicStructure}");
LogUtil.LogInfo($" ReinforcedStructure: {val.Parameters.MaterialModifiers.ReinforcedStructure}");
LogUtil.LogInfo($" FortifiedStructure: {val.Parameters.MaterialModifiers.FortifiedStructure}");
LogUtil.LogInfo($" StoneStructure: {val.Parameters.MaterialModifiers.StoneStructure}");
LogUtil.LogInfo($" SiegeAltar: {val.Parameters.MaterialModifiers.SiegeAltar}");
LogUtil.LogInfo($" Wood: {val.Parameters.MaterialModifiers.Wood}");
LogUtil.LogInfo($" Minerals: {val.Parameters.MaterialModifiers.Minerals}");
LogUtil.LogInfo($" Vegetation: {val.Parameters.MaterialModifiers.Vegetation}");
LogUtil.LogInfo($" LightArmor: {val.Parameters.MaterialModifiers.LightArmor}");
LogUtil.LogInfo($" VBlood: {val.Parameters.MaterialModifiers.VBlood}");
LogUtil.LogInfo($" Magic: {val.Parameters.MaterialModifiers.Magic}");
LogUtil.LogInfo($" Explosives: {val.Parameters.MaterialModifiers.Explosives}");
LogUtil.LogInfo($" MassiveResource: {val.Parameters.MaterialModifiers.MassiveResource}");
LogUtil.LogInfo($" MonsterGate: {val.Parameters.MaterialModifiers.MonsterGate}");
LogUtil.LogInfo($" MainFactor: {val.Parameters.MainFactor}");
LogUtil.LogInfo($" ResourceModifier: {val.Parameters.ResourceModifier}");
LogUtil.LogInfo($" StaggerFactor: {val.Parameters.StaggerFactor}");
LogUtil.LogInfo($" RawDamageValue: {val.Parameters.RawDamageValue}");
LogUtil.LogInfo($" RawDamagePercent: {val.Parameters.RawDamagePercent}");
LogUtil.LogInfo($" DealDamageFlags: {val.Parameters.DealDamageFlags}");
LogUtil.LogInfo($" MainType: {val.Parameters.MainType}");
LogUtil.LogInfo($" DamageModifierPerHit: {val.DamageModifierPerHit}");
LogUtil.LogInfo($" MultiplyMainFactorWithStacks: {val.MultiplyMainFactorWithStacks}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogGameplayEventListeners(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<GameplayEventListeners>(entity))
{
LogUtil.LogInfo(" GameplayEventListeners [Buffer]:");
DynamicBuffer<GameplayEventListeners> buffer = ((EntityManager)(ref entityManager)).GetBuffer<GameplayEventListeners>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
GameplayEventListeners val = buffer[i];
LogUtil.LogInfo($" GameplayEventListeners [{i}]");
LogUtil.LogInfo($" EventIdIndex: {val.EventIdIndex}");
LogUtil.LogInfo($" EventIndexOfType: {val.EventIndexOfType}");
LogUtil.LogInfo($" GameplayEventType: {val.GameplayEventType}");
LogUtil.LogInfo($" GameplayEventId: {val.GameplayEventId}");
LogUtil.LogInfo($" GameplayEventType: {val.GameplayEventId.GameplayEventType}");
LogUtil.LogInfo($" EventId: {val.GameplayEventId.EventId}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogCreateGameplayEventsOnHit(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: 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_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasBuffer<CreateGameplayEventsOnHit>(entity))
{
LogUtil.LogInfo(" CreateGameplayEventsOnHit [Buffer]:");
DynamicBuffer<CreateGameplayEventsOnHit> buffer = ((EntityManager)(ref entityManager)).GetBuffer<CreateGameplayEventsOnHit>(entity, false);
for (int i = 0; i < buffer.Length; i++)
{
CreateGameplayEventsOnHit val = buffer[i];
LogUtil.LogInfo($" CreateGameplayEventsOnHit [{i}]");
LogUtil.LogInfo($" EventId: {val.EventId}");
LogUtil.LogInfo($" HitGroup: {val.HitGroup}");
LogUtil.LogInfo($" ColliderCastIndex: {val.ColliderCastIndex}");
LogUtil.LogInfo(" ----");
}
}
}
public static void LogAbilityProjectileFanOnGameplayEvent_DataServer(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: 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_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_0214: Unknown result type (might be due to invalid IL or missing references)
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
//IL_0278: Unknown result type (might be due to invalid IL or missing references)
//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
//IL_030e: Unknown result type (might be due to invalid IL or missing references)
//IL_0340: Unknown result type (might be due to invalid IL or missing references)
//IL_035e: Unknown result type (might be due to invalid IL or missing references)
//IL_035f: Unknown result type (might be due to invalid IL or missing references)
//IL_0379: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_0394: Unknown result type (might be due to invalid IL or missing references)
//IL_0395: Unknown result type (might be due to invalid IL or missing references)
//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (((EntityManager)(ref entityManager)).HasComponent<AbilityProjectileFanOnGameplayEvent_DataServer>(entity))
{
AbilityProjectileFanOnGameplayEvent_DataServer componentData = ((EntityManager)(ref entityManager)).GetComponentData<AbilityProjectileFanOnGameplayEvent_DataServer>(entity);
LogUtil.LogInfo(" AbilityProjectileFanOnGameplayEvent_DataServer:");
LogUtil.LogInfo($" Angle: {componentData.Angle}");
LogUtil.LogInfo($" OffsetAngle: {componentData.OffsetAngle}");
LogUtil.LogInfo($" RandomOffset: {componentData.RandomOffset}");
LogUtil.LogInfo($" IndividualRandom: {componentData.IndividualRandom}");
LogUtil.LogInfo(" NewProjectileEntity: " + LookupPrefabName(componentData.NewProjectileEntity));
LogUtil.LogInfo(" NewProjectileEntityAlternate: " + LookupPrefabName(componentData.NewProjectileEntityAlternate));
LogUtil.LogInfo($" TickCount: {componentData.TickCount}");
LogUtil.LogInfo($" UseOwnerAimDirection: {componentData.UseOwnerAimDirection}");
LogUtil.LogInfo($" SetSpellTargetToSelf: {componentData.SetSpellTargetToSelf}");
LogUtil.LogInfo($" SetSpellTargetToSelfSpellTarget: {componentData.SetSpellTargetToSelfSpellTarget}");
LogUtil.LogInfo($" SetSpellTargetToBuffTarget: {componentData.SetSpellTargetToBuffTarget}");
LogUtil.LogInfo($" SetRandomTargetInRadiusToSpellTarget: {componentData.SetRandomTargetInRadiusToSpellTarget}");
LogUtil.LogInfo($" RandomTargetMaxHeightDiff: {componentData.RandomTargetMaxHeightDiff}");
LogUtil.LogInfo($" RandomSpellTargetHitFilter: {componentData.RandomSpellTargetHitFilter}");
LogUtil.LogInfo($" BoostBuffType: {componentData.BoostBuffType}");
LogUtil.LogInfo($" BoostPerStackCount: {componentData.BoostPerStackCount}");
LogUtil.LogInfo($" BoostPerStackAngle: {componentData.BoostPerStackAngle}");
LogUtil.LogInfo(" BoostPerStackPrefab1: " + LookupPrefabName(componentData.BoostPerStackPrefab1));
LogUtil.LogInfo(" BoostPerStackPrefab2: " + LookupPrefabName(componentData.BoostPerStackPrefab2));
LogUtil.LogInfo(" BoostPerStackPrefab3: " + LookupPrefabName(componentData.BoostPerStackPrefab3));
LogUtil.LogInfo($" OverrideProjectileSpeedMin: {componentData.OverrideProjectileSpeedMin}");
LogUtil.LogInfo($" OverrideProjectileSpeedMax: {componentData.OverrideProjectileSpeedMax}");
}
}
public static string LookupPrefabName(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Game.EntityManager;
if (!((EntityManager)(ref entityManager)).HasComponent<PrefabGUID>(entity))
{
return "Entity does not have PrefabGUID component";
}
PrefabGUID componentData = ((EntityManager)(ref entityManager)).GetComponentData<PrefabGUID>(entity);
return LookupPrefabName(componentData);
}
public static string LookupPrefabName(PrefabGUID prefabGuid)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: 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_008e: 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)
PrefabCollectionSystem existingSystemManaged = WorldUtil.Game.GetExistingSystemManaged<PrefabCollectionSystem>();
PrefabLookupMap prefabLookupMap = existingSystemManaged._PrefabLookupMap;
NativeParallelHashMap<PrefabGUID, Entity> guidToEntityMap = prefabLookupMap.GuidToEntityMap;
if (!guidToEntityMap.ContainsKey(prefabGuid))
{
return $"GUID Not Found {prefabGuid._Value}";
}
return $"{((PrefabLookupMap)(ref prefabLookupMap)).GetName(prefabGuid)} PrefabGUID({((PrefabGUID)(ref prefabGuid)).GuidHash})";
}
}
public static class LogUtil
{
public static ManualLogSource Logger;
public static void Init(ManualLogSource logger)
{
Logger = logger;
}
public static void LogMessage(object data)
{
Logger.LogMessage(data);
}
public static void LogInfo(object data)
{
Logger.LogInfo(data);
}
public static void LogDebug(object data)
{
Logger.LogDebug(data);
}
public static void LogWarning(object data)
{
Logger.LogWarning(data);
}
public static void LogError(object data)
{
Logger.LogError(data);
}
}
public static class SystemPatchUtil
{
public static void CancelJob(Entity entity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
((EntityManager)(ref entityManager)).AddComponent<Disabled>(entity);
DestroyUtility.CreateDestroyEvent(WorldUtil.Server.EntityManager, entity, (DestroyReason)0, (DestroyDebugReason)32);
}
}
public static class UnsafeUtil
{
public unsafe static object DynamicDereference(void* ptr, Type type)
{
Type typeFromHandle = typeof(UnsafeUtil);
BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.NonPublic;
MethodInfo method = typeFromHandle.GetMethod("Dereference", bindingAttr);
MethodInfo methodInfo = method.MakeGenericMethod(type);
object obj = Pointer.Box(ptr, type.MakePointerType());
object[] parameters = new object[1] { obj };
return methodInfo.Invoke(null, parameters);
}
private unsafe static T Dereference<T>(object boxedPtr)
{
return Unsafe.Read<T>(Pointer.Unbox(boxedPtr));
}
}
public static class WorldUtil
{
private static World _clientWorld;
private static World _serverWorld;
private static ServerBootstrapSystem _serverBootstrapSystem;
public static World Server
{
get
{
if (_serverWorld != null && _serverWorld.IsCreated)
{
return _serverWorld;
}
_serverWorld = GetWorld("Server") ?? throw new Exception("There is no Server world (yet). Did you install a server mod on the client?");
return _serverWorld;
}
}
public static World Client
{
get
{
if (_clientWorld != null && _clientWorld.IsCreated)
{
return _clientWorld;
}
_clientWorld = GetWorld("Client_0") ?? throw new Exception("There is no Client world (yet). Did you install a client mod on the server?");
return _clientWorld;
}
}
public static World Default => World.DefaultGameObjectInjectionWorld;
public static World Game => IsClient ? Client : Server;
public static bool IsServer => Application.productName == "VRisingServer";
public static bool IsClient => Application.productName == "VRising";
public static bool IsServerInitialized
{
get
{
if (_serverBootstrapSystem == null)
{
World server = Server;
_serverBootstrapSystem = ((server != null) ? server.GetExistingSystemManaged<ServerBootstrapSystem>() : null);
}
ServerBootstrapSystem serverBootstrapSystem = _serverBootstrapSystem;
return serverBootstrapSystem != null && serverBootstrapSystem.ServerIsInitialized;
}
}
public static bool IsGameWorldCreated()
{
if (_clientWorld != null)
{
return _clientWorld.IsCreated;
}
if (_serverWorld != null)
{
return _serverWorld.IsCreated;
}
if (IsClient)
{
return GetWorld("Client_0") != null;
}
if (IsServer)
{
return GetWorld("Server") != null;
}
return false;
}
private static World GetWorld(string name)
{
Enumerator<World> enumerator = World.s_AllWorlds.GetEnumerator();
while (enumerator.MoveNext())
{
World current = enumerator.Current;
if (current.Name == name)
{
_serverWorld = current;
return current;
}
}
return null;
}
}
}
namespace VRisingMods.Core.Prefabs
{
public class ShardPrefabs
{
public static readonly PrefabGUID AB_Interact_RetrieveRelic_Cast = new PrefabGUID(1144010242);
public static readonly PrefabGUID AB_Interact_UseRelic_Cast_Base = new PrefabGUID(136162977);
public static readonly PrefabGUID AB_Interact_UseRelic_Behemoth_Cast = new PrefabGUID(-1568934921);
public static readonly PrefabGUID AB_Interact_UseRelic_Manticore_Cast = new PrefabGUID(-1644726473);
public static readonly PrefabGUID AB_Interact_UseRelic_Monster_Cast = new PrefabGUID(-1863913590);
public static readonly PrefabGUID AB_Interact_UseRelic_Paladin_Cast = new PrefabGUID(-69591182);
public static readonly PrefabGUID AB_Interact_UseRelicRadar_Cast = new PrefabGUID(1534984668);
public static readonly PrefabGUID AB_Interact_RetrieveRelic_AbilityGroup = new PrefabGUID(1654467658);
public static readonly PrefabGUID AB_Interact_RetrieveRelic_Destroy = new PrefabGUID(-1818035017);
public static readonly PrefabGUID AB_Interact_UseRelic_AbilityGroup_Base = new PrefabGUID(-1685528518);
public static readonly PrefabGUID AB_Interact_UseRelic_Buff_Base = new PrefabGUID(-1486800730);
public static readonly PrefabGUID AB_Interact_UseRelic_Behemoth_AbilityGroup = new PrefabGUID(1883675026);
public static readonly PrefabGUID AB_Interact_UseRelic_Behemoth_Buff = new PrefabGUID(-1703886455);
public static readonly PrefabGUID AB_Interact_UseRelic_Manticore_AbilityGroup = new PrefabGUID(-2054010438);
public static readonly PrefabGUID AB_Interact_UseRelic_Manticore_Buff = new PrefabGUID(-238197495);
public static readonly PrefabGUID AB_Interact_UseRelic_Monster_AbilityGroup = new PrefabGUID(-2064810948);
public static readonly PrefabGUID AB_Interact_UseRelic_Monster_Buff = new PrefabGUID(1068709119);
public static readonly PrefabGUID AB_Interact_UseRelic_Paladin_AbilityGroup = new PrefabGUID(546136204);
public static readonly PrefabGUID AB_Interact_UseRelic_Paladin_Buff = new PrefabGUID(-1161197991);
public static readonly PrefabGUID AB_Interact_UseRelicRadar = new PrefabGUID(-893499048);
public static readonly PrefabGUID AB_Interact_UseRelicRadar_AbilityGroup = new PrefabGUID(-1337273957);
public static readonly PrefabGUID Item_Building_Relic_Base = new PrefabGUID(-2028237414);
public static readonly PrefabGUID Item_Building_Relic_Behemoth = new PrefabGUID(1247086852);
public static readonly PrefabGUID Item_Building_Relic_Manticore = new PrefabGUID(-222860772);
public static readonly PrefabGUID Item_Building_Relic_Monster = new PrefabGUID(-1619308732);
public static readonly PrefabGUID Item_Building_Relic_Paladin = new PrefabGUID(2019195024);
public static readonly PrefabGUID Buff_General_RelicCarryDebuff = new PrefabGUID(-714279777);
public static readonly PrefabGUID TM_Castle_Relic_Radar_Eye = new PrefabGUID(-622002417);
public static readonly PrefabGUID TM_Relic_Base = new PrefabGUID(469134485);
public static readonly PrefabGUID TM_Relic_SoulShard_Behemoth = new PrefabGUID(-1634027738);
public static readonly PrefabGUID TM_Relic_SoulShard_Manticore = new PrefabGUID(4777796);
public static readonly PrefabGUID TM_Relic_SoulShard_Monster = new PrefabGUID(-676422497);
public static readonly PrefabGUID TM_Relic_SoulShard_Paladin = new PrefabGUID(433842875);
public static readonly PrefabGUID DT_Unit_Relic_Behemoth = new PrefabGUID(1692937792);
public static readonly PrefabGUID DT_Unit_Relic_Behemoth_Unique = new PrefabGUID(757245659);
public static readonly PrefabGUID DT_Unit_Relic_Manticore = new PrefabGUID(-1198592171);
public static readonly PrefabGUID DT_Unit_Relic_Manticore_Unique = new PrefabGUID(-1725739289);
public static readonly PrefabGUID DT_Unit_Relic_Monster = new PrefabGUID(1483257731);
public static readonly PrefabGUID DT_Unit_Relic_Monster_Unique = new PrefabGUID(996583736);
public static readonly PrefabGUID DT_Unit_Relic_Paladin = new PrefabGUID(-1669527099);
public static readonly PrefabGUID DT_Unit_Relic_Paladin_Unique = new PrefabGUID(1232299475);
public static readonly PrefabGUID Journal_SubTask_Interact_Relic = new PrefabGUID(724202001);
public static readonly PrefabGUID Journal_SubTask_Interact_RelicRadar = new PrefabGUID(-568627115);
public static readonly PrefabGUID Journal_Reward_Tech_RelicRadar = new PrefabGUID(-1887126093);
public static readonly PrefabGUID Resource_Drop_Relic = new PrefabGUID(-1693842783);
}
public static class TileModelPrefabs
{
public static readonly PrefabGUID TM_BloodFountain_Pylon_Station = new PrefabGUID(-485210554);
}
}
namespace VRisingMods.Core.Player
{
public class UserModel
{
public User User;
public Entity Entity;
}
public static class UserUtil
{
public static List<UserModel> FindAllUsers()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
ComponentType val = ComponentType.ReadOnly<User>();
EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((ComponentType[])(object)new ComponentType[1] { val });
NativeArray<Entity> val3 = ((EntityQuery)(ref val2)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2));
List<UserModel> list = new List<UserModel>();
Enumerator<Entity> enumerator = val3.GetEnumerator();
while (enumerator.MoveNext())
{
Entity current = enumerator.Current;
list.Add(new UserModel
{
Entity = current,
User = ((EntityManager)(ref entityManager)).GetComponentData<User>(current)
});
}
return list;
}
public static bool TryFindUserByName(string characterName, out UserModel userModel)
{
foreach (UserModel item in FindAllUsers())
{
if (string.Equals(characterName, ((object)(FixedString64Bytes)(ref item.User.CharacterName)).ToString(), StringComparison.OrdinalIgnoreCase))
{
userModel = item;
return true;
}
}
userModel = null;
return false;
}
public static bool TryFindUserByPlatformId(ulong platformId, out UserModel userModel)
{
foreach (UserModel item in FindAllUsers())
{
if (platformId.Equals(item.User.PlatformId))
{
userModel = item;
return true;
}
}
userModel = null;
return false;
}
public static void HaxSetIsAdminForPluginChatCommands(Entity userEntity, bool isAdmin)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
User val = default(User);
if (((EntityManager)(ref entityManager)).TryGetComponentData<User>(userEntity, ref val))
{
val.IsAdmin = isAdmin;
((EntityManager)(ref entityManager)).SetComponentData<User>(userEntity, val);
}
}
public static bool IsAdminForPluginChatCommands(Entity userEntity)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
User val = default(User);
if (((EntityManager)(ref entityManager)).TryGetComponentData<User>(userEntity, ref val))
{
return val.IsAdmin;
}
return false;
}
}
}
namespace VRisingMods.Core.Item
{
public static class ItemUtil
{
public static AddItemResponse GiveItemToPlayer(Entity character, PrefabGUID prefabGUID, int amount)
{
//IL_0011: 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_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
GameDataSystem existingSystemManaged = WorldUtil.Server.GetExistingSystemManaged<GameDataSystem>();
AddItemSettings val = AddItemSettings.Create(WorldUtil.Server.EntityManager, existingSystemManaged.ItemHashLookupMap, false, default(Entity), default(Nullable_Unboxed<int>), false, false, false, default(Nullable_Unboxed<int>));
return InventoryUtilitiesServer.TryAddItem(val, character, prefabGUID, amount);
}
public static bool TryDropItemFromInventory(Entity character, PrefabGUID prefabGUID, int amount)
{
//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_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_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_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_003a: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
GameDataSystem existingSystemManaged = WorldUtil.Server.GetExistingSystemManaged<GameDataSystem>();
EntityCommandBuffer val = WorldUtil.Server.GetExistingSystemManaged<EntityCommandBufferSystem>().CreateCommandBuffer();
Entity val2 = default(Entity);
InventoryUtilities.TryGetMainInventoryEntity<EntityManager>(entityManager, character, ref val2);
return InventoryUtilitiesServer.TryDropItem(entityManager, val, existingSystemManaged.ItemHashLookupMap, val2, prefabGUID, amount);
}
public static bool TryDropNewItem(Entity character, PrefabGUID prefabGUID, int amount)
{
//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_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
ServerGameManager serverGameManager = WorldUtil.Server.GetExistingSystemManaged<ServerScriptMapper>()._ServerGameManager;
((ServerGameManager)(ref serverGameManager)).CreateDroppedItemEntity(character, prefabGUID, amount);
return true;
}
}
}
namespace VRisingMods.Core.Config
{
public abstract class AbstractJsonConfig
{
protected string FilePath;
protected AbstractJsonConfig(string filepath)
{
FilePath = filepath;
}
public abstract string ToJson();
protected abstract void InitDefaults();
protected abstract void InitFromJson(string json);
public static T Init<T>(string pluginGUID, string filename) where T : AbstractJsonConfig
{
string text = Filepath(pluginGUID, filename);
T val = (T)Activator.CreateInstance(typeof(T), text);
if (File.Exists(text))
{
string json = File.ReadAllText(text);
val.InitFromJson(json);
}
else
{
val.InitDefaults();
File.WriteAllText(text, val.ToJson());
}
return val;
}
public static string Filepath(string pluginGUID, string filename)
{
string text = Path.Combine(Paths.ConfigPath, pluginGUID);
Directory.CreateDirectory(text);
return Path.Combine(text, filename);
}
public static void CopyExampleIfNotExists(string pluginGUID, string outputFilename, string inputResourceName)
{
string path = Filepath(pluginGUID, outputFilename);
if (File.Exists(path))
{
return;
}
Assembly executingAssembly = Assembly.GetExecutingAssembly();
using Stream stream = executingAssembly.GetManifestResourceStream(inputResourceName);
using FileStream destination = File.Create(path);
stream.CopyTo(destination);
}
}
}
namespace VRisingMods.Core.Clan
{
public static class ClanUtil
{
public static bool TryFindClan(NetworkId clanId, out Entity clanTeam)
{
//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_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
EntityQueryDesc[] array = new EntityQueryDesc[1];
EntityQueryDesc val = new EntityQueryDesc();
val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<ClanTeam>() });
array[0] = val;
EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
Enumerator<Entity> enumerator = ((EntityQuery)(ref val2)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)).GetEnumerator();
while (enumerator.MoveNext())
{
Entity current = enumerator.Current;
NetworkId componentData = ((EntityManager)(ref entityManager)).GetComponentData<NetworkId>(current);
if (((NetworkId)(ref componentData)).Equals(clanId))
{
clanTeam = current;
return true;
}
}
clanTeam = default(Entity);
return false;
}
}
}
namespace VRisingMods.Core.Chat
{
public static class ChatUtil
{
public static void ForgeMessage(UserModel userModel, string message, ChatMessageType messageType = 0)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_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_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)
//IL_0038: 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_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
FromCharacter val = default(FromCharacter);
val.User = userModel.Entity;
val.Character = userModel.User.LocalCharacter._Entity;
FromCharacter val2 = val;
ChatMessageEvent val3 = default(ChatMessageEvent);
val3.MessageType = messageType;
val3.MessageText = FixedString512Bytes.op_Implicit(message);
ChatMessageEvent componentData = val3;
Entity val4 = ((EntityManager)(ref entityManager)).CreateEntity();
((EntityManager)(ref entityManager)).AddComponentData<FromCharacter>(val4, val2);
AotWorkaroundUtil.AddComponentData<ChatMessageEvent>(val4, componentData);
}
public static void SendSystemMessageToClient(User user, string message)
{
//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_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
FixedString512Bytes val = default(FixedString512Bytes);
((FixedString512Bytes)(ref val))..ctor(message.ToString());
ServerChatUtils.SendSystemMessageToClient(entityManager, user, ref val);
}
public static void SendSystemMessageToAllClients(string message)
{
//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_0019: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
FixedString512Bytes val = default(FixedString512Bytes);
((FixedString512Bytes)(ref val))..ctor(message.ToString());
ServerChatUtils.SendSystemMessageToAllClients(entityManager, ref val);
}
}
}
namespace VRisingMods.Core.CastleTerritory
{
public static class CastleHeartUtil
{
public static List<Entity> FindCastleHeartsOfPlayer(Entity character)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: 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_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
PlayerCharacter componentData = ((EntityManager)(ref entityManager)).GetComponentData<PlayerCharacter>(character);
List<Entity> list = new List<Entity>();
EntityQueryDesc[] array = new EntityQueryDesc[1];
EntityQueryDesc val = new EntityQueryDesc();
val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<CastleHeart>() });
array[0] = val;
EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
Enumerator<Entity> enumerator = ((EntityQuery)(ref val2)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)).GetEnumerator();
while (enumerator.MoveNext())
{
Entity current = enumerator.Current;
UserOwner componentData2 = ((EntityManager)(ref entityManager)).GetComponentData<UserOwner>(current);
if (((Entity)(ref componentData.UserEntity)).Equals(componentData2.Owner._Entity))
{
list.Add(current);
}
}
return list;
}
public static List<Entity> FindCastleHeartsOfPlayerTeam(Entity character)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0015: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
Team componentData = ((EntityManager)(ref entityManager)).GetComponentData<Team>(character);
return FindCastleHeartsOfTeam(componentData.Value);
}
public static List<Entity> FindCastleHeartsOfClan(Entity clanTeam)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0015: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
ClanTeam componentData = ((EntityManager)(ref entityManager)).GetComponentData<ClanTeam>(clanTeam);
return FindCastleHeartsOfTeam(componentData.TeamValue);
}
public static List<Entity> FindCastleHeartsOfTeam(int teamId)
{
//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_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
List<Entity> list = new List<Entity>();
EntityQueryDesc[] array = new EntityQueryDesc[1];
EntityQueryDesc val = new EntityQueryDesc();
val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[2]
{
ComponentType.ReadOnly<CastleHeart>(),
ComponentType.ReadOnly<Team>()
});
array[0] = val;
EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
Enumerator<Entity> enumerator = ((EntityQuery)(ref val2)).ToEntityArray(AllocatorHandle.op_Implicit((Allocator)2)).GetEnumerator();
while (enumerator.MoveNext())
{
Entity current = enumerator.Current;
Team componentData = ((EntityManager)(ref entityManager)).GetComponentData<Team>(current);
if (teamId.Equals(componentData.Value))
{
list.Add(current);
}
}
return list;
}
public static Entity FindCastleHeartById(NetworkId heartId)
{
//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_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
EntityManager entityManager = WorldUtil.Server.EntityManager;
EntityQueryDesc[] array = new EntityQueryDesc[1];
EntityQueryDesc val = new EntityQueryDesc();
val.All = Il2CppStructArray<ComponentType>.op_Implicit((ComponentType[])(object)new ComponentType[2]
{
ComponentType.ReadOnly<CastleHeart>(),
ComponentType.ReadOnly<NetworkId>()
});
array[0] = val;
EntityQuery val2 = ((EntityManager)(ref entityManager)).CreateEntityQuery((EntityQueryDesc[])(object)array);
Enumerator<Entity> enumerator = ((EntityQuery)(ref val2