Decompiled source of Bloodcraft v0.9.15
Bloodcraft.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.Json; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using BepInEx.Unity.IL2CPP.Utils.Collections; using Bloodcraft.Patches; using Bloodcraft.Services; using Bloodcraft.Systems.Experience; using Bloodcraft.Systems.Expertise; using Bloodcraft.Systems.Familiars; using Bloodcraft.Systems.Legacies; using Bloodcraft.Systems.Legacy; using Bloodcraft.Systems.Leveling; using Bloodcraft.Systems.Professions; using HarmonyLib; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using ProjectM; using ProjectM.Behaviours; using ProjectM.Gameplay.Scripting; using ProjectM.Gameplay.Systems; using ProjectM.Network; using ProjectM.Physics; using ProjectM.Scripting; using ProjectM.Shared; using ProjectM.Shared.Systems; using Stunlock.Core; using Stunlock.Network; using Unity.Collections; using Unity.Entities; using Unity.Mathematics; using Unity.Scenes; using Unity.Transforms; using UnityEngine; using VampireCommandFramework; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("Bloodcraft")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.9.15.0")] [assembly: AssemblyInformationalVersion("0.9.15+dc8cdf007d609374687807c8df6dac97cdd2745c")] [assembly: AssemblyProduct("Bloodcraft")] [assembly: AssemblyTitle("Bloodcraft")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.9.15.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Bloodcraft { internal static class Core { public class DataStructures { [Serializable] public class FamiliarExperienceData { public Dictionary<int, KeyValuePair<int, float>> FamiliarExperience { get; set; } = new Dictionary<int, KeyValuePair<int, float>>(); } [Serializable] public class UnlockedFamiliarData { public Dictionary<string, List<int>> UnlockedFamiliars { get; set; } = new Dictionary<string, List<int>>(); } private static readonly JsonSerializerOptions prettyJsonOptions = new JsonSerializerOptions { WriteIndented = true, IncludeFields = true }; private static Dictionary<ulong, KeyValuePair<int, float>> playerExperience = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, Dictionary<string, bool>> playerBools = new Dictionary<ulong, Dictionary<string, bool>>(); private static Dictionary<ulong, Dictionary<LevelingSystem.PlayerClasses, (List<int>, List<int>)>> playerClasses = new Dictionary<ulong, Dictionary<LevelingSystem.PlayerClasses, (List<int>, List<int>)>>(); private static Dictionary<ulong, Dictionary<PrestigeSystem.PrestigeType, int>> playerPrestiges = new Dictionary<ulong, Dictionary<PrestigeSystem.PrestigeType, int>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerWoodcutting = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerMining = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerFishing = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerBlacksmithing = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerTailoring = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerEnchanting = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerAlchemy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerHarvesting = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerSwordExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerAxeExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerMaceExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerSpearExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerCrossbowExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerGreatSwordExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerSlashersExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerPistolsExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerReaperExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerLongbowExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerWhipExpertise = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, Dictionary<ExpertiseSystem.WeaponType, List<WeaponStats.WeaponStatManager.WeaponStatType>>> playerWeaponStats = new Dictionary<ulong, Dictionary<ExpertiseSystem.WeaponType, List<WeaponStats.WeaponStatManager.WeaponStatType>>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerSanguimancy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, (int FirstUnarmed, int SecondUnarmed, int ClassSpell)> playerSpells = new Dictionary<ulong, (int, int, int)>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerWorkerLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerWarriorLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerScholarLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerRogueLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerMutantLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerVBloodLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerDraculinLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerImmortalLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerCreatureLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, KeyValuePair<int, float>> playerBruteLegacy = new Dictionary<ulong, KeyValuePair<int, float>>(); private static Dictionary<ulong, Dictionary<BloodSystem.BloodType, List<BloodStats.BloodStatManager.BloodStatType>>> playerBloodStats = new Dictionary<ulong, Dictionary<BloodSystem.BloodType, List<BloodStats.BloodStatManager.BloodStatType>>>(); private static Dictionary<ulong, UnlockedFamiliarData> unlockedFamiliars = new Dictionary<ulong, UnlockedFamiliarData>(); private static Dictionary<ulong, (Entity Familiar, int FamKey)> familiarActives = new Dictionary<ulong, (Entity, int)>(); private static Dictionary<ulong, string> familiarSet = new Dictionary<ulong, string>(); private static Dictionary<ulong, FamiliarExperienceData> familiarExperience = new Dictionary<ulong, FamiliarExperienceData>(); private static Dictionary<ulong, HashSet<string>> playerParties = new Dictionary<ulong, HashSet<string>>(); private static Dictionary<ulong, List<(PrefabGUID, int)>> playerCraftingJobs = new Dictionary<ulong, List<(PrefabGUID, int)>>(); private static Dictionary<ulong, int> playerMaxWeaponLevels = new Dictionary<ulong, int>(); private static readonly Dictionary<string, string> filePaths = new Dictionary<string, string> { { "Experience", JsonFiles.PlayerExperienceJson }, { "Classes", JsonFiles.PlayerClassesJson }, { "Prestiges", JsonFiles.PlayerPrestigesJson }, { "PlayerBools", JsonFiles.PlayerBoolsJson }, { "PlayerParties", JsonFiles.PlayerPartiesJson }, { "Woodcutting", JsonFiles.PlayerWoodcuttingJson }, { "Mining", JsonFiles.PlayerMiningJson }, { "Fishing", JsonFiles.PlayerFishingJson }, { "Blacksmithing", JsonFiles.PlayerBlacksmithingJson }, { "Tailoring", JsonFiles.PlayerTailoringJson }, { "Enchanting", JsonFiles.PlayerEnchantingJson }, { "Alchemy", JsonFiles.PlayerAlchemyJson }, { "Harvesting", JsonFiles.PlayerHarvestingJson }, { "SwordExpertise", JsonFiles.PlayerSwordExpertiseJson }, { "AxeExpertise", JsonFiles.PlayerAxeExpertiseJson }, { "MaceExpertise", JsonFiles.PlayerMaceExpertiseJson }, { "SpearExpertise", JsonFiles.PlayerSpearExpertiseJson }, { "CrossbowExpertise", JsonFiles.PlayerCrossbowExpertiseJson }, { "GreatSwordExpertise", JsonFiles.PlayerGreatSwordExpertise }, { "SlashersExpertise", JsonFiles.PlayerSlashersExpertiseJson }, { "PistolsExpertise", JsonFiles.PlayerPistolsExpertiseJson }, { "ReaperExpertise", JsonFiles.PlayerReaperExpertise }, { "LongbowExpertise", JsonFiles.PlayerLongbowExpertiseJson }, { "WhipExpertise", JsonFiles.PlayerWhipExpertiseJson }, { "Sanguimancy", JsonFiles.PlayerSanguimancyJson }, { "PlayerSpells", JsonFiles.PlayerSpellsJson }, { "WeaponStats", JsonFiles.PlayerWeaponStatsJson }, { "WorkerLegacy", JsonFiles.PlayerWorkerLegacyJson }, { "WarriorLegacy", JsonFiles.PlayerWarriorLegacyJson }, { "ScholarLegacy", JsonFiles.PlayerScholarLegacyJson }, { "RogueLegacy", JsonFiles.PlayerRogueLegacyJson }, { "MutantLegacy", JsonFiles.PlayerMutantLegacyJson }, { "VBloodLegacy", JsonFiles.PlayerVBloodLegacyJson }, { "DraculinLegacy", JsonFiles.PlayerDraculinLegacyJson }, { "ImmortalLegacy", JsonFiles.PlayerImmortalLegacyJson }, { "CreatureLegacy", JsonFiles.PlayerCreatureLegacyJson }, { "BruteLegacy", JsonFiles.PlayerBruteLegacyJson }, { "BloodStats", JsonFiles.PlayerBloodStatsJson }, { "FamiliarActives", JsonFiles.PlayerFamiliarActivesJson }, { "FamiliarSets", JsonFiles.PlayerFamiliarSetsJson } }; public static Dictionary<ulong, (Entity Familiar, int FamKey)> FamiliarActives { get { return familiarActives; } set { familiarActives = value; } } public static Dictionary<ulong, string> FamiliarSet { get { return familiarSet; } set { familiarSet = value; } } public static Dictionary<ulong, UnlockedFamiliarData> UnlockedFamiliars { get { return unlockedFamiliars; } set { unlockedFamiliars = value; } } public static Dictionary<ulong, FamiliarExperienceData> FamiliarExperience { get { return familiarExperience; } set { familiarExperience = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerExperience { get { return playerExperience; } set { playerExperience = value; } } public static Dictionary<ulong, Dictionary<LevelingSystem.PlayerClasses, (List<int>, List<int>)>> PlayerClasses { get { return playerClasses; } set { playerClasses = value; } } public static Dictionary<ulong, Dictionary<PrestigeSystem.PrestigeType, int>> PlayerPrestiges { get { return playerPrestiges; } set { playerPrestiges = value; } } public static Dictionary<ulong, Dictionary<string, bool>> PlayerBools { get { return playerBools; } set { playerBools = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerWoodcutting { get { return playerWoodcutting; } set { playerWoodcutting = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerMining { get { return playerMining; } set { playerMining = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerFishing { get { return playerFishing; } set { playerFishing = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerBlacksmithing { get { return playerBlacksmithing; } set { playerBlacksmithing = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerTailoring { get { return playerTailoring; } set { playerTailoring = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerEnchanting { get { return playerEnchanting; } set { playerEnchanting = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerAlchemy { get { return playerAlchemy; } set { playerAlchemy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerHarvesting { get { return playerHarvesting; } set { playerHarvesting = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerSwordExpertise { get { return playerSwordExpertise; } set { playerSwordExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerAxeExpertise { get { return playerAxeExpertise; } set { playerAxeExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerMaceExpertise { get { return playerMaceExpertise; } set { playerMaceExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerSpearExpertise { get { return playerSpearExpertise; } set { playerSpearExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerCrossbowExpertise { get { return playerCrossbowExpertise; } set { playerCrossbowExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerGreatSwordExpertise { get { return playerGreatSwordExpertise; } set { playerGreatSwordExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerSlashersExpertise { get { return playerSlashersExpertise; } set { playerSlashersExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerPistolsExpertise { get { return playerPistolsExpertise; } set { playerPistolsExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerReaperExpertise { get { return playerReaperExpertise; } set { playerReaperExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerLongbowExpertise { get { return playerLongbowExpertise; } set { playerLongbowExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerWhipExpertise { get { return playerWhipExpertise; } set { playerWhipExpertise = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerSanguimancy { get { return playerSanguimancy; } set { playerSanguimancy = value; } } public static Dictionary<ulong, (int FirstUnarmed, int SecondUnarmed, int ClassSpell)> PlayerSpells { get { return playerSpells; } set { playerSpells = value; } } public static Dictionary<ulong, Dictionary<ExpertiseSystem.WeaponType, List<WeaponStats.WeaponStatManager.WeaponStatType>>> PlayerWeaponStats { get { return playerWeaponStats; } set { playerWeaponStats = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerWorkerLegacy { get { return playerWorkerLegacy; } set { playerWorkerLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerWarriorLegacy { get { return playerWarriorLegacy; } set { playerWarriorLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerScholarLegacy { get { return playerScholarLegacy; } set { playerScholarLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerRogueLegacy { get { return playerRogueLegacy; } set { playerRogueLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerMutantLegacy { get { return playerMutantLegacy; } set { playerMutantLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerVBloodLegacy { get { return playerVBloodLegacy; } set { playerVBloodLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerDraculinLegacy { get { return playerDraculinLegacy; } set { playerDraculinLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerImmortalLegacy { get { return playerImmortalLegacy; } set { playerImmortalLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerCreatureLegacy { get { return playerCreatureLegacy; } set { playerCreatureLegacy = value; } } public static Dictionary<ulong, KeyValuePair<int, float>> PlayerBruteLegacy { get { return playerBruteLegacy; } set { playerBruteLegacy = value; } } public static Dictionary<ulong, Dictionary<BloodSystem.BloodType, List<BloodStats.BloodStatManager.BloodStatType>>> PlayerBloodStats { get { return playerBloodStats; } set { playerBloodStats = value; } } public static Dictionary<ulong, HashSet<string>> PlayerParties { get { return playerParties; } set { playerParties = value; } } public static Dictionary<ulong, List<(PrefabGUID, int)>> PlayerCraftingJobs { get { return playerCraftingJobs; } set { playerCraftingJobs = value; } } public static Dictionary<ulong, int> PlayerMaxWeaponLevels { get { return playerMaxWeaponLevels; } set { playerMaxWeaponLevels = value; } } public static void LoadData<T>(ref Dictionary<ulong, T> dataStructure, string key) { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown string path = filePaths[key]; bool flag = default(bool); if (!File.Exists(path)) { File.Create(path).Dispose(); dataStructure = new Dictionary<ulong, T>(); ManualLogSource log = Log; BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(34, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(key); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" file created as it did not exist."); } log.LogInfo(val); return; } try { string text = File.ReadAllText(path); if (string.IsNullOrWhiteSpace(text)) { dataStructure = new Dictionary<ulong, T>(); return; } Dictionary<ulong, T> dictionary = JsonSerializer.Deserialize<Dictionary<ulong, T>>(text, prettyJsonOptions); dataStructure = dictionary ?? new Dictionary<ulong, T>(); } catch (IOException ex) { ManualLogSource log2 = Log; BepInExErrorLogInterpolatedStringHandler val2 = new BepInExErrorLogInterpolatedStringHandler(31, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Error reading "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(key); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" data from file: "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(ex.Message); } log2.LogError(val2); dataStructure = new Dictionary<ulong, T>(); } catch (JsonException ex2) { ManualLogSource log3 = Log; BepInExErrorLogInterpolatedStringHandler val2 = new BepInExErrorLogInterpolatedStringHandler(47, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("JSON deserialization error when loading "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(key); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" data: "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(ex2.Message); } log3.LogError(val2); dataStructure = new Dictionary<ulong, T>(); } } public static void LoadPlayerExperience() { LoadData(ref playerExperience, "Experience"); } public static void LoadPlayerClasses() { LoadData(ref playerClasses, "Classes"); } public static void LoadPlayerPrestiges() { LoadData(ref playerPrestiges, "Prestiges"); } public static void LoadPlayerBools() { LoadData(ref playerBools, "PlayerBools"); } public static void LoadPlayerParties() { LoadData(ref playerParties, "PlayerParties"); } public static void LoadPlayerWoodcutting() { LoadData(ref playerWoodcutting, "Woodcutting"); } public static void LoadPlayerMining() { LoadData(ref playerMining, "Mining"); } public static void LoadPlayerFishing() { LoadData(ref playerFishing, "Fishing"); } public static void LoadPlayerBlacksmithing() { LoadData(ref playerBlacksmithing, "Blacksmithing"); } public static void LoadPlayerTailoring() { LoadData(ref playerTailoring, "Tailoring"); } public static void LoadPlayerEnchanting() { LoadData(ref playerEnchanting, "Enchanting"); } public static void LoadPlayerAlchemy() { LoadData(ref playerAlchemy, "Alchemy"); } public static void LoadPlayerHarvesting() { LoadData(ref playerHarvesting, "Harvesting"); } public static void LoadPlayerSwordExpertise() { LoadData(ref playerSwordExpertise, "SwordExpertise"); } public static void LoadPlayerAxeExpertise() { LoadData(ref playerAxeExpertise, "AxeExpertise"); } public static void LoadPlayerMaceExpertise() { LoadData(ref playerMaceExpertise, "MaceExpertise"); } public static void LoadPlayerSpearExpertise() { LoadData(ref playerSpearExpertise, "SpearExpertise"); } public static void LoadPlayerCrossbowExpertise() { LoadData(ref playerCrossbowExpertise, "CrossbowExpertise"); } public static void LoadPlayerGreatSwordExpertise() { LoadData(ref playerGreatSwordExpertise, "GreatSwordExpertise"); } public static void LoadPlayerSlashersExpertise() { LoadData(ref playerSlashersExpertise, "SlashersExpertise"); } public static void LoadPlayerPistolsExpertise() { LoadData(ref playerPistolsExpertise, "PistolsExpertise"); } public static void LoadPlayerReaperExpertise() { LoadData(ref playerReaperExpertise, "ReaperExpertise"); } public static void LoadPlayerLongbowExpertise() { LoadData(ref playerLongbowExpertise, "LongbowExpertise"); } public static void LoadPlayerWhipExpertise() { LoadData(ref playerWhipExpertise, "WhipExpertise"); } public static void LoadPlayerSanguimancy() { LoadData(ref playerSanguimancy, "Sanguimancy"); } public static void LoadPlayerSpells() { LoadData(ref playerSpells, "PlayerSpells"); } public static void LoadPlayerWeaponStats() { LoadData(ref playerWeaponStats, "WeaponStats"); } public static void LoadPlayerWorkerLegacy() { LoadData(ref playerWorkerLegacy, "WorkerLegacy"); } public static void LoadPlayerWarriorLegacy() { LoadData(ref playerWarriorLegacy, "WarriorLegacy"); } public static void LoadPlayerScholarLegacy() { LoadData(ref playerScholarLegacy, "ScholarLegacy"); } public static void LoadPlayerRogueLegacy() { LoadData(ref playerRogueLegacy, "RogueLegacy"); } public static void LoadPlayerMutantLegacy() { LoadData(ref playerMutantLegacy, "MutantLegacy"); } public static void LoadPlayerVBloodLegacy() { LoadData(ref playerVBloodLegacy, "VBloodLegacy"); } public static void LoadPlayerDraculinLegacy() { LoadData(ref playerDraculinLegacy, "DraculinLegacy"); } public static void LoadPlayerImmortalLegacy() { LoadData(ref playerImmortalLegacy, "ImmortalLegacy"); } public static void LoadPlayerCreatureLegacy() { LoadData(ref playerCreatureLegacy, "CreatureLegacy"); } public static void LoadPlayerBruteLegacy() { LoadData(ref playerBruteLegacy, "BruteLegacy"); } public static void LoadPlayerBloodStats() { LoadData(ref playerBloodStats, "BloodStats"); } public static void LoadPlayerFamiliarActives() { LoadData(ref familiarActives, "FamiliarActives"); } public static void LoadPlayerFamiliarSets() { LoadData(ref familiarSet, "FamiliarSets"); } public static void SaveData<T>(Dictionary<ulong, T> data, string key) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown string path = filePaths[key]; bool flag = default(bool); try { string contents = JsonSerializer.Serialize(data, prettyJsonOptions); File.WriteAllText(path, contents); } catch (IOException ex) { ManualLogSource log = Log; BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(31, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Failed to write "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(key); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" data to file: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message); } log.LogInfo(val); } catch (JsonException ex2) { ManualLogSource log2 = Log; BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(44, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("JSON serialization error when saving "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(key); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" data: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex2.Message); } log2.LogInfo(val); } } public static void SavePlayerExperience() { SaveData(PlayerExperience, "Experience"); } public static void SavePlayerClasses() { SaveData(PlayerClasses, "Classes"); } public static void SavePlayerPrestiges() { SaveData(PlayerPrestiges, "Prestiges"); } public static void SavePlayerBools() { SaveData(PlayerBools, "PlayerBools"); } public static void SavePlayerParties() { SaveData(PlayerParties, "PlayerParties"); } public static void SavePlayerWoodcutting() { SaveData(PlayerWoodcutting, "Woodcutting"); } public static void SavePlayerMining() { SaveData(PlayerMining, "Mining"); } public static void SavePlayerFishing() { SaveData(PlayerFishing, "Fishing"); } public static void SavePlayerBlacksmithing() { SaveData(PlayerBlacksmithing, "Blacksmithing"); } public static void SavePlayerTailoring() { SaveData(PlayerTailoring, "Tailoring"); } public static void SavePlayerEnchanting() { SaveData(PlayerEnchanting, "Enchanting"); } public static void SavePlayerAlchemy() { SaveData(PlayerAlchemy, "Alchemy"); } public static void SavePlayerHarvesting() { SaveData(PlayerHarvesting, "Harvesting"); } public static void SavePlayerSwordExpertise() { SaveData(PlayerSwordExpertise, "SwordExpertise"); } public static void SavePlayerAxeExpertise() { SaveData(PlayerAxeExpertise, "AxeExpertise"); } public static void SavePlayerMaceExpertise() { SaveData(PlayerMaceExpertise, "MaceExpertise"); } public static void SavePlayerSpearExpertise() { SaveData(PlayerSpearExpertise, "SpearExpertise"); } public static void SavePlayerCrossbowExpertise() { SaveData(PlayerCrossbowExpertise, "CrossbowExpertise"); } public static void SavePlayerGreatSwordExpertise() { SaveData(PlayerGreatSwordExpertise, "GreatSwordExpertise"); } public static void SavePlayerSlashersExpertise() { SaveData(PlayerSlashersExpertise, "SlashersExpertise"); } public static void SavePlayerPistolsExpertise() { SaveData(PlayerPistolsExpertise, "PistolsExpertise"); } public static void SavePlayerReaperExpertise() { SaveData(PlayerReaperExpertise, "ReaperExpertise"); } public static void SavePlayerLongbowExpertise() { SaveData(PlayerLongbowExpertise, "LongbowExpertise"); } public static void SavePlayerWhipExpertise() { SaveData(PlayerWhipExpertise, "WhipExpertise"); } public static void SavePlayerSanguimancy() { SaveData(PlayerSanguimancy, "Sanguimancy"); } public static void SavePlayerSpells() { SaveData(PlayerSpells, "PlayerSpells"); } public static void SavePlayerWeaponStats() { SaveData(PlayerWeaponStats, "WeaponStats"); } public static void SavePlayerWorkerLegacy() { SaveData(PlayerWorkerLegacy, "WorkerLegacy"); } public static void SavePlayerWarriorLegacy() { SaveData(PlayerWarriorLegacy, "WarriorLegacy"); } public static void SavePlayerScholarLegacy() { SaveData(PlayerScholarLegacy, "ScholarLegacy"); } public static void SavePlayerRogueLegacy() { SaveData(PlayerRogueLegacy, "RogueLegacy"); } public static void SavePlayerMutantLegacy() { SaveData(PlayerMutantLegacy, "MutantLegacy"); } public static void SavePlayerVBloodLegacy() { SaveData(PlayerVBloodLegacy, "VBloodLegacy"); } public static void SavePlayerDraculinLegacy() { SaveData(PlayerDraculinLegacy, "DraculinLegacy"); } public static void SavePlayerImmortalLegacy() { SaveData(PlayerImmortalLegacy, "ImmortalLegacy"); } public static void SavePlayerCreatureLegacy() { SaveData(PlayerCreatureLegacy, "CreatureLegacy"); } public static void SavePlayerBruteLegacy() { SaveData(PlayerBruteLegacy, "BruteLegacy"); } public static void SavePlayerBloodStats() { SaveData(PlayerBloodStats, "BloodStats"); } public static void SavePlayerFamiliarActives() { SaveData(FamiliarActives, "FamiliarActives"); } public static void SavePlayerFamiliarSets() { SaveData(FamiliarSet, "FamiliarSets"); } } public static class FamiliarExperienceManager { private static string GetFilePath(ulong playerId) { return Path.Combine(Plugin.FamiliarExperiencePath, $"{playerId}_familiar_experience.json"); } public static void SaveFamiliarExperience(ulong playerId, DataStructures.FamiliarExperienceData data) { string filePath = GetFilePath(playerId); JsonSerializerOptions options = new JsonSerializerOptions { WriteIndented = true }; string contents = JsonSerializer.Serialize(data, options); File.WriteAllText(filePath, contents); } public static DataStructures.FamiliarExperienceData LoadFamiliarExperience(ulong playerId) { string filePath = GetFilePath(playerId); if (!File.Exists(filePath)) { return new DataStructures.FamiliarExperienceData(); } string json = File.ReadAllText(filePath); return JsonSerializer.Deserialize<DataStructures.FamiliarExperienceData>(json); } } public static class FamiliarUnlocksManager { private static string GetFilePath(ulong playerId) { return Path.Combine(Plugin.FamiliarUnlocksPath, $"{playerId}_familiar_unlocks.json"); } public static void SaveUnlockedFamiliars(ulong playerId, DataStructures.UnlockedFamiliarData data) { string filePath = GetFilePath(playerId); JsonSerializerOptions options = new JsonSerializerOptions { WriteIndented = true }; string contents = JsonSerializer.Serialize(data, options); File.WriteAllText(filePath, contents); } public static DataStructures.UnlockedFamiliarData LoadUnlockedFamiliars(ulong playerId) { string filePath = GetFilePath(playerId); if (!File.Exists(filePath)) { return new DataStructures.UnlockedFamiliarData(); } string json = File.ReadAllText(filePath); return JsonSerializer.Deserialize<DataStructures.UnlockedFamiliarData>(json); } } public class JsonFiles { public static readonly string PlayerExperienceJson = Path.Combine(Plugin.PlayerLevelingPath, "player_experience.json"); public static readonly string PlayerPrestigesJson = Path.Combine(Plugin.PlayerLevelingPath, "player_prestiges.json"); public static readonly string PlayerClassesJson = Path.Combine(Plugin.ConfigFiles, "player_classes.json"); public static readonly string PlayerBoolsJson = Path.Combine(Plugin.ConfigFiles, "player_bools.json"); public static readonly string PlayerPartiesJson = Path.Combine(Plugin.ConfigFiles, "player_parties.json"); public static readonly string PlayerWoodcuttingJson = Path.Combine(Plugin.PlayerProfessionPath, "player_woodcutting.json"); public static readonly string PlayerMiningJson = Path.Combine(Plugin.PlayerProfessionPath, "player_mining.json"); public static readonly string PlayerFishingJson = Path.Combine(Plugin.PlayerProfessionPath, "player_fishing.json"); public static readonly string PlayerBlacksmithingJson = Path.Combine(Plugin.PlayerProfessionPath, "player_blacksmithing.json"); public static readonly string PlayerTailoringJson = Path.Combine(Plugin.PlayerProfessionPath, "player_tailoring.json"); public static readonly string PlayerEnchantingJson = Path.Combine(Plugin.PlayerProfessionPath, "player_enchanting.json"); public static readonly string PlayerAlchemyJson = Path.Combine(Plugin.PlayerProfessionPath, "player_alchemy.json"); public static readonly string PlayerHarvestingJson = Path.Combine(Plugin.PlayerProfessionPath, "player_harvesting.json"); public static readonly string PlayerSwordExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_sword.json"); public static readonly string PlayerAxeExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_axe.json"); public static readonly string PlayerMaceExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_mace.json"); public static readonly string PlayerSpearExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_spear.json"); public static readonly string PlayerCrossbowExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_crossbow.json"); public static readonly string PlayerGreatSwordExpertise = Path.Combine(Plugin.PlayerExpertisePath, "player_greatsword.json"); public static readonly string PlayerSlashersExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_slashers.json"); public static readonly string PlayerPistolsExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_pistols.json"); public static readonly string PlayerReaperExpertise = Path.Combine(Plugin.PlayerExpertisePath, "player_reaper.json"); public static readonly string PlayerLongbowExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_longbow.json"); public static readonly string PlayerUnarmedExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_unarmed.json"); public static readonly string PlayerWhipExpertiseJson = Path.Combine(Plugin.PlayerExpertisePath, "player_whip.json"); public static readonly string PlayerSanguimancyJson = Path.Combine(Plugin.PlayerExpertisePath, "player_sanguimancy.json"); public static readonly string PlayerSpellsJson = Path.Combine(Plugin.PlayerLevelingPath, "player_spells.json"); public static readonly string PlayerWeaponStatsJson = Path.Combine(Plugin.PlayerExpertisePath, "player_weapon_stats.json"); public static readonly string PlayerWorkerLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_worker.json"); public static readonly string PlayerWarriorLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_warrior.json"); public static readonly string PlayerScholarLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_scholar.json"); public static readonly string PlayerRogueLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_rogue.json"); public static readonly string PlayerMutantLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_mutant.json"); public static readonly string PlayerVBloodLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_vblood.json"); public static readonly string PlayerDraculinLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_draculin.json"); public static readonly string PlayerImmortalLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_immortal.json"); public static readonly string PlayerCreatureLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_creature.json"); public static readonly string PlayerBruteLegacyJson = Path.Combine(Plugin.PlayerBloodPath, "player_brute.json"); public static readonly string PlayerBloodStatsJson = Path.Combine(Plugin.PlayerBloodPath, "player_blood_stats.json"); public static readonly string PlayerFamiliarActivesJson = Path.Combine(Plugin.PlayerFamiliarsPath, "player_familiar_actives.json"); public static readonly string PlayerFamiliarSetsJson = Path.Combine(Plugin.FamiliarUnlocksPath, "player_familiar_sets.json"); } private static MonoBehaviour monoBehaviour; public static bool hasInitialized; public static World Server { get; } = GetWorld("Server") ?? throw new Exception("There is no Server world (yet)..."); public static EntityManager EntityManager { get; } = Server.EntityManager; public static PrefabCollectionSystem PrefabCollectionSystem { get; internal set; } public static ServerGameSettingsSystem ServerGameSettingsSystem { get; internal set; } public static ServerScriptMapper ServerScriptMapper { get; internal set; } public static DebugEventsSystem DebugEventsSystem { get; internal set; } public static ModifyUnitStatBuffSystem_Spawn ModifyUnitStatBuffSystem_Spawn { get; internal set; } public static ReplaceAbilityOnSlotSystem ReplaceAbilityOnSlotSystem { get; internal set; } public static EntityCommandBufferSystem EntityCommandBufferSystem { get; internal set; } public static ClaimAchievementSystem ClaimAchievementSystem { get; internal set; } public static GameDataSystem GameDataSystem { get; internal set; } public static FamiliarService FamiliarService { get; internal set; } public static LocalizationService Localization { get; } = new LocalizationService(); public static PlayerService Players { get; } = new PlayerService(); public static ServerGameManager ServerGameManager => ServerScriptMapper.GetServerGameManager(); public static Singleton NetworkIdSystem { get; internal set; } public static ScriptSpawnServer ScriptSpawnServer { get; internal set; } public static ServerGameSettings ServerGameSettings { get; internal set; } public static double ServerTime => ServerGameManager.ServerTime; public static ManualLogSource Log => Plugin.LogInstance; public static void Initialize() { //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (!hasInitialized) { PrefabCollectionSystem = Server.GetExistingSystemManaged<PrefabCollectionSystem>(); ServerGameSettingsSystem = Server.GetExistingSystemManaged<ServerGameSettingsSystem>(); DebugEventsSystem = Server.GetExistingSystemManaged<DebugEventsSystem>(); ServerScriptMapper = Server.GetExistingSystemManaged<ServerScriptMapper>(); ModifyUnitStatBuffSystem_Spawn = Server.GetExistingSystemManaged<ModifyUnitStatBuffSystem_Spawn>(); ReplaceAbilityOnSlotSystem = Server.GetExistingSystemManaged<ReplaceAbilityOnSlotSystem>(); ClaimAchievementSystem = Server.GetExistingSystemManaged<ClaimAchievementSystem>(); EntityCommandBufferSystem = Server.GetExistingSystemManaged<EntityCommandBufferSystem>(); GameDataSystem = Server.GetExistingSystemManaged<GameDataSystem>(); NetworkIdSystem = ((ComponentSystemBase)ServerScriptMapper).GetSingleton<Singleton>(); ScriptSpawnServer = Server.GetExistingSystemManaged<ScriptSpawnServer>(); ReplaceAbilityOnGroupSlotSystemPatch.ClassSpells = LevelingSystem.GetSpellPrefabs(); ServerGameSettings = ServerGameSettingsSystem._Settings; if (Plugin.FamiliarSystem.Value) { FamiliarService = new FamiliarService(); } hasInitialized = true; } } private static World GetWorld(string name) { Enumerator<World> enumerator = World.s_AllWorlds.GetEnumerator(); while (enumerator.MoveNext()) { World current = enumerator.Current; if (current.Name == name) { return current; } } return null; } public static void StartCoroutine(IEnumerator routine) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if ((Object)(object)monoBehaviour == (Object)null) { GameObject val = new GameObject("Bloodcraft"); monoBehaviour = (MonoBehaviour)(object)val.AddComponent<IgnorePhysicsDebugSystem>(); Object.DontDestroyOnLoad((Object)(object)val); } monoBehaviour.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(routine)); } public static List<int> ParseConfigString(string configString) { if (string.IsNullOrEmpty(configString)) { return new List<int>(); } return configString.Split(',').Select(int.Parse).ToList(); } } public static class ECSExtensions { private static EntityManager EntityManager => Core.EntityManager; public unsafe static void Write<T>(this Entity entity, T componentData) where T : struct { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); byte[] array = StructureToByteArray(componentData); int num = Marshal.SizeOf<T>(); fixed (byte* ptr = array) { EntityManager entityManager = EntityManager; ((EntityManager)(ref entityManager)).SetComponentDataRaw(entity, val.TypeIndex, (void*)ptr, num); } } public static byte[] StructureToByteArray<T>(T structure) where T : struct { int num = Marshal.SizeOf(structure); byte[] array = new byte[num]; IntPtr intPtr = Marshal.AllocHGlobal(num); Marshal.StructureToPtr(structure, intPtr, fDeleteOld: true); Marshal.Copy(intPtr, array, 0, num); Marshal.FreeHGlobal(intPtr); return array; } public unsafe static T Read<T>(this Entity entity) where T : struct { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = EntityManager; void* componentDataRawRO = ((EntityManager)(ref entityManager)).GetComponentDataRawRO(entity, val.TypeIndex); return Marshal.PtrToStructure<T>(new IntPtr(componentDataRawRO)); } public static DynamicBuffer<T> ReadBuffer<T>(this Entity entity) where T : struct { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) EntityManager entityManager = EntityManager; return ((EntityManager)(ref entityManager)).GetBuffer<T>(entity, false); } public static bool TryGetComponent<T>(this Entity entity, out T componentData) where T : struct { //IL_0007: 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) componentData = default(T); if (entity.Has<T>()) { componentData = entity.Read<T>(); return true; } return false; } public static bool Has<T>(this Entity entity) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = EntityManager; return ((EntityManager)(ref entityManager)).HasComponent(entity, val); } public static string LookupName(this PrefabGUID prefabGUID) { //IL_000c: 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_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) PrefabCollectionSystem prefabCollectionSystem = Core.PrefabCollectionSystem; object obj; if (!prefabCollectionSystem.PrefabGuidToNameDictionary.ContainsKey(prefabGUID)) { obj = "Guid Not Found"; } else { string text = prefabCollectionSystem.PrefabGuidToNameDictionary[prefabGUID]; PrefabGUID val = prefabGUID; obj = text + " " + ((object)(PrefabGUID)(ref val)).ToString(); } return obj.ToString(); } public static string GetPrefabName(this PrefabGUID itemPrefabGUID) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (!LocalizationService.prefabNames.TryGetValue(itemPrefabGUID._Value, out var value)) { return itemPrefabGUID.LookupName(); } return LocalizationService.GetLocalization(value); } public static void LogComponentTypes(this Entity entity) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) EntityManager entityManager = EntityManager; Enumerator<ComponentType> enumerator = ((EntityManager)(ref entityManager)).GetComponentTypes(entity, (Allocator)2).GetEnumerator(); Core.Log.LogInfo((object)"==="); bool flag = default(bool); while (enumerator.MoveNext()) { ComponentType current = enumerator.Current; ManualLogSource log = Core.Log; BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(0, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<ComponentType>(current); } log.LogInfo(val); } Core.Log.LogInfo((object)"==="); } public static void Add<T>(this Entity entity) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = EntityManager; ((EntityManager)(ref entityManager)).AddComponent(entity, val); } public static void Remove<T>(this Entity entity) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ComponentType val = default(ComponentType); ((ComponentType)(ref val))..ctor(Il2CppType.Of<T>(), (AccessMode)0); EntityManager entityManager = EntityManager; ((EntityManager)(ref entityManager)).RemoveComponent(entity, val); } } [BepInPlugin("io.zfolmt.Bloodcraft", "Bloodcraft", "0.9.15")] internal class Plugin : BasePlugin { private Harmony _harmony; public static readonly string ConfigFiles = Path.Combine(Paths.ConfigPath, "Bloodcraft"); public static readonly string PlayerLevelingPath = Path.Combine(ConfigFiles, "PlayerLeveling"); public static readonly string PlayerExpertisePath = Path.Combine(ConfigFiles, "WeaponExpertise"); public static readonly string PlayerBloodPath = Path.Combine(ConfigFiles, "BloodLegacies"); public static readonly string PlayerProfessionPath = Path.Combine(ConfigFiles, "Professions"); public static readonly string PlayerFamiliarsPath = Path.Combine(ConfigFiles, "Familiars"); public static readonly string FamiliarExperiencePath = Path.Combine(PlayerFamiliarsPath, "FamiliarLeveling"); public static readonly string FamiliarUnlocksPath = Path.Combine(PlayerFamiliarsPath, "FamiliarUnlocks"); private static ConfigEntry<string> _languageLocalization; private static ConfigEntry<bool> _levelingSystem; private static ConfigEntry<bool> _prestigeSystem; private static ConfigEntry<string> _prestigeBuffs; private static ConfigEntry<string> _prestigeLevelsToUnlockClassSpells; private static ConfigEntry<string> _bloodKnightBuffs; private static ConfigEntry<string> _demonHunterBuffs; private static ConfigEntry<string> _vampireLordBuffs; private static ConfigEntry<string> _shadowBladeBuffs; private static ConfigEntry<string> _arcaneSorcererBuffs; private static ConfigEntry<string> _deathMageBuffs; private static ConfigEntry<int> _maxLevelingPrestiges; private static ConfigEntry<float> _levelingPrestigeReducer; private static ConfigEntry<float> _prestigeRatesReducer; private static ConfigEntry<float> _prestigeStatMultiplier; private static ConfigEntry<float> _prestigeRatesMultiplier; private static ConfigEntry<int> _maxPlayerLevel; private static ConfigEntry<int> _startingLevel; private static ConfigEntry<float> _unitLevelingMultiplier; private static ConfigEntry<float> _vBloodLevelingMultiplier; private static ConfigEntry<float> _groupLevelingMultiplier; private static ConfigEntry<float> _levelScalingMultiplier; private static ConfigEntry<float> _docileUnitMultiplier; private static ConfigEntry<float> _warEventMultiplier; private static ConfigEntry<float> _unitSpawnerMultiplier; private static ConfigEntry<bool> _parties; private static ConfigEntry<int> _maxPartySize; private static ConfigEntry<bool> _preventFriendlyFire; private static ConfigEntry<float> _expShareDistance; private static ConfigEntry<int> _changeClassItem; private static ConfigEntry<int> _changeClassItemQuantity; private static ConfigEntry<bool> _expertiseSystem; private static ConfigEntry<int> _maxExpertisePrestiges; private static ConfigEntry<bool> _unarmedSlots; private static ConfigEntry<bool> _shiftSlots; private static ConfigEntry<int> _maxExpertiseLevel; private static ConfigEntry<float> _unitExpertiseMultiplier; private static ConfigEntry<float> _vBloodExpertiseMultiplier; private static ConfigEntry<int> _expertiseStatChoices; private static ConfigEntry<int> _resetExpertiseItem; private static ConfigEntry<int> _resetExpertiseItemQuantity; private static ConfigEntry<float> _maxHealth; private static ConfigEntry<float> _movementSpeed; private static ConfigEntry<float> _primaryAttackSpeed; private static ConfigEntry<float> _physicalLifeLeech; private static ConfigEntry<float> _spellLifeLeech; private static ConfigEntry<float> _primaryLifeLeech; private static ConfigEntry<float> _physicalPower; private static ConfigEntry<float> _spellPower; private static ConfigEntry<float> _physicalCritChance; private static ConfigEntry<float> _physicalCritDamage; private static ConfigEntry<float> _spellCritChance; private static ConfigEntry<float> _spellCritDamage; private static ConfigEntry<bool> _bloodSystem; private static ConfigEntry<int> _maxLegacyPrestiges; private static ConfigEntry<bool> _bloodQualityBonus; private static ConfigEntry<float> _prestigeBloodQuality; private static ConfigEntry<int> _maxBloodLevel; private static ConfigEntry<float> _unitLegacyMultiplier; private static ConfigEntry<float> _vBloodLegacyMultipler; private static ConfigEntry<int> _legacyStatChoices; private static ConfigEntry<int> _resetLegacyItem; private static ConfigEntry<int> _resetLegacyItemQuantity; private static ConfigEntry<float> _healingReceived; private static ConfigEntry<float> _damageReduction; private static ConfigEntry<float> _physicalResistance; private static ConfigEntry<float> _spellResistance; private static ConfigEntry<float> _resourceYield; private static ConfigEntry<float> _ccReduction; private static ConfigEntry<float> _spellCooldownRecoveryRate; private static ConfigEntry<float> _weaponCooldownRecoveryRate; private static ConfigEntry<float> _ultimateCooldownRecoveryRate; private static ConfigEntry<float> _minionDamage; private static ConfigEntry<float> _shieldAbsorb; private static ConfigEntry<float> _bloodEfficiency; private static ConfigEntry<bool> _professionSystem; private static ConfigEntry<int> _maxProfessionLevel; private static ConfigEntry<float> _professionMultiplier; private static ConfigEntry<bool> _familiarSystem; private static ConfigEntry<bool> _familiarCombat; private static ConfigEntry<int> _maxFamiliarLevel; private static ConfigEntry<bool> _allowVBloods; private static ConfigEntry<string> _bannedUnits; private static ConfigEntry<string> _bannedTypes; private static ConfigEntry<float> _vBloodDamageMultiplier; private static ConfigEntry<float> _playerVampireDamageMultiplier; private static ConfigEntry<float> _unitFamiliarMultiplier; private static ConfigEntry<float> _vBloodFamiliarMultiplier; private static ConfigEntry<float> _unitUnlockChance; private static ConfigEntry<float> _vBloodUnlockChance; private static ConfigEntry<bool> _softSynergies; private static ConfigEntry<bool> _hardSynergies; private static ConfigEntry<bool> _classSpellSchoolOnHitEffects; private static ConfigEntry<float> _onHitProcChance; private static ConfigEntry<float> _statSyngergyMultiplier; private static ConfigEntry<string> _bloodKnightWeapon; private static ConfigEntry<string> _bloodKnightBlood; private static ConfigEntry<string> _bloodKnightSpells; private static ConfigEntry<string> _demonHunterWeapon; private static ConfigEntry<string> _demonHunterBlood; private static ConfigEntry<string> _demonHunterSpells; private static ConfigEntry<string> _vampireLordWeapon; private static ConfigEntry<string> _vampireLordBlood; private static ConfigEntry<string> _vampireLordSpells; private static ConfigEntry<string> _shadowBladeWeapon; private static ConfigEntry<string> _shadowBladeBlood; private static ConfigEntry<string> _shadowBladeSpells; private static ConfigEntry<string> _arcaneSorcererWeapon; private static ConfigEntry<string> _arcaneSorcererBlood; private static ConfigEntry<string> _arcaneSorcererSpells; private static ConfigEntry<string> _deathMageWeapon; private static ConfigEntry<string> _deathMageBlood; private static ConfigEntry<string> _deathMageSpells; private static readonly Action[] loadLeveling = new Action[2] { Core.DataStructures.LoadPlayerExperience, Core.DataStructures.LoadPlayerPrestiges }; private static readonly Action[] loadExpertises = new Action[12] { Core.DataStructures.LoadPlayerSwordExpertise, Core.DataStructures.LoadPlayerAxeExpertise, Core.DataStructures.LoadPlayerMaceExpertise, Core.DataStructures.LoadPlayerSpearExpertise, Core.DataStructures.LoadPlayerCrossbowExpertise, Core.DataStructures.LoadPlayerGreatSwordExpertise, Core.DataStructures.LoadPlayerSlashersExpertise, Core.DataStructures.LoadPlayerPistolsExpertise, Core.DataStructures.LoadPlayerReaperExpertise, Core.DataStructures.LoadPlayerLongbowExpertise, Core.DataStructures.LoadPlayerWhipExpertise, Core.DataStructures.LoadPlayerWeaponStats }; private static readonly Action[] loadSanguimancy = new Action[2] { Core.DataStructures.LoadPlayerSanguimancy, Core.DataStructures.LoadPlayerSpells }; private static readonly Action[] loadLegacies = new Action[11] { Core.DataStructures.LoadPlayerWorkerLegacy, Core.DataStructures.LoadPlayerWarriorLegacy, Core.DataStructures.LoadPlayerScholarLegacy, Core.DataStructures.LoadPlayerRogueLegacy, Core.DataStructures.LoadPlayerMutantLegacy, Core.DataStructures.LoadPlayerVBloodLegacy, Core.DataStructures.LoadPlayerDraculinLegacy, Core.DataStructures.LoadPlayerImmortalLegacy, Core.DataStructures.LoadPlayerCreatureLegacy, Core.DataStructures.LoadPlayerBruteLegacy, Core.DataStructures.LoadPlayerBloodStats }; private static readonly Action[] loadProfessions = new Action[8] { Core.DataStructures.LoadPlayerWoodcutting, Core.DataStructures.LoadPlayerMining, Core.DataStructures.LoadPlayerFishing, Core.DataStructures.LoadPlayerBlacksmithing, Core.DataStructures.LoadPlayerTailoring, Core.DataStructures.LoadPlayerEnchanting, Core.DataStructures.LoadPlayerAlchemy, Core.DataStructures.LoadPlayerHarvesting }; private static readonly Action[] loadFamiliars = new Action[2] { Core.DataStructures.LoadPlayerFamiliarActives, Core.DataStructures.LoadPlayerFamiliarSets }; private static readonly List<string> directoryPaths = new List<string>(8) { ConfigFiles, PlayerLevelingPath, PlayerExpertisePath, PlayerBloodPath, PlayerProfessionPath, PlayerFamiliarsPath, FamiliarExperiencePath, FamiliarUnlocksPath }; internal static Plugin Instance { get; private set; } public static Harmony Harmony => Instance._harmony; public static ManualLogSource LogInstance => ((BasePlugin)Instance).Log; public static ConfigEntry<string> LanguageLocalization => _languageLocalization; public static ConfigEntry<bool> LevelingSystem => _levelingSystem; public static ConfigEntry<bool> PrestigeSystem => _prestigeSystem; public static ConfigEntry<string> PrestigeBuffs => _prestigeBuffs; public static ConfigEntry<string> PrestigeLevelsToUnlockClassSpells => _prestigeLevelsToUnlockClassSpells; public static ConfigEntry<string> BloodKnightBuffs => _bloodKnightBuffs; public static ConfigEntry<string> DemonHunterBuffs => _demonHunterBuffs; public static ConfigEntry<string> VampireLordBuffs => _vampireLordBuffs; public static ConfigEntry<string> ShadowBladeBuffs => _shadowBladeBuffs; public static ConfigEntry<string> ArcaneSorcererBuffs => _arcaneSorcererBuffs; public static ConfigEntry<string> DeathMageBuffs => _deathMageBuffs; public static ConfigEntry<int> MaxLevelingPrestiges => _maxLevelingPrestiges; public static ConfigEntry<float> LevelingPrestigeReducer => _levelingPrestigeReducer; public static ConfigEntry<float> PrestigeRatesReducer => _prestigeRatesReducer; public static ConfigEntry<float> PrestigeStatMultiplier => _prestigeStatMultiplier; public static ConfigEntry<float> PrestigeRatesMultiplier => _prestigeRatesMultiplier; public static ConfigEntry<int> MaxPlayerLevel => _maxPlayerLevel; public static ConfigEntry<int> StartingLevel => _startingLevel; public static ConfigEntry<float> UnitLevelingMultiplier => _unitLevelingMultiplier; public static ConfigEntry<float> VBloodLevelingMultiplier => _vBloodLevelingMultiplier; public static ConfigEntry<float> GroupLevelingMultiplier => _groupLevelingMultiplier; public static ConfigEntry<float> LevelScalingMultiplier => _levelScalingMultiplier; public static ConfigEntry<int> MaxPartySize => _maxPartySize; public static ConfigEntry<float> ExpShareDistance => _expShareDistance; public static ConfigEntry<bool> Parties => _parties; public static ConfigEntry<bool> PreventFriendlyFire => _preventFriendlyFire; public static ConfigEntry<float> DocileUnitMultiplier => _docileUnitMultiplier; public static ConfigEntry<float> WarEventMultiplier => _warEventMultiplier; public static ConfigEntry<float> UnitSpawnerMultiplier => _unitSpawnerMultiplier; public static ConfigEntry<int> ChangeClassItem => _changeClassItem; public static ConfigEntry<int> ChangeClassItemQuantity => _changeClassItemQuantity; public static ConfigEntry<bool> ExpertiseSystem => _expertiseSystem; public static ConfigEntry<int> MaxExpertisePrestiges => _maxExpertisePrestiges; public static ConfigEntry<bool> UnarmedSlots => _unarmedSlots; public static ConfigEntry<bool> ShiftSlot => _shiftSlots; public static ConfigEntry<int> MaxExpertiseLevel => _maxExpertiseLevel; public static ConfigEntry<float> UnitExpertiseMultiplier => _unitExpertiseMultiplier; public static ConfigEntry<float> VBloodExpertiseMultiplier => _vBloodExpertiseMultiplier; public static ConfigEntry<int> ExpertiseStatChoices => _expertiseStatChoices; public static ConfigEntry<int> ResetExpertiseItem => _resetExpertiseItem; public static ConfigEntry<int> ResetExpertiseItemQuantity => _resetExpertiseItemQuantity; public static ConfigEntry<float> MaxHealth => _maxHealth; public static ConfigEntry<float> MovementSpeed => _movementSpeed; public static ConfigEntry<float> PrimaryAttackSpeed => _primaryAttackSpeed; public static ConfigEntry<float> PhysicalLifeLeech => _physicalLifeLeech; public static ConfigEntry<float> SpellLifeLeech => _spellLifeLeech; public static ConfigEntry<float> PrimaryLifeLeech => _primaryLifeLeech; public static ConfigEntry<float> PhysicalPower => _physicalPower; public static ConfigEntry<float> SpellPower => _spellPower; public static ConfigEntry<float> PhysicalCritChance => _physicalCritChance; public static ConfigEntry<float> PhysicalCritDamage => _physicalCritDamage; public static ConfigEntry<float> SpellCritChance => _spellCritChance; public static ConfigEntry<float> SpellCritDamage => _spellCritDamage; public static ConfigEntry<bool> BloodSystem => _bloodSystem; public static ConfigEntry<int> MaxLegacyPrestiges => _maxLegacyPrestiges; public static ConfigEntry<bool> BloodQualityBonus => _bloodQualityBonus; public static ConfigEntry<float> PrestigeBloodQuality => _prestigeBloodQuality; public static ConfigEntry<int> MaxBloodLevel => _maxBloodLevel; public static ConfigEntry<float> UnitLegacyMultiplier => _unitLegacyMultiplier; public static ConfigEntry<float> VBloodLegacyMultipler => _vBloodLegacyMultipler; public static ConfigEntry<int> LegacyStatChoices => _legacyStatChoices; public static ConfigEntry<int> ResetLegacyItem => _resetLegacyItem; public static ConfigEntry<int> ResetLegacyItemQuantity => _resetLegacyItemQuantity; public static ConfigEntry<float> HealingReceived => _healingReceived; public static ConfigEntry<float> DamageReduction => _damageReduction; public static ConfigEntry<float> PhysicalResistance => _physicalResistance; public static ConfigEntry<float> SpellResistance => _spellResistance; public static ConfigEntry<float> ResourceYield => _resourceYield; public static ConfigEntry<float> CCReduction => _ccReduction; public static ConfigEntry<float> SpellCooldownRecoveryRate => _spellCooldownRecoveryRate; public static ConfigEntry<float> WeaponCooldownRecoveryRate => _weaponCooldownRecoveryRate; public static ConfigEntry<float> UltimateCooldownRecoveryRate => _ultimateCooldownRecoveryRate; public static ConfigEntry<float> MinionDamage => _minionDamage; public static ConfigEntry<float> ShieldAbsorb => _shieldAbsorb; public static ConfigEntry<float> BloodEfficiency => _bloodEfficiency; public static ConfigEntry<bool> ProfessionSystem => _professionSystem; public static ConfigEntry<int> MaxProfessionLevel => _maxProfessionLevel; public static ConfigEntry<float> ProfessionMultiplier => _professionMultiplier; public static ConfigEntry<bool> FamiliarSystem => _familiarSystem; public static ConfigEntry<bool> FamiliarCombat => _familiarCombat; public static ConfigEntry<int> MaxFamiliarLevel => _maxFamiliarLevel; public static ConfigEntry<bool> AllowVBloods => _allowVBloods; public static ConfigEntry<string> BannedUnits => _bannedUnits; public static ConfigEntry<string> BannedTypes => _bannedTypes; public static ConfigEntry<float> UnitFamiliarMultiplier => _unitFamiliarMultiplier; public static ConfigEntry<float> VBloodFamiliarMultiplier => _vBloodFamiliarMultiplier; public static ConfigEntry<float> UnitUnlockChance => _unitUnlockChance; public static ConfigEntry<float> VBloodUnlockChance => _vBloodUnlockChance; public static ConfigEntry<float> VBloodDamageMultiplier => _vBloodDamageMultiplier; public static ConfigEntry<float> PlayerVampireDamageMultiplier => _playerVampireDamageMultiplier; public static ConfigEntry<bool> SoftSynergies => _softSynergies; public static ConfigEntry<bool> HardSynergies => _hardSynergies; public static ConfigEntry<bool> ClassSpellSchoolOnHitEffects => _classSpellSchoolOnHitEffects; public static ConfigEntry<float> OnHitProcChance => _onHitProcChance; public static ConfigEntry<float> StatSynergyMultiplier => _statSyngergyMultiplier; public static ConfigEntry<string> BloodKnightWeapon => _bloodKnightWeapon; public static ConfigEntry<string> BloodKnightBlood => _bloodKnightBlood; public static ConfigEntry<string> BloodKnightSpells => _bloodKnightSpells; public static ConfigEntry<string> DemonHunterWeapon => _demonHunterWeapon; public static ConfigEntry<string> DemonHunterBlood => _demonHunterBlood; public static ConfigEntry<string> DemonHunterSpells => _demonHunterSpells; public static ConfigEntry<string> VampireLordWeapon => _vampireLordWeapon; public static ConfigEntry<string> VampireLordBlood => _vampireLordBlood; public static ConfigEntry<string> VampireLordSpells => _vampireLordSpells; public static ConfigEntry<string> ShadowBladeWeapon => _shadowBladeWeapon; public static ConfigEntry<string> ShadowBladeBlood => _shadowBladeBlood; public static ConfigEntry<string> ShadowBladeSpells => _shadowBladeSpells; public static ConfigEntry<string> ArcaneSorcererWeapon => _arcaneSorcererWeapon; public static ConfigEntry<string> ArcaneSorcererBlood => _arcaneSorcererBlood; public static ConfigEntry<string> ArcaneSorcererSpells => _arcaneSorcererSpells; public static ConfigEntry<string> DeathMageWeapon => _deathMageWeapon; public static ConfigEntry<string> DeathMageBlood => _deathMageBlood; public static ConfigEntry<string> DeathMageSpells => _deathMageSpells; public override void Load() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown Instance = this; _harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null); InitConfig(); CommandRegistry.RegisterAll(); LoadAllData(); ManualLogSource log = Core.Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(10, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("Bloodcraft"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("["); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("0.9.15"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("] loaded!"); } log.LogInfo(val); } private static void InitConfig() { foreach (string directoryPath in directoryPaths) { CreateDirectories(directoryPath); } _languageLocalization = InitConfigEntry("Config", "LanguageLocalization", "English", "The language localization for prefabs displayed to users. English by default. Options: Brazilian, English, French, German, Hungarian, Italian, Japanese, Koreana, Latam, Polish, Russian, SimplifiedChinese, Spanish, TraditionalChinese, Thai, Turkish, Vietnamese"); _levelingSystem = InitConfigEntry("Config", "LevelingSystem", defaultValue: false, "Enable or disable the leveling system."); _prestigeSystem = InitConfigEntry("Config", "PrestigeSystem", defaultValue: false, "Enable or disable the prestige system."); _prestigeBuffs = InitConfigEntry("Config", "PrestigeBuffs", "1504279833,1966156848,505940050,-692773400,-1971511915,-564979747,1796711064,1486229325,1126020850,1126020850", "The PrefabGUID hashes for general prestige buffs, use 0 to skip otherwise buff applies at the prestige level."); _prestigeLevelsToUnlockClassSpells = InitConfigEntry("Config", "PrestigeLevelsToUnlockClassSpells", "0,1,2,3", "The prestige levels at which class spells are unlocked. This should match the number of spells per class. Can leave at 0 if you want them unlocked from the start."); _bloodKnightBuffs = InitConfigEntry("Config", "BloodKnightBuffs", "1828387635,-714434113,-534491790,-1055766373", "The PrefabGUID hashes for blood knight leveling blood buffs. Granted every MaxLevel/(# of blood buffs), so if max l "); _bloodKnightSpells = InitConfigEntry("Config", "BloodKnightSpells", "-433204738,-1161896955,1957691133,-7407393", "Blood Knight shift spells, granted at levels of prestige."); _demonHunterBuffs = InitConfigEntry("Config", "DemonHunterBuffs", "-154702686,-285745649,-1510965956,-536284884", "The PrefabGUID hashes for demon hunter leveling blood buffs"); _demonHunterSpells = InitConfigEntry("Config", "DemonHunterSpells", "-433204738,1611191665,-328617085,-1161896955", "Demon Hunter shift spells, granted at levels of prestige"); _vampireLordBuffs = InitConfigEntry("Config", "VampireLordBuffs", "-1266262267,-1413561088,1103099361,1558171501", "The PrefabGUID hashes for vampire lord leveling blood buffs"); _vampireLordSpells = InitConfigEntry("Config", "VampireLordSpells", "-433204738,716346677,1450902136,-254080557", "Vampire Lord shift spells, granted at levels of prestige"); _shadowBladeBuffs = InitConfigEntry("Config", "ShadowBladeBuffs", "894725875,997154800,-1576592687,-285745649", "The PrefabGUID hashes for shadow blade leveling blood buffs"); _shadowBladeSpells = InitConfigEntry("Config", "ShadowBladeSpells", "-433204738,94933870,642767950,1922493152", "Shadow Blade shift spells, granted at levels of prestige"); _arcaneSorcererBuffs = InitConfigEntry("Config", "ArcaneSorcererBuffs", "-901503997,884683323,-993492354,-1859298707", "The PrefabGUID hashes for arcane leveling blood buffs"); _arcaneSorcererSpells = InitConfigEntry("Config", "ArcaneSorcererSpells", "-433204738,495259674,1217615468,-1503327574", "Arcane Sorcerer shift spells, granted at levels of prestige"); _deathMageBuffs = InitConfigEntry("Config", "DeathMageBuffs", "1643157297,1159173627,1006510207,997154800", "The PrefabGUID hashes for death mage leveling blood buffs"); _deathMageSpells = InitConfigEntry("Config", "DeathMageSpells", "-433204738,234226418,1619461812,1006960825", "Death Mage shift spells, granted at levels of prestige"); _maxLevelingPrestiges = InitConfigEntry("Config", "MaxLevelingPrestiges", 10, "The maximum number of prestiges a player can reach in leveling."); _levelingPrestigeReducer = InitConfigEntry("Config", "LevelingPrestigeReducer", 0.1f, "Flat factor by which experience is reduced per increment of prestige in leveling."); _prestigeRatesReducer = InitConfigEntry("Config", "PrestigeRatesReducer", 0.1f, "Flat factor by which rates are reduced in expertise/legacy per increment of prestige in expertise/legacy."); _prestigeStatMultiplier = InitConfigEntry("Config", "PrestigeStatMultiplier", 0.1f, "Flat factor by which stats are increased in expertise/legacy bonuses per increment of prestige in expertise/legacy."); _prestigeRatesMultiplier = InitConfigEntry("Config", "PrestigeRateMultiplier", 0.1f, "Flat factor by which rates are increased in expertise/legacy per increment of prestige in leveling."); _maxPlayerLevel = InitConfigEntry("Config", "MaxLevel", 90, "The maximum level a player can reach."); _startingLevel = InitConfigEntry("Config", "StartingLevel", 0, "Starting level for players if no data is found."); _unitLevelingMultiplier = InitConfigEntry("Config", "UnitLevelingMultiplier", 7.5f, "The multiplier for experience gained from units."); _vBloodLevelingMultiplier = InitConfigEntry("Config", "VBloodLevelingMultiplier", 15f, "The multiplier for experience gained from VBloods."); _docileUnitMultiplier = InitConfigEntry("Config", "DocileUnitMultiplier", 0.15f, "The multiplier for experience gained from docile units."); _warEventMultiplier = InitConfigEntry("Config", "WarEventMultiplier", 0.2f, "The multiplier for experience gained from war event trash spawns."); _unitSpawnerMultiplier = InitConfigEntry("Config", "UnitSpawnerMultiplier", 0f, "The multiplier for experience gained from unit spawners (vermin nests, tombs)."); _changeClassItem = InitConfigEntry("Config", "ChangeClassItem", 576389135, "Item PrefabGUID cost for changing class."); _changeClassItemQuantity = InitConfigEntry("Config", "ChangeClassQuantity", 1000, "Quantity of item required for changing class."); _groupLevelingMultiplier = InitConfigEntry("Config", "GroupLevelingMultiplier", 1f, "The multiplier for experience gained from group kills."); _levelScalingMultiplier = InitConfigEntry("Config", "LevelScalingMultiplier", 0.05f, "reduces experience gained from kills with a large level gap between player and unit, increase to make harsher decrease or set to 0 to remove."); _parties = InitConfigEntry("Config", "PlayerParties", defaultValue: false, "Enable or disable the ability to group with players not in your clan for experience sharing."); _preventFriendlyFire = InitConfigEntry("Config", "PreventFriendlyFire", defaultValue: false, "True to prevent damage between players in parties, false to allow. (damage only at the moment)"); _maxPartySize = InitConfigEntry("Config", "MaxPartySize", 5, "The maximum number of players that can share experience in a group."); _expShareDistance = InitConfigEntry("Config", "ExpShareDistance", 25f, "Default is about 5 floor tile lengths."); _expertiseSystem = InitConfigEntry("Config", "ExpertiseSystem", defaultValue: false, "Enable or disable the expertise system."); _maxExpertisePrestiges = InitConfigEntry("Config", "MaxExpertisePrestiges", 10, "The maximum number of prestiges a player can reach in expertise."); _unarmedSlots = InitConfigEntry("Config", "UnarmedSlots", defaultValue: false, "Enable or disable the ability to use extra unarmed spell slots."); _shiftSlots = InitConfigEntry("Config", "ShiftSlot", defaultValue: false, "Enable or disable using class spell on shift."); _maxExpertiseLevel = InitConfigEntry("Config", "MaxExpertiseLevel", 99, "The maximum level a player can reach in weapon expertise."); _unitExpertiseMultiplier = InitConfigEntry("Config", "UnitExpertiseMultiplier", 2f, "The multiplier for expertise gained from units."); _vBloodExpertiseMultiplier = InitConfigEntry("Config", "VBloodExpertiseMultiplier", 5f, "The multiplier for expertise gained from VBloods."); _expertiseStatChoices = InitConfigEntry("Config", "ExpertiseStatChoices", 2, "The maximum number of stat choices a player can pick for a weapon expertise."); _resetExpertiseItem = InitConfigEntry("Config", "ResetExpertiseItem", 576389135, "Item PrefabGUID cost for resetting weapon stats."); _resetExpertiseItemQuantity = InitConfigEntry("Config", "ResetExpertiseItemQuantity", 500, "Quantity of item required for resetting stats."); _maxHealth = InitConfigEntry("Config", "MaxHealth", 250f, "The base cap for maximum health."); _movementSpeed = InitConfigEntry("Config", "MovementSpeed", 0.25f, "The base cap for movement speed."); _primaryAttackSpeed = InitConfigEntry("Config", "PrimaryAttackSpeed", 0.1f, "The base cap for primary attack speed."); _physicalLifeLeech = InitConfigEntry("Config", "PhysicalLifeLeech", 0.1f, "The base cap for physical life leech."); _spellLifeLeech = InitConfigEntry("Config", "SpellLifeLeech", 0.1f, "The base cap for spell life leech."); _primaryLifeLeech = InitConfigEntry("Config", "PrimaryLifeLeech", 0.15f, "The base cap for primary life leech."); _physicalPower = InitConfigEntry("Config", "PhysicalPower", 10f, "The base cap for physical power."); _spellPower = InitConfigEntry("Config", "SpellPower", 10f, "The base cap for spell power."); _physicalCritChance = InitConfigEntry("Config", "PhysicalCritChance", 0.1f, "The base cap for physical critical strike chance."); _physicalCritDamage = InitConfigEntry("Config", "PhysicalCritDamage", 0.5f, "The base cap for physical critical strike damage."); _spellCritChance = InitConfigEntry("Config", "SpellCritChance", 0.1f, "The base cap for spell critical strike chance."); _spellCritDamage = InitConfigEntry("Config", "SpellCritDamage", 0.5f, "The base cap for spell critical strike damage."); _bloodSystem = InitConfigEntry("Config", "BloodSystem", defaultValue: false, "Enable or disable the blood legacy system."); _maxLegacyPrestiges = InitConfigEntry("Config", "MaxLegacyPrestiges", 10, "The maximum number of prestiges a player can reach in blood legacies."); _bloodQualityBonus = InitConfigEntry("Config", "BloodQualityBonus", defaultValue: false, "Enable or disable blood quality bonus system (if using presige, legacy level will be used with _prestigeBloodQuality multiplier below)."); _prestigeBloodQuality = InitConfigEntry("Config", "PrestigeBloodQuality", 5f, "Blood quality bonus per prestige legacy level."); _maxBloodLevel = InitConfigEntry("Config", "MaxBloodLevel", 99, "The maximum level a player can reach in blood legacies."); _unitLegacyMultiplier = InitConfigEntry("Config", "UnitLegacyMultiplier", 1f, "The multiplier for lineage gained from units."); _vBloodLegacyMultipler = InitConfigEntry("Config", "VBloodLegacyMultipler", 5f, "The multiplier for lineage gained from VBloods."); _legacyStatChoices = InitConfigEntry("Config", "LegacyStatChoices", 2, "The maximum number of stat choices a player can pick for a blood legacy."); _resetLegacyItem = InitConfigEntry("Config", "ResetLegacyItem", 576389135, "Item PrefabGUID cost for resetting blood stats."); _resetLegacyItemQuantity = InitConfigEntry("Config", "ResetLegacyItemQuantity", 500, "Quantity of item required for resetting blood stats."); _healingReceived = InitConfigEntry("Config", "HealingReceived", 0.15f, "The base cap for healing received."); _damageReduction = InitConfigEntry("Config", "DamageReduction", 0.05f, "The base cap for damage reduction."); _physicalResistance = InitConfigEntry("Config", "PhysicalResistance", 0.1f, "The base cap for physical resistance."); _spellResistance = InitConfigEntry("Config", "SpellResistance", 0.1f, "The base cap for spell resistance."); _resourceYield = InitConfigEntry("Config", "ResourceYield", 0.25f, "The base cap for resource yield."); _ccReduction = InitConfigEntry("Config", "CCReduction", 0.2f, "The base cap for crowd control reduction."); _spellCooldownRecoveryRate = InitConfigEntry("Config", "SpellCooldownRecoveryRate", 0.1f, "The base cap for spell cooldown recovery rate."); _weaponCooldownRecoveryRate = InitConfigEntry("Config", "WeaponCooldownRecoveryRate", 0.1f, "The base cap for weapon cooldown recovery rate."); _ultimateCooldownRecoveryRate = InitConfigEntry("Config", "UltimateCooldownRecoveryRate", 0.2f, "The base cap for ultimate cooldown recovery rate."); _minionDamage = InitConfigEntry("Config", "MinionDamage", 0.25f, "The base cap for minion damage."); _shieldAbsorb = InitConfigEntry("Config", "ShieldAbsorb", 0.5f, "The base cap for shield absorb."); _bloodEfficiency = InitConfigEntry("Config", "BloodEfficiency", 0.1f, "The base cap for blood efficiency."); _professionSystem = InitConfigEntry("Config", "ProfessionSystem", defaultValue: false, "Enable or disable the profession system."); _maxProfessionLevel = InitConfigEntry("Config", "MaxProfessionLevel", 99, "The maximum level a player can reach in professions."); _professionMultiplier = InitConfigEntry("Config", "ProfessionMultiplier", 10f, "The multiplier for profession experience gained."); _familiarSystem = InitConfigEntry("Config", "FamiliarSystem", defaultValue: false, "Enable or disable the familiar system."); _familiarCombat = InitConfigEntry("Config", "FamiliarCombat", defaultValue: true, "Enable or disable combat for familiars."); _maxFamiliarLevel = InitConfigEntry("Config", "MaxFamiliarLevel", 90, "The maximum level a familiar can reach."); _allowVBloods = InitConfigEntry("Config", "AllowVBloods", defaultValue: false, "Allow VBloods to be unlocked as familiars (this includes shardbearers, if you want those excluded use the bannedUnits list)."); _bannedUnits = InitConfigEntry("Config", "BannedUnits", "", "The PrefabGUID hashes for units that cannot be used as familiars. Same structure as the buff lists except unit prefabs."); _bannedTypes = InitConfigEntry("Config", "BannedTypes", "", "The types of units that cannot be used as familiars go here. (Human, Undead, Demon, Mechanical, Beast)"); _vBloodDamageMultiplier = InitConfigEntry("Config", "VBloodDamageMultiplier", 1f, "Leave at 1 for no change (controls damage familiars do to VBloods)."); _playerVampireDamageMultiplier = InitConfigEntry("Config", "PlayerVampireDamageMultiplier", 1f, "Leave at 1 for no change (controls damage familiars do to players. probably)."); _unitFamiliarMultiplier = InitConfigEntry("Config", "UnitFamiliarMultiplier", 5f, "The multiplier for experience gained from units."); _vBloodFamiliarMultiplier = InitConfigEntry("Config", "VBloodFamiliarMultiplier", 15f, "The multiplier for experience gained from VBloods."); _unitUnlockChance = InitConfigEntry("Config", "UnitUnlockChance", 0.05f, "The chance for a unit to unlock a familiar."); _vBloodUnlockChance = InitConfigEntry("Config", "VBloodUnlockChance", 0.01f, "The chance for a VBlood to unlock a familiar."); _softSynergies = InitConfigEntry("Config", "SoftSynergies", defaultValue: false, "Allow class synergies (turns on classes and does not restrict stat choices, do not use this and hard syergies at the same time)."); _hardSynergies = InitConfigEntry("Config", "HardSynergies", defaultValue: false, "Enforce class synergies (turns on classes and restricts stat choices, do not use this and soft syergies at the same time)."); _classSpellSchoolOnHitEffects = InitConfigEntry("Config", "ClassSpellSchoolOnHitEffects", defaultValue: false, "Enable or disable class spell school on hit effects."); _onHitProcChance = InitConfigEntry("Config", "OnHitProcChance", 0.1f, "The chance for a class effect to proc on hit."); _statSyngergyMultiplier = InitConfigEntry("Config", "StatSynergyMultiplier", 1.5f, "Multiplier for class stat synergies to base stat cap."); _bloodKnightWeapon = InitConfigEntry("Config", "BloodKnightWeapon", "0,3,5,6", "Blood Knight weapon synergies."); _bloodKnightBlood = InitConfigEntry("Config", "BloodKnightBlood", "0,2,3,11", "Blood Knight blood synergies."); _demonHunterWeapon = InitConfigEntry("Config", "DemonHunterWeapon", "1,2,8,9", "Demon Hunter weapon synergies."); _demonHunterBlood = InitConfigEntry("Config", "DemonHunterBlood", "2,5,7,9", "Demon Hunter blood synergies."); _vampireLordWeapon = InitConfigEntry("Config", "VampireLordWeapon", "0,5,6,7", "Vampire Lord weapon synergies."); _vampireLordBlood = InitConfigEntry("Config", "VampireLordBlood", "1,4,8,11", "Vampire Lord blood synergies."); _shadowBladeWeapon = InitConfigEntry("Config", "ShadowBladeWeapon", "1,2,3,4", "Shadow Blade weapon synergies."); _shadowBladeBlood = InitConfigEntry("Config", "ShadowBladeBlood", "3,7,8,10", "Shadow Blade blood synergies."); _arcaneSorcererWeapon = InitConfigEntry("Config", "ArcaneSorcererWeapon", "4,7,10,11", "Arcane Sorcerer weapon synergies."); _arcaneSorcererBlood = InitConfigEntry("Config", "ArcaneSorcererBlood", "0,6,8,10", "Arcane Sorcerer blood synergies."); _deathMageWeapon = InitConfigEntry("Config", "DeathMageWeapon", "0,3,4,7", "Death Mage weapon synergies."); _deathMageBlood = InitConfigEntry("Config", "DeathMageBlood", "2,6,9,10", "Death Mage blood synergies."); } private static ConfigEntry<T> InitConfigEntry<T>(string section, string key, T defaultValue, string description) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown ConfigEntry<T> val = ((BasePlugin)Instance).Config.Bind<T>(section, key, defaultValue, description); string text = Path.Combine(Paths.ConfigPath, "io.zfolmt.Bloodcraft.cfg"); if (File.Exists(text)) { ConfigFile val2 = new ConfigFile(text, true); ConfigEntry<T> val3 = default(ConfigEntry<T>); if (val2.TryGetEntry<T>(section, key, ref val3)) { val.Value = val3.Value; } } return val; } private static void CreateDirectories(string path) { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } } public override bool Unload() { ((BasePlugin)this).Config.Clear(); _harmony.UnpatchSelf(); return true; } private static void LoadAllData() { Core.DataStructures.LoadPlayerBools(); if (Parties.Value) { Core.DataStructures.LoadPlayerParties(); } if (SoftSynergies.Value || HardSynergies.Value) { Core.DataStructures.LoadPlayerClasses(); } if (LevelingSystem.Value) { Action[] array = loadLeveling; foreach (Action action in array) { action(); } } if (ExpertiseSystem.Value) { Action[] array2 = loadExpertises; foreach (Action action2 in array2) { action2(); } Action[] array3 = loadSanguimancy; foreach (Action action3 in array3) { action3(); } } if (BloodSystem.Value) { Action[] array4 = loadLegacies; foreach (Action action4 in array4) { action4(); } } if (ProfessionSystem.Value) { Action[] array5 = loadProfessions; foreach (Action action5 in array5) { action5(); } } if (FamiliarSystem.Value) { Action[] array6 = loadFamiliars; foreach (Action action6 in array6) { action6(); } } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "io.zfolmt.Bloodcraft"; public const string PLUGIN_NAME = "Bloodcraft"; public const string PLUGIN_VERSION = "0.9.15"; } } namespace Bloodcraft.Systems.Professions { public interface IProfessionHandler { void AddExperience(ulong steamID, float experience); void SaveChanges(); KeyValuePair<int, float> GetExperienceData(ulong steamID); void UpdateExperienceData(ulong steamID, KeyValuePair<int, float> xpData); string GetProfessionName(); } public static class ProfessionHandlerFactory { private static readonly List<BaseProfessionHandler> professionHandlers = new List<BaseProfessionHandler>(8) { new WoodcuttingHandler(), new MiningHandler(), new BlacksmithingHandler(), new TailoringHandler(), new FishingHandler(), new AlchemyHandler(), new HarvestingHandler(), new EnchantingHandler() }; public static IProfessionHandler GetProfessionHandler(PrefabGUID PrefabGUID, string context = "") { //IL_0000: Unknown result type (might be due to invalid IL or missing references) string text = PrefabGUID.LookupName().ToLower(); switch (context) { case "woodcutting": return new WoodcuttingHandler(); case "mining": return new MiningHandler(); case "blacksmithing": return new BlacksmithingHandler(); case "tailoring": return new TailoringHandler(); case "fishing": return new FishingHandler(); case "alchemy": return new AlchemyHandler(); case "harvesting": return new HarvestingHandler(); case "enchanting": return new EnchantingHandler(); default: if (text.Contains("wood")) { return new WoodcuttingHandler(); } if (text.Contains("gem") || text.Contains("jewel") || text.Contains("magicsource")) { return new EnchantingHandler(); } if (text.Contains("mineral") || text.Contains("stone") || text.Contains("bloodcrystal")) { return new MiningHandler(); } if (text.Contains("weapon")) { return new BlacksmithingHandler(); } if (text.Contains("armor") || text.Contains("cloak") || text.Contains("bag") || text.Contains("cloth") || text.Contains("chest") || text.Contains("boots") || text.Contains("gloves") || text.Contains("legs")) { return new TailoringHandler(); } if (text.Contains("fish")) { return new FishingHandler(); } if (text.Contains("canteen") || text.Contains("potion") || text.Contains("bottle") || text.Contains("flask") || text.Contains("consumable")) { return new AlchemyHandler(); } if (text.Contains("plant")) { return new HarvestingHandler(); } return null; } } public static string GetAllProfessions() { return string.Join(", ", professionHandlers.Select((BaseProfessionHandler ph) => ph.GetProfessionName())); } } public abstract class BaseProfessionHandler : IProfessionHandler { protected abstract IDictionary<ulong, KeyValuePair<int, float>> DataStructure { get; } public virtual void AddExperience(ulong steamID, float experience) { if (DataStructure.TryGetValue(steamID, out var value)) { DataStructure[steamID] = new KeyValuePair<int, float>(value.Key, value.Value + experience); } else { DataStructure.Add(steamID, new KeyValuePair<int, float>(0, experience)); } } public KeyValuePair<int, float> GetExperienceData(ulong steamID) { return DataStructure[steamID]; } public void UpdateExperienceData(ulong steamID, KeyValuePair<int, float> xpData) { DataStructure[steamID] = xpData; } public abstract void SaveChanges(); public abstract string GetProfessionName(); } public class EnchantingHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerEnchanting; public override void SaveChanges() { Core.DataStructures.SavePlayerEnchanting(); } public override string GetProfessionName() { return "<color=#7E22CE>Enchanting</color>"; } } public class AlchemyHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerAlchemy; public override void SaveChanges() { Core.DataStructures.SavePlayerAlchemy(); } public override string GetProfessionName() { return "<color=#12D4A2>Alchemy</color>"; } } public class HarvestingHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerHarvesting; public override void SaveChanges() { Core.DataStructures.SavePlayerHarvesting(); } public override string GetProfessionName() { return "<color=#008000>Harvesting</color>"; } } public class BlacksmithingHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerBlacksmithing; public override void SaveChanges() { Core.DataStructures.SavePlayerBlacksmithing(); } public override string GetProfessionName() { return "<color=#353641>Blacksmithing</color>"; } } public class TailoringHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerTailoring; public override void SaveChanges() { Core.DataStructures.SavePlayerTailoring(); } public override string GetProfessionName() { return "<color=#F9DEBD>Tailoring</color>"; } } public class WoodcuttingHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerWoodcutting; public override void SaveChanges() { Core.DataStructures.SavePlayerWoodcutting(); } public override string GetProfessionName() { return "<color=#A52A2A>Woodcutting</color>"; } } public class MiningHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerMining; public override void SaveChanges() { Core.DataStructures.SavePlayerMining(); } public override string GetProfessionName() { return "<color=#808080>Mining</color>"; } } public class FishingHandler : BaseProfessionHandler { protected override IDictionary<ulong, KeyValuePair<int, float>> DataStructure => Core.DataStructures.PlayerFishing; public override void SaveChanges() { Core.DataStructures.SavePlayerFishing(); } public override string GetProfessionName() { return "<color=#00FFFF>Fishing</color>"; } } internal static class ProfessionSystem { private static readonly float ProfessionMultiplier = Plugin.ProfessionMultiplier.Value; private static readonly float ProfessionConstant = 0.1f; private static readonly int ProfessionPower = 2; private static readonly int MaxProfessionLevel = Plugin.MaxProfessionLevel.Value; public static void UpdateProfessions(Entity Killer, Entity Victim) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references