using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("CarlosMMOLoaderNOVO")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CarlosMMOLoaderNOVO")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b0ef6b20-a606-4eab-b35c-ee55fba79023")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] [BepInPlugin("carlos.mmo.loader", "Carlos MMO Loader", "4.9.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class CarlosMMOLoader : BaseUnityPlugin { [HarmonyPatch(typeof(CharacterDrop), "GenerateDropList")] public static class BossDropPatch { private static void Postfix(CharacterDrop __instance, ref List> __result) { if ((Object)(object)__instance == (Object)null || (Object)(object)((Component)__instance).gameObject == (Object)null) { return; } string name = ((Object)((Component)__instance).gameObject).name; foreach (KeyValuePair bossDrop in BossDrops) { if (name.Contains(bossDrop.Key)) { GameObject prefab = ZNetScene.instance.GetPrefab(bossDrop.Value); if ((Object)(object)prefab != (Object)null) { __result.Add(new KeyValuePair(prefab, 1)); Debug.Log((object)("CARLOS MMO: BOSS DROP -> " + bossDrop.Value)); } } } } } private bool registered; private Harmony harmony; public static float GlideFallSpeed = -2f; public static float JumpBoostForce = 4f; public static float DashForce = 8f; public static float DashCooldown = 2f; public static float LastDashTime = -999f; public static Dictionary BossDrops = new Dictionary { { "Eikthyr", "CarlosBossEikthyrSpear" }, { "gd_king", "CarlosBossElderChest" }, { "Bonemass", "CarlosBossBonemassMace" }, { "Dragon", "CarlosBossModerBow" }, { "GoblinKing", "CarlosBossYagluthSword" }, { "SeekerQueen", "CarlosBossQueenChest" } }; private void Awake() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown PrefabManager.OnVanillaPrefabsAvailable += RegisterAll; harmony = new Harmony("carlos.mmo.skills"); harmony.PatchAll(); Debug.Log((object)"CARLOS MMO: Loader 4.9.1 iniciado"); } private void OnDestroy() { PrefabManager.OnVanillaPrefabsAvailable -= RegisterAll; if (harmony != null) { harmony.UnpatchSelf(); } } private void RegisterAll() { if (!registered) { registered = true; PrefabManager.OnVanillaPrefabsAvailable -= RegisterAll; RegisterEsmeralda(); RegisterEsmeraldaWeapons(); RegisterGuardian(); RegisterGuardianWeapons(); RegisterHunter(); RegisterHunterWeapons(); RegisterBerserker(); RegisterBerserkerWeapons(); RegisterPaladin(); RegisterAbyssal(); RegisterBossRelicGear(); Debug.Log((object)"CARLOS MMO: TODOS SETS, ARMAS E BOSSES REGISTRADOS"); } } private void RegisterBossRelicGear() { RegisterBossEikthyrSpear(); RegisterBossElderChest(); RegisterBossBonemassMace(); RegisterBossModerBow(); RegisterBossYagluthSword(); RegisterBossQueenChest(); } private void RegisterBossEikthyrSpear() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("SpearFlint", "SpearBronze", "AtgeirBronze"); if (string.IsNullOrEmpty(text)) { return; } try { ItemConfig val = new ItemConfig { Name = "Lança Tempestuosa", Description = "Relíquia de Eikthyr, veloz e carregada de energia tempestuosa.", CraftingStation = CraftingStations.Forge, MinStationLevel = 1 }; CustomItem val2 = new CustomItem("CarlosBossEikthyrSpear", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Lança Tempestuosa"; shared.m_description = "Relíquia de Eikthyr, veloz e carregada de energia tempestuosa."; shared.m_weight = 1.8f; shared.m_value = 1600; shared.m_maxDurability = 2100f; shared.m_durabilityPerLevel = 120f; shared.m_maxQuality = 4; shared.m_damages.m_pierce = 96f; shared.m_damages.m_spirit = 16f; shared.m_attackForce = 58f; shared.m_backstabBonus = 3f; TintBossStorm(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.78f, 0.92f, 1f, 1f), 0.4f, 1.08f); ItemManager.Instance.AddItem(val2); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Lança Tempestuosa -> " + ex)); } } private void RegisterBossElderChest() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("ArmorRootChest", "ArmorBronzeChest", "ArmorIronChest"); if (string.IsNullOrEmpty(text)) { return; } try { ItemConfig val = new ItemConfig { Name = "Peitoral Ancestral", Description = "Relíquia do Elder, tomada por madeira viva e poder ancestral.", CraftingStation = CraftingStations.Forge, MinStationLevel = 1 }; CustomItem val2 = new CustomItem("CarlosBossElderChest", text, val); ApplySharedStats(val2, "Peitoral Ancestral", "Relíquia do Elder, tomada por madeira viva e poder ancestral.", 66f, 9.5f, 1750); TintBossElder(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.28f, 0.44f, 0.18f, 1f), 0.38f, 0.98f); ItemManager.Instance.AddItem(val2); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Peitoral Ancestral -> " + ex)); } } private void RegisterBossBonemassMace() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("MaceIron", "MaceBronze", "Hammer"); if (string.IsNullOrEmpty(text)) { return; } try { ItemConfig val = new ItemConfig { Name = "Maça Putrificada", Description = "Relíquia de Bonemass, pesada, tóxica e brutal.", CraftingStation = CraftingStations.Forge, MinStationLevel = 1 }; CustomItem val2 = new CustomItem("CarlosBossBonemassMace", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Maça Putrificada"; shared.m_description = "Relíquia de Bonemass, pesada, tóxica e brutal."; shared.m_weight = 2.6f; shared.m_value = 1800; shared.m_maxDurability = 2300f; shared.m_durabilityPerLevel = 125f; shared.m_maxQuality = 4; shared.m_damages.m_blunt = 108f; shared.m_damages.m_poison = 26f; shared.m_attackForce = 82f; shared.m_backstabBonus = 2f; TintBossPoison(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.22f, 0.48f, 0.16f, 1f), 0.4f, 0.98f); ItemManager.Instance.AddItem(val2); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Maça Putrificada -> " + ex)); } } private void RegisterBossModerBow() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0164: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("BowDraugrFang", "BowHuntsman", "BowFineWood"); if (string.IsNullOrEmpty(text)) { return; } try { ItemConfig val = new ItemConfig { Name = "Arco Glacial", Description = "Relíquia de Moder, frio letal e precisão congelante.", CraftingStation = CraftingStations.Forge, MinStationLevel = 1 }; CustomItem val2 = new CustomItem("CarlosBossModerBow", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Arco Glacial"; shared.m_description = "Relíquia de Moder, frio letal e precisão congelante."; shared.m_weight = 1.9f; shared.m_value = 2000; shared.m_maxDurability = 2400f; shared.m_durabilityPerLevel = 130f; shared.m_maxQuality = 4; shared.m_attackForce = 118f; shared.m_backstabBonus = 3.5f; shared.m_useDurability = true; shared.m_damages.m_pierce = 126f; shared.m_damages.m_frost = 30f; shared.m_attack.m_attackStamina = 7f; shared.m_attack.m_projectileVel = 95f; TintBossFrost(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.72f, 0.9f, 1f, 1f), 0.42f, 1.08f); ItemManager.Instance.AddItem(val2); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Arco Glacial -> " + ex)); } } private void RegisterBossYagluthSword() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("SwordBlackmetal", "SwordIron", "SwordBronze"); if (string.IsNullOrEmpty(text)) { return; } try { ItemConfig val = new ItemConfig { Name = "Espada Infernal", Description = "Relíquia de Yagluth, queimando com poder destrutivo.", CraftingStation = CraftingStations.Forge, MinStationLevel = 1 }; CustomItem val2 = new CustomItem("CarlosBossYagluthSword", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Espada Infernal"; shared.m_description = "Relíquia de Yagluth, queimando com poder destrutivo."; shared.m_weight = 2.2f; shared.m_value = 2200; shared.m_maxDurability = 2400f; shared.m_durabilityPerLevel = 130f; shared.m_maxQuality = 4; shared.m_damages.m_slash = 118f; shared.m_damages.m_fire = 34f; shared.m_attackForce = 78f; shared.m_backstabBonus = 2.8f; TintBossFire(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.74f, 0.18f, 0.1f, 1f), 0.42f, 1.04f); ItemManager.Instance.AddItem(val2); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Espada Infernal -> " + ex)); } } private void RegisterBossQueenChest() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("ArmorCarapaceChest", "ArmorWolfChest", "ArmorIronChest"); if (string.IsNullOrEmpty(text)) { return; } try { ItemConfig val = new ItemConfig { Name = "Peitoral Abissal", Description = "Relíquia final da Rainha, densa, sombria e refinada.", CraftingStation = CraftingStations.BlackForge, MinStationLevel = 1 }; CustomItem val2 = new CustomItem("CarlosBossQueenChest", text, val); ApplySharedStats(val2, "Peitoral Abissal", "Relíquia final da Rainha, densa, sombria e refinada.", 82f, 10.5f, 2600); TintBossQueen(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.24f, 0.14f, 0.32f, 1f), 0.4f, 0.96f); ItemManager.Instance.AddItem(val2); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Peitoral Abissal -> " + ex)); } } private void RegisterEsmeralda() { string baseItem = FirstExistingPrefab("ArmorRootChest", "ArmorBronzeChest", "ArmorIronChest"); string baseItem2 = FirstExistingPrefab("ArmorRootLegs", "ArmorTrollLeatherLegs", "ArmorIronLegs"); string baseItem3 = FirstExistingPrefab("HelmetMage", "HelmetFenring", "HelmetTrollLeather", "HelmetBronze"); AddDarkArmor("CarlosDarkChest", baseItem, "Peitoral Esmeralda Sombria", "Peitoral sombrio reforçado com energia esmeralda lapidada.", 38f, 9f, 520, 12, 8); AddDarkArmor("CarlosDarkLegs", baseItem2, "Grevas Esmeralda Sombria", "Grevas escuras para um guerreiro veloz e letal.", 32f, 8f, 470, 10, 6); AddDarkArmor("CarlosDarkHood", baseItem3, "Capuz Esmeralda Sombria", "Capuz sombrio de energia viva, no estilo Embla/Ocultista.", 20f, 3f, 420, 4, 8, 2); AddEsmeraldaCape("CarlosDarkCape", "CapeFeather", "Capa Esmeralda Sombria", "Capa roxa sombria com energia viva de uma esmeralda amaldiçoada.", 18f, 3.5f, 520, 12, 8, 4); } private void RegisterEsmeraldaWeapons() { RegisterEsmeraldaSword(); RegisterEsmeraldaStaff(); } private void RegisterEsmeraldaSword() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("SwordIron", "SwordBronze", "AxeIron"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para espada Esmeralda."); return; } try { ItemConfig val = new ItemConfig { Name = "Espada Esmeralda Sombria", Description = "Uma lâmina amaldiçoada envolta em energia verde sombria.", CraftingStation = CraftingStations.Forge, MinStationLevel = 2 }; val.AddRequirement("Iron", 16, 0); val.AddRequirement("WitheredBone", 6, 0); val.AddRequirement("DeerHide", 4, 0); val.AddRequirement("Guck", 4, 0); CustomItem val2 = new CustomItem("CarlosDarkSword", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Espada Esmeralda Sombria"; shared.m_description = "Uma lâmina amaldiçoada envolta em energia verde sombria."; shared.m_weight = 2f; shared.m_value = 900; shared.m_maxDurability = 1800f; shared.m_durabilityPerLevel = 95f; shared.m_maxQuality = 4; shared.m_damages.m_slash = 82f; shared.m_damages.m_spirit = 12f; shared.m_attackForce = 55f; shared.m_backstabBonus = 2.5f; TintDark(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.08f, 0.48f, 0.28f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Espada Esmeralda registrada com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar espada Esmeralda -> " + ex)); } } private void RegisterEsmeraldaStaff() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("StaffFireball", "StaffGreenRoots", "StaffShield"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para cajado Esmeralda."); return; } try { ItemConfig val = new ItemConfig { Name = "Cajado Esmeralda Sombria", Description = "Um cajado insano de fogo esmeralda, pulsando energia lapidada e devastadora.", CraftingStation = CraftingStations.Forge, MinStationLevel = 2 }; val.AddRequirement("Iron", 18, 0); val.AddRequirement("RoundLog", 12, 0); val.AddRequirement("Guck", 8, 0); val.AddRequirement("WitheredBone", 6, 0); CustomItem val2 = new CustomItem("CarlosDarkStaff", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Cajado Esmeralda Sombria"; shared.m_description = "Um cajado insano de fogo esmeralda, pulsando energia lapidada e devastadora."; shared.m_weight = 2.2f; shared.m_value = 1450; shared.m_maxDurability = 2200f; shared.m_durabilityPerLevel = 110f; shared.m_maxQuality = 4; shared.m_damages.m_fire = 68f; shared.m_damages.m_spirit = 32f; shared.m_damages.m_blunt = 22f; shared.m_attackForce = 70f; shared.m_backstabBonus = 1.2f; shared.m_attack.m_attackEitr = 0f; shared.m_secondaryAttack.m_attackEitr = 0f; TintDark(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.1f, 0.54f, 0.3f, 1f), 0.36f, 0.93f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Cajado Esmeralda registrado com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar cajado Esmeralda -> " + ex)); } } private void RegisterGuardian() { string baseItem = FirstExistingPrefab("HelmetDrake", "HelmetPadded", "HelmetIron"); string baseItem2 = FirstExistingPrefab("ArmorPaddedCuirass", "ArmorCarapaceChest", "ArmorWolfChest", "ArmorIronChest"); string baseItem3 = FirstExistingPrefab("ArmorWolfLegs", "ArmorPaddedGreaves", "ArmorIronLegs"); AddGuardianArmor("CarlosGuardianHelmet", baseItem, "Elmo do Guardião Perolado", "Elmo branco com brilho sagrado.", 32f, 5f, 700, 10, 6, 2); AddGuardianArmor("CarlosGuardianChest", baseItem2, "Peitoral do Guardião Perolado", "Peitoral lendário de proteção máxima.", 56f, 10f, 980, 18, 10, 6); AddGuardianArmor("CarlosGuardianLegs", baseItem3, "Grevas do Guardião Perolado", "Grevas resistentes e refinadas.", 50f, 9f, 900, 14, 8, 5); AddGuardianCape("CarlosGuardianCape", "CapeLox", "Capa do Guardião Perolado", "Capa branca com aura protetora.", 20f, 4f, 760, 8, 6, 6); } private void RegisterGuardianWeapons() { RegisterGuardianBow(); RegisterGuardianTwinDaggers(); } private void RegisterGuardianBow() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("BowDraugrFang", "BowHuntsman", "BowFineWood"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para arco do Guardião."); return; } try { ItemConfig val = new ItemConfig { Name = "Arco do Guardião Perolado", Description = "Um arco sagrado branco, preciso e poderoso.", CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; val.AddRequirement("Silver", 18, 0); val.AddRequirement("Iron", 10, 0); val.AddRequirement("LoxPelt", 4, 0); val.AddRequirement("Crystal", 4, 0); val.AddRequirement("Feathers", 16, 0); CustomItem val2 = new CustomItem("CarlosGuardianBow", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Arco do Guardião Perolado"; shared.m_description = "Um arco sagrado branco, preciso e poderoso."; shared.m_weight = 1.8f; shared.m_value = 1350; shared.m_maxDurability = 2200f; shared.m_durabilityPerLevel = 110f; shared.m_maxQuality = 4; shared.m_attackForce = 82f; shared.m_backstabBonus = 2.5f; shared.m_useDurability = true; shared.m_damages.m_pierce = 108f; shared.m_damages.m_spirit = 24f; shared.m_attack.m_attackStamina = 7f; shared.m_attack.m_projectileVel = 88f; TintGuardian(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.96f, 0.94f, 0.76f, 1f), 0.38f, 1.1f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Arco do Guardião registrado com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar arco do Guardião -> " + ex)); } } private void RegisterGuardianTwinDaggers() { RegisterGuardianDaggerSun(); RegisterGuardianDaggerMoon(); } private void RegisterGuardianDaggerSun() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("KnifeBlackMetal", "KnifeChitin"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para Adaga Solar do Guardião."); return; } try { ItemConfig val = new ItemConfig { Name = "Adaga Solar do Guardião", Description = "Uma adaga sagrada veloz, feita para golpes limpos e luminosos.", CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; val.AddRequirement("Silver", 10, 0); val.AddRequirement("Crystal", 4, 0); val.AddRequirement("LoxPelt", 2, 0); CustomItem val2 = new CustomItem("CarlosGuardianDaggerSun", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Adaga Solar do Guardião"; shared.m_description = "Uma adaga sagrada veloz, feita para golpes limpos e luminosos."; shared.m_weight = 0.8f; shared.m_value = 950; shared.m_maxDurability = 1700f; shared.m_durabilityPerLevel = 95f; shared.m_maxQuality = 4; shared.m_damages.m_pierce = 76f; shared.m_damages.m_spirit = 14f; shared.m_backstabBonus = 4f; shared.m_attackForce = 42f; TintGuardian(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(1f, 0.88f, 0.45f, 1f), 0.42f, 1.08f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Adaga Solar do Guardião registrada com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Adaga Solar do Guardião -> " + ex)); } } private void RegisterGuardianDaggerMoon() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("KnifeChitin", "KnifeBlackMetal"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para Adaga Lunar do Guardião."); return; } try { ItemConfig val = new ItemConfig { Name = "Adaga Lunar do Guardião", Description = "Uma adaga sagrada gêmea, rápida e elegante.", CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; val.AddRequirement("Silver", 10, 0); val.AddRequirement("Crystal", 4, 0); val.AddRequirement("LoxPelt", 2, 0); CustomItem val2 = new CustomItem("CarlosGuardianDaggerMoon", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Adaga Lunar do Guardião"; shared.m_description = "Uma adaga sagrada gêmea, rápida e elegante."; shared.m_weight = 0.8f; shared.m_value = 950; shared.m_maxDurability = 1700f; shared.m_durabilityPerLevel = 95f; shared.m_maxQuality = 4; shared.m_damages.m_pierce = 76f; shared.m_damages.m_spirit = 14f; shared.m_backstabBonus = 4f; shared.m_attackForce = 42f; TintGuardian(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.86f, 0.92f, 1f, 1f), 0.42f, 1.08f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Adaga Lunar do Guardião registrada com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar Adaga Lunar do Guardião -> " + ex)); } } private void RegisterHunter() { string baseItem = FirstExistingPrefab("HelmetFenring", "HelmetTrollLeather", "HelmetLeather"); string baseItem2 = FirstExistingPrefab("ArmorFenringChest", "ArmorTrollLeatherChest", "ArmorLeatherChest"); string baseItem3 = FirstExistingPrefab("ArmorFenringLegs", "ArmorTrollLeatherLegs", "ArmorLeatherLegs"); AddHunterArmor("CarlosHunterHood", baseItem, "Capuz do Caçador Fantasma", "Capuz frio e sombrio de um rastreador invisível.", 30f, 2.5f, 820, 8, 10, 0, 8, 6, 4); AddHunterArmor("CarlosHunterChest", baseItem2, "Peitoral do Caçador Fantasma", "Peitoral furtivo para ataques rápidos e precisos.", 52f, 5.5f, 1180, 14, 18, 10, 0, 8, 6); AddHunterArmor("CarlosHunterLegs", baseItem3, "Grevas do Caçador Fantasma", "Grevas ágeis e selvagens, feitas para mover-se como uma sombra.", 46f, 4.5f, 1080, 10, 10, 8, 4, 6, 4); AddHunterCape("CarlosHunterCape", "CapeFeather", "Manto do Caçador Fantasma", "Manto escuro de penas frias, feito para sumir na névoa.", 22f, 2.5f, 980, 8, 8, 18, 6, 4); } private void RegisterHunterWeapons() { RegisterHunterBow(); RegisterHunterDagger(); } private void RegisterHunterBow() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_01ba: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("BowDraugrFang", "BowHuntsman", "BowFineWood"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para arco do Caçador."); return; } try { ItemConfig val = new ItemConfig { Name = "Arco do Caçador Fantasma", Description = "Um arco silencioso, amaldiçoado e mortal, feito para atravessar carne e alma.", CraftingStation = CraftingStations.Workbench, MinStationLevel = 4 }; val.AddRequirement("TrollHide", 14, 0); val.AddRequirement("FineWood", 30, 0); val.AddRequirement("Feathers", 30, 0); val.AddRequirement("Obsidian", 16, 0); val.AddRequirement("Silver", 8, 0); CustomItem val2 = new CustomItem("CarlosHunterBow", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Arco do Caçador Fantasma"; shared.m_description = "Um arco silencioso, amaldiçoado e mortal, feito para atravessar carne e alma."; shared.m_weight = 1.4f; shared.m_value = 1750; shared.m_maxDurability = 2400f; shared.m_durabilityPerLevel = 120f; shared.m_maxQuality = 4; shared.m_attackForce = 95f; shared.m_backstabBonus = 4f; shared.m_useDurability = true; shared.m_damages.m_pierce = 138f; shared.m_damages.m_spirit = 32f; shared.m_attack.m_attackStamina = 5f; shared.m_attack.m_projectileVel = 105f; TintHunter(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.14f, 0.22f, 0.42f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Arco do Caçador Fantasma FINAL registrado com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar arco do Caçador Fantasma -> " + ex)); } } private void RegisterHunterDagger() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("KnifeBlackMetal", "KnifeChitin"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida para adaga do Caçador."); return; } try { ItemConfig val = new ItemConfig { Name = "Adaga do Caçador Fantasma", Description = "Silenciosa, rápida e devastadora pelas costas.", CraftingStation = CraftingStations.Workbench, MinStationLevel = 4 }; val.AddRequirement("TrollHide", 10, 0); val.AddRequirement("Obsidian", 16, 0); val.AddRequirement("Chitin", 10, 0); val.AddRequirement("Silver", 6, 0); CustomItem val2 = new CustomItem("CarlosHunterDagger", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Adaga do Caçador Fantasma"; shared.m_description = "Silenciosa, rápida e devastadora pelas costas."; shared.m_weight = 0.7f; shared.m_value = 1450; shared.m_maxDurability = 1900f; shared.m_durabilityPerLevel = 110f; shared.m_maxQuality = 4; shared.m_damages.m_pierce = 102f; shared.m_backstabBonus = 7f; shared.m_attackForce = 55f; TintHunter(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.12f, 0.2f, 0.4f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: Adaga do Caçador Fantasma FINAL registrada com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar adaga do Caçador Fantasma -> " + ex)); } } private void RegisterBerserker() { string baseItem = FirstExistingPrefab("HelmetIron", "HelmetPadded", "HelmetBronze"); string baseItem2 = FirstExistingPrefab("ArmorCarapaceChest", "ArmorFenringChest", "ArmorIronChest", "ArmorBronzeChest"); string baseItem3 = FirstExistingPrefab("ArmorCarapaceLegs", "ArmorFenringLegs", "ArmorWolfLegs", "ArmorIronLegs"); AddBerserkerArmor("CarlosBerserkerHelmet", baseItem, "Elmo do Berserker Ferro Negro", "Elmo brutal forjado para guerreiros dominados pela fúria.", 34f, 6f, 720, 12, 2, 1); AddBerserkerArmor("CarlosBerserkerChest", baseItem2, "Peitoral do Berserker Ferro Negro", "Peitoral pesado marcado por guerra, sangue e fúria.", 58f, 11f, 860, 20, 4, 2); AddBerserkerArmor("CarlosBerserkerLegs", baseItem3, "Grevas do Berserker Ferro Negro", "Grevas selvagens de um lutador que vive para esmagar.", 40f, 7f, 760, 10, 4, 1, 2); AddBerserkerCape("CarlosBerserkerCape", "CapeWolf", "Capa do Berserker Ferro Negro", "Capa feroz, escura e marcada por uma aura vermelha de massacre.", 18f, 4f, 700, 8, 4, 1); } private void RegisterBerserkerWeapons() { RegisterBerserkerAxeSafe(); RegisterBerserkerBowSafe(); } private void RegisterBerserkerAxeSafe() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("Battleaxe", "AxeBlackMetal", "SwordBlackmetal", "AtgeirBlackmetal"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida encontrada para a arma melee do Berserker."); return; } try { ItemConfig val = new ItemConfig { Name = "Machado do Berserker Ferro Negro", Description = "Uma arma brutal usada por guerreiros em fúria.", CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; val.AddRequirement("BlackMetal", 20, 0); val.AddRequirement("WolfPelt", 5, 0); val.AddRequirement("Chain", 2, 0); CustomItem val2 = new CustomItem("CarlosBerserkerAxe", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Machado do Berserker Ferro Negro"; shared.m_description = "Uma arma brutal usada por guerreiros em fúria."; shared.m_weight = 2.5f; shared.m_value = 900; shared.m_maxDurability = 1800f; shared.m_durabilityPerLevel = 100f; shared.m_maxQuality = 4; shared.m_damages.m_slash = 95f; shared.m_attackForce = 80f; shared.m_backstabBonus = 2f; TintBerserker(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.4f, 0.08f, 0.08f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: arma melee Berserker registrada com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar arma melee Berserker -> " + ex)); } } private void RegisterBerserkerBowSafe() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) string text = FirstExistingPrefab("BowDraugrFang", "BowHuntsman", "BowFineWood"); if (string.IsNullOrEmpty(text)) { Debug.LogWarning((object)"CARLOS MMO: nenhuma base válida encontrada para o arco Berserker."); return; } try { ItemConfig val = new ItemConfig { Name = "Arco do Berserker Ferro Negro", Description = "Um arco demoníaco, violento e absurdamente poderoso.", CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; val.AddRequirement("BlackMetal", 30, 0); val.AddRequirement("WolfPelt", 8, 0); val.AddRequirement("Silver", 10, 0); val.AddRequirement("Feathers", 20, 0); val.AddRequirement("Chain", 4, 0); CustomItem val2 = new CustomItem("CarlosBerserkerBow", text, val); SharedData shared = val2.ItemDrop.m_itemData.m_shared; shared.m_name = "Arco do Berserker Ferro Negro"; shared.m_description = "Um arco demoníaco, violento e absurdamente poderoso."; shared.m_weight = 2f; shared.m_value = 1500; shared.m_maxDurability = 2200f; shared.m_durabilityPerLevel = 120f; shared.m_maxQuality = 4; shared.m_attackForce = 120f; shared.m_backstabBonus = 4f; shared.m_useDurability = true; shared.m_damages.m_pierce = 140f; shared.m_damages.m_spirit = 20f; shared.m_attack.m_attackStamina = 8f; shared.m_attack.m_projectileVel = 80f; TintBerserker(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.42f, 0.09f, 0.09f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); Debug.Log((object)("CARLOS MMO: arco Berserker registrado com base " + text)); } catch (Exception ex) { Debug.LogError((object)("CARLOS MMO: erro ao registrar arco Berserker -> " + ex)); } } private void RegisterPaladin() { string baseItem = FirstExistingPrefab("HelmetPadded", "HelmetCarapace", "HelmetDrake"); string baseItem2 = FirstExistingPrefab("ArmorCarapaceChest", "ArmorPaddedCuirass", "ArmorWolfChest"); string baseItem3 = FirstExistingPrefab("ArmorCarapaceLegs", "ArmorPaddedGreaves", "ArmorWolfLegs"); AddPaladinArmor("CarlosPaladinHelmet", baseItem, "Elmo do Paladino Celestial", "Elmo sagrado de um protetor lendário.", 38f, 5.5f, 1200, 6, 8, 4); AddPaladinArmor("CarlosPaladinChest", baseItem2, "Peitoral do Paladino Celestial", "Peitoral celestial de proteção e glória.", 64f, 10.5f, 1600, 12, 14, 8); AddPaladinArmor("CarlosPaladinLegs", baseItem3, "Grevas do Paladino Celestial", "Grevas sagradas de um campeão luminoso.", 58f, 9f, 1450, 10, 12, 6); AddPaladinCape("CarlosPaladinCape", "CapeLinen", "Manto do Paladino Celestial", "Um manto claro e sagrado com brilho nobre.", 22f, 3.5f, 1200, 10, 10, 8); } private void RegisterAbyssal() { string baseItem = FirstExistingPrefab("HelmetMage", "HelmetFenring", "HelmetDrake"); string baseItem2 = FirstExistingPrefab("ArmorWolfChest", "ArmorFenringChest", "ArmorCarapaceChest"); string baseItem3 = FirstExistingPrefab("ArmorMageLegs", "ArmorFenringLegs", "ArmorCarapaceLegs"); AddAbyssArmor("CarlosAbyssHelmet", baseItem, "Capuz Abissal Noturno", "Capuz escuro de um soberano do abismo.", 34f, 3.5f, 1300, 6, 6, 6); AddAbyssArmor("CarlosAbyssChest", baseItem2, "Peitoral Abissal Noturno", "Peitoral abissal noturno mais bruto, pesado e com padrões de urso.", 60f, 8f, 1700, 10, 10, 10); AddAbyssArmor("CarlosAbyssLegs", baseItem3, "Grevas Abissais Noturnas", "Grevas elegantes do vazio escurecido.", 54f, 6.5f, 1550, 8, 8, 8); AddAbyssCape("CarlosAbyssCape", "CapeLinen", "Manto Abissal Noturno", "Manto escuro de brilho profundo, quase negro e refinado.", 22f, 3f, 1280, 6, 10, 8); } private string FirstExistingPrefab(params string[] prefabNames) { foreach (string text in prefabNames) { if (!string.IsNullOrEmpty(text)) { GameObject prefab = PrefabManager.Instance.GetPrefab(text); if ((Object)(object)prefab != (Object)null) { return text; } } } return null; } private void AddDarkArmor(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int iron = 0, int hide = 0, int feathers = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 2 }; if (iron > 0) { val.AddRequirement("Iron", iron, 0); } if (hide > 0) { val.AddRequirement("DeerHide", hide, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintDark(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.08f, 0.48f, 0.28f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); } } private void AddEsmeraldaCape(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int feathers = 0, int hide = 0, int guck = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 2 }; if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } if (hide > 0) { val.AddRequirement("DeerHide", hide, 0); } if (guck > 0) { val.AddRequirement("Guck", guck, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintEsmeraldaCape(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.26f, 0.1f, 0.4f, 1f), 0.36f, 0.92f); ItemManager.Instance.AddItem(val2); } } private void AddGuardianArmor(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int iron = 0, int silver = 0, int loxPelt = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; if (iron > 0) { val.AddRequirement("Iron", iron, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } if (loxPelt > 0) { val.AddRequirement("LoxPelt", loxPelt, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintGuardian(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.96f, 0.94f, 0.76f, 1f), 0.36f, 1.1f); ItemManager.Instance.AddItem(val2); } } private void AddGuardianCape(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int loxPelt = 0, int silver = 0, int feathers = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; if (loxPelt > 0) { val.AddRequirement("LoxPelt", loxPelt, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintGuardian(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.98f, 0.96f, 0.82f, 1f), 0.38f, 1.1f); ItemManager.Instance.AddItem(val2); } } private void AddHunterArmor(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int leatherScraps = 0, int trollHide = 0, int deerHide = 0, int feathers = 0, int obsidian = 0, int silver = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Workbench, MinStationLevel = 4 }; if (leatherScraps > 0) { val.AddRequirement("LeatherScraps", leatherScraps, 0); } if (trollHide > 0) { val.AddRequirement("TrollHide", trollHide, 0); } if (deerHide > 0) { val.AddRequirement("DeerHide", deerHide, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } if (obsidian > 0) { val.AddRequirement("Obsidian", obsidian, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintHunter(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.14f, 0.22f, 0.42f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); } } private void AddHunterCape(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int deerHide = 0, int trollHide = 0, int feathers = 0, int obsidian = 0, int silver = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Workbench, MinStationLevel = 4 }; if (deerHide > 0) { val.AddRequirement("DeerHide", deerHide, 0); } if (trollHide > 0) { val.AddRequirement("TrollHide", trollHide, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } if (obsidian > 0) { val.AddRequirement("Obsidian", obsidian, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintHunterCape(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.12f, 0.2f, 0.4f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); } } private void AddBerserkerArmor(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int iron = 0, int wolfPelt = 0, int chain = 0, int feathers = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; if (iron > 0) { val.AddRequirement("Iron", iron, 0); } if (wolfPelt > 0) { val.AddRequirement("WolfPelt", wolfPelt, 0); } if (chain > 0) { val.AddRequirement("Chain", chain, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintBerserker(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.4f, 0.08f, 0.08f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); } } private void AddBerserkerCape(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int wolfPelt = 0, int silver = 0, int trophies = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 3 }; if (wolfPelt > 0) { val.AddRequirement("WolfPelt", wolfPelt, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } if (trophies > 0) { val.AddRequirement("TrophyWolf", trophies, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintBerserkerCape(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.42f, 0.09f, 0.09f, 1f), 0.34f, 0.92f); ItemManager.Instance.AddItem(val2); } } private void AddPaladinArmor(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int blackMetal = 0, int silver = 0, int loxPelt = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 4 }; if (blackMetal > 0) { val.AddRequirement("BlackMetal", blackMetal, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } if (loxPelt > 0) { val.AddRequirement("LoxPelt", loxPelt, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintPaladin(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.9f, 0.88f, 0.72f, 1f), 0.34f, 1.04f); ItemManager.Instance.AddItem(val2); } } private void AddPaladinCape(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int linen = 0, int silver = 0, int feathers = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.Forge, MinStationLevel = 4 }; if (linen > 0) { val.AddRequirement("LinenThread", linen, 0); } if (silver > 0) { val.AddRequirement("Silver", silver, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintPaladin(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.94f, 0.9f, 0.78f, 1f), 0.34f, 1.04f); ItemManager.Instance.AddItem(val2); } } private void AddAbyssArmor(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int eitr = 0, int blackMetal = 0, int linen = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.BlackForge, MinStationLevel = 1 }; if (eitr > 0) { val.AddRequirement("Eitr", eitr, 0); } if (blackMetal > 0) { val.AddRequirement("BlackMetal", blackMetal, 0); } if (linen > 0) { val.AddRequirement("LinenThread", linen, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintAbyss(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.32f, 0.2f, 0.12f, 1f), 0.34f, 1f); ItemManager.Instance.AddItem(val2); } } private void AddAbyssCape(string internalName, string baseItem, string displayName, string description, float armor, float weight, int value, int eitr = 0, int linen = 0, int feathers = 0) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(baseItem)) { ItemConfig val = new ItemConfig { Name = displayName, Description = description, CraftingStation = CraftingStations.BlackForge, MinStationLevel = 1 }; if (eitr > 0) { val.AddRequirement("Eitr", eitr, 0); } if (linen > 0) { val.AddRequirement("LinenThread", linen, 0); } if (feathers > 0) { val.AddRequirement("Feathers", feathers, 0); } CustomItem val2 = new CustomItem(internalName, baseItem, val); ApplySharedStats(val2, displayName, description, armor, weight, value); TintAbyss(((Component)val2.ItemDrop).gameObject); ApplyIconTint(val2, new Color(0.3f, 0.18f, 0.1f, 1f), 0.34f, 1f); ItemManager.Instance.AddItem(val2); } } private void ApplySharedStats(CustomItem item, string displayName, string description, float armor, float weight, int value) { SharedData shared = item.ItemDrop.m_itemData.m_shared; shared.m_name = displayName; shared.m_description = description; shared.m_armor = armor; shared.m_weight = weight; shared.m_value = value; shared.m_maxStackSize = 1; shared.m_maxDurability = 1500f; shared.m_durabilityPerLevel = 95f; shared.m_maxQuality = 4; } private void ApplyIconTint(CustomItem item, Color tint, float strength, float brighten) { //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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) try { SharedData val = ((item != null && (Object)(object)item.ItemDrop != (Object)null) ? item.ItemDrop.m_itemData.m_shared : null); if (val == null || val.m_icons == null || val.m_icons.Length == 0 || (Object)(object)val.m_icons[0] == (Object)null) { return; } Sprite val2 = val.m_icons[0]; Texture2D val3 = ExtractReadableSpriteTexture(val2); if ((Object)(object)val3 == (Object)null) { return; } Color[] pixels = val3.GetPixels(); for (int i = 0; i < pixels.Length; i++) { Color val4 = pixels[i]; if (!(val4.a <= 0.01f)) { Color val5 = Color.Lerp(val4, tint, strength); val5.r = Mathf.Clamp01(val5.r * brighten); val5.g = Mathf.Clamp01(val5.g * brighten); val5.b = Mathf.Clamp01(val5.b * brighten); pixels[i] = new Color(val5.r, val5.g, val5.b, val4.a); } } val3.SetPixels(pixels); val3.Apply(); Sprite val6 = Sprite.Create(val3, new Rect(0f, 0f, (float)((Texture)val3).width, (float)((Texture)val3).height), new Vector2(0.5f, 0.5f), val2.pixelsPerUnit); val.m_icons[0] = val6; } catch (Exception ex) { Debug.LogWarning((object)("CARLOS MMO: falha ao colorir ícone -> " + ex.Message)); } } private Texture2D ExtractReadableSpriteTexture(Sprite sprite) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown if ((Object)(object)sprite == (Object)null || (Object)(object)sprite.texture == (Object)null) { return null; } Texture2D texture = sprite.texture; Rect textureRect = sprite.textureRect; RenderTexture temporary = RenderTexture.GetTemporary(((Texture)texture).width, ((Texture)texture).height, 0, (RenderTextureFormat)7, (RenderTextureReadWrite)1); Graphics.Blit((Texture)(object)texture, temporary); RenderTexture active = RenderTexture.active; RenderTexture.active = temporary; Texture2D val = new Texture2D(((Texture)texture).width, ((Texture)texture).height, (TextureFormat)4, false); val.ReadPixels(new Rect(0f, 0f, (float)((Texture)texture).width, (float)((Texture)texture).height), 0, 0); val.Apply(); RenderTexture.active = active; RenderTexture.ReleaseTemporary(temporary); Texture2D val2 = new Texture2D((int)((Rect)(ref textureRect)).width, (int)((Rect)(ref textureRect)).height, (TextureFormat)4, false); Color[] pixels = val.GetPixels((int)((Rect)(ref textureRect)).x, (int)((Rect)(ref textureRect)).y, (int)((Rect)(ref textureRect)).width, (int)((Rect)(ref textureRect)).height); val2.SetPixels(pixels); val2.Apply(); return val2; } private void TintDark(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.02f, 0.06f, 0.04f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0f, 0.62f, 0.32f) * 0.22f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.66f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.66f); } } } } } private void TintEsmeraldaCape(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.05f, 0.03f, 0.08f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.34f, 0.14f, 0.54f) * 0.2f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.66f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.66f); } } } } } private void TintGuardian(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.96f, 0.95f, 0.9f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.95f, 0.95f, 0.85f) * 0.16f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.72f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.72f); } } } } } private void TintHunter(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.03f, 0.03f, 0.06f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.12f, 0.22f, 0.48f) * 0.2f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.66f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.66f); } } } } } private void TintHunterCape(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.02f, 0.03f, 0.05f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.1f, 0.18f, 0.42f) * 0.18f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.64f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.64f); } } } } } private void TintBerserker(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.06f, 0.01f, 0.02f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.56f, 0.08f, 0.1f) * 0.22f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.66f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.66f); } if (val2.HasProperty("_Metallic")) { val2.SetFloat("_Metallic", 0.34f); } } } } } private void TintBerserkerCape(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.05f, 0.01f, 0.02f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.46f, 0.08f, 0.1f) * 0.18f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.64f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.64f); } } } } } private void TintPaladin(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.74f, 0.72f, 0.62f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.9f, 0.84f, 0.64f) * 0.12f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.72f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.72f); } } } } } private void TintAbyss(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.22f, 0.12f, 0.07f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.46f, 0.26f, 0.14f) * 0.2f); } if (val2.HasProperty("_Smoothness")) { val2.SetFloat("_Smoothness", 0.74f); } if (val2.HasProperty("_Glossiness")) { val2.SetFloat("_Glossiness", 0.74f); } } } } } private void TintBossStorm(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.54f, 0.64f, 0.72f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.7f, 0.88f, 1f) * 0.18f); } } } } } private void TintBossElder(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.24f, 0.3f, 0.12f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.34f, 0.5f, 0.18f) * 0.18f); } } } } } private void TintBossPoison(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.18f, 0.24f, 0.1f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.26f, 0.58f, 0.14f) * 0.18f); } } } } } private void TintBossFrost(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.7f, 0.82f, 0.9f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.72f, 0.92f, 1f) * 0.2f); } } } } } private void TintBossFire(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.3f, 0.08f, 0.05f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.86f, 0.24f, 0.08f) * 0.24f); } } } } } private void TintBossQueen(GameObject obj) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); Color color = default(Color); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (!((Object)(object)val2 == (Object)null)) { ((Color)(ref color))..ctor(0.14f, 0.08f, 0.18f, 1f); TrySetColor(val2, "_Color", color); TrySetColor(val2, "_BaseColor", color); if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", new Color(0.38f, 0.18f, 0.48f) * 0.2f); } } } } } private void TrySetColor(Material mat, string prop, Color color) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mat != (Object)null && mat.HasProperty(prop)) { mat.SetColor(prop, color); } } } [HarmonyPatch(typeof(Player), "Update")] public static class CarlosMMOCapeSkillsPatch { private static void Postfix(Player __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || (Object)(object)__instance != (Object)(object)Player.m_localPlayer) { return; } Rigidbody component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { bool flag = ((Character)__instance).IsOnGround(); if (!flag && Input.GetKey((KeyCode)32) && component.velocity.y < CarlosMMOLoader.GlideFallSpeed) { component.velocity = new Vector3(component.velocity.x, CarlosMMOLoader.GlideFallSpeed, component.velocity.z); } if (flag && Input.GetKeyDown((KeyCode)32)) { component.AddForce(Vector3.up * CarlosMMOLoader.JumpBoostForce, (ForceMode)2); } if (!flag && Input.GetKeyDown((KeyCode)304) && Time.time > CarlosMMOLoader.LastDashTime + CarlosMMOLoader.DashCooldown) { Vector3 forward = ((Component)__instance).transform.forward; forward.y = 0f; ((Vector3)(ref forward)).Normalize(); component.AddForce(forward * CarlosMMOLoader.DashForce, (ForceMode)2); CarlosMMOLoader.LastDashTime = Time.time; } } } }