using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("ValheimLegendsFork")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ValheimLegendsFork")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("f0baf009-4135-4368-9987-850698809493")] [assembly: AssemblyFileVersion("0.7.4.0")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.7.4.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 ValheimLegends { public class AnimationClipOverrides : List> { public AnimationClip this[string name] { get { return Find((KeyValuePair x) => ((Object)x.Key).name == name).Value; } set { int num = FindIndex((KeyValuePair x) => ((Object)x.Key).name == name); if (num != -1) { base[num] = new KeyValuePair(base[num].Key, value); } } } public AnimationClipOverrides(int capacity) : base(capacity) { } } public class Class_Berserker { public static float execute_damagebonus = 1.5f; public static float execute_damagebonus_scaling = 0.015f; public static float execute_staggerbonus = 1.5f; public static float execute_staggerbonus_scaling = 0.01f; public static float execute_charges_base = 3f; public static float execute_charges_scaling = 0.04f; public static float berserk_speedbonus_base = 1.2f; public static float berserk_speedbonus_scaling = 0.006f; public static float berserk_damagebonus_base = 1.2f; public static float berserk_damagebonus_scaling = 0.006f; public static float berserk_healthabsorb_base = 0.2f; public static float berserk_healthabsorb_scaling = 0.002f; private static int Script_Layermask = LayerMask.GetMask(new string[7] { "Default", "static_solid", "Default_small", "piece_nonsolid", "vehicle", "viewblock", "piece" }); private static int Player_Layermask = LayerMask.GetMask(new string[6] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle" }); private static GameObject GO_CastFX; public static void Execute_Dash(Player player, ref float altitude, ref Rigidbody playerBody) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_00f8: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_stonegolem_attack_hit"), ((Component)player).transform.position, Quaternion.identity); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; float num = 0.6f + level * 0.005f * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_berserkerDash; if (((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk")) || ((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Execute"))) { SE_Berserk sE_Berserk = (SE_Berserk)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk")); if ((Object)(object)sE_Berserk != (Object)null) { num *= sE_Berserk.damageModifier; } } Vector3 lookDir = ((Character)player).GetLookDir(); lookDir.y = 0f; ((Component)player).transform.rotation = Quaternion.LookRotation(lookDir); Vector3 val = default(Vector3); Vector3 forward = ((Component)player).transform.forward; Vector3 position = ((Component)player).transform.position; Vector3 val2 = ((Component)player).transform.position; val2.y += 0.1f; List list = new List(); float num2 = 1f; int num3; for (num3 = 0; num3 <= 10; num3++) { RaycastHit val3 = default(RaycastHit); bool flag = false; for (int num4 = 0; num4 <= 10; num4++) { Vector3 val4 = Vector3.MoveTowards(((Component)player).transform.position, ((Component)player).transform.position + forward * 100f, (float)num3 + (float)num4 * 0.1f); val4.y = val2.y; if (val4.y < ZoneSystem.instance.GetGroundHeight(val4)) { val2.y = ZoneSystem.instance.GetGroundHeight(val4) + 1f; val4.y = val2.y; } flag = Physics.SphereCast(val4, 0.05f, forward, ref val3, float.PositiveInfinity, Script_Layermask); if (flag && Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider)) { val = ((RaycastHit)(ref val3)).point; break; } } position = Vector3.MoveTowards(((Component)player).transform.position, ((Component)player).transform.position + forward * 100f, (float)num3); position.y = ((ZoneSystem.instance.GetSolidHeight(position) - ZoneSystem.instance.GetGroundHeight(position) <= 1f) ? ZoneSystem.instance.GetSolidHeight(position) : ZoneSystem.instance.GetGroundHeight(position)); if (flag && Vector3.Distance(new Vector3(position.x, val2.y, position.z), val) <= 1f) { val2 = Vector3.MoveTowards(val, val2, 1f); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_beehive_hit"), val2, Quaternion.identity); break; } Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_beehive_hit"), val2, Quaternion.identity); ((Vector3)(ref val2))..ctor(position.x, val2.y, position.z); foreach (Character allCharacter in Character.GetAllCharacters()) { HitData val5 = new HitData(); val5.m_damage = ((Humanoid)player).GetCurrentWeapon().GetDamage(); val5.ApplyModifier(Random.Range(0.8f, 1.2f) * num / num2); val5.m_point = allCharacter.GetCenterPoint(); val5.m_dir = ((Component)allCharacter).transform.position - position; val5.m_skill = ValheimLegends.DisciplineSkill; float num5 = Vector3.Distance(((Component)allCharacter).transform.position, position); if (!BaseAI.IsEnemy(allCharacter, (Character)(object)player) || !(num5 <= 3f) || list.Contains(((Object)allCharacter).GetInstanceID())) { continue; } SE_Execute sE_Execute = (SE_Execute)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Execute")); if ((Object)(object)sE_Execute != (Object)null) { val5.ApplyModifier(sE_Execute.damageBonus); sE_Execute.hitCount--; if (sE_Execute.hitCount <= 0) { ((Character)player).GetSEMan().RemoveStatusEffect((StatusEffect)(object)sE_Execute, false); } } num2 += 0.6f; allCharacter.Damage(val5); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_crit"), allCharacter.GetCenterPoint(), Quaternion.identity); list.Add(((Object)allCharacter).GetInstanceID()); } } list.Clear(); if (num3 > 10 && ZoneSystem.instance.GetSolidHeight(val2) - val2.y <= 2f) { val2.y = ZoneSystem.instance.GetSolidHeight(val2); } playerBody.position = val2; altitude = 0f; ((Component)player).transform.rotation = Quaternion.LookRotation(forward); } public static void Process_Input(Player player, ref float altitude) { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) new Random(); if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() > VL_Utility.GetDashCost(player)) { StatusEffect val = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val.m_ttl = VL_Utility.GetDashCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetDashCost(player)); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("swing_longsword2"); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"), ((Component)player).transform.position, Quaternion.identity); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetDashSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Dash: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetDashCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() > VL_Utility.GetBerserkCost(player)) { StatusEffect val2 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val2.m_ttl = VL_Utility.GetBerserkCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetBerserkCost(player)); ValheimLegends.shouldUseGuardianPower = false; player.StartEmote("challenge", true); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_GP_Stone"), ((Character)player).GetCenterPoint(), Quaternion.identity); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; SE_Berserk sE_Berserk = (SE_Berserk)(object)ScriptableObject.CreateInstance(typeof(SE_Berserk)); ((StatusEffect)sE_Berserk).m_ttl = SE_Berserk.m_baseTTL; sE_Berserk.speedModifier = berserk_speedbonus_base + berserk_speedbonus_scaling * level; sE_Berserk.damageModifier = berserk_damagebonus_base + berserk_damagebonus_scaling * level * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_berserkerBerserk; sE_Berserk.healthAbsorbPercent = berserk_healthabsorb_base + berserk_healthabsorb_scaling * level; ((StatusEffect)sE_Berserk).m_tooltip = $"Drains hp per second to boost damage by {(int)((sE_Berserk.damageModifier - 1f) * 100f)}%, speed by {(int)((sE_Berserk.speedModifier - 1f) * 100f)}%.\n*Additionally absorbs {(int)((sE_Berserk.healthAbsorbPercent - 1f) * 100f)}% of damage dealt as stamina"; ((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Berserk, false, 0, 0f); ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetBerserkSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Berserk: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetBerserkCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { if (!VL_Utility.Ability1_Input_Down) { return; } if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() > VL_Utility.GetExecuteCost(player)) { StatusEffect val3 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val3.m_ttl = VL_Utility.GetExecuteCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetExecuteCost(player)); player.StartEmote("point", true); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_backstab"), ((Character)player).GetCenterPoint(), Quaternion.identity); float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; SE_Execute sE_Execute = (SE_Execute)(object)ScriptableObject.CreateInstance(typeof(SE_Execute)); sE_Execute.hitCount = Mathf.RoundToInt(execute_charges_base + execute_charges_scaling * level2); sE_Execute.damageBonus = execute_damagebonus + execute_damagebonus_scaling * level2 * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_berserkerExecute; sE_Execute.staggerForce = execute_staggerbonus + execute_staggerbonus_scaling * level2; ((StatusEffect)sE_Execute).m_tooltip = $"Increases damage of next {sE_Execute.hitCount} hits by {(int)((sE_Execute.damageBonus - 1f) * 100f)}%"; if (((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Execute"))) { StatusEffect statusEffect = ((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Execute")); ((Character)player).GetSEMan().RemoveStatusEffect(statusEffect, false); } ((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Execute, false, 0, 0f); ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetExecuteSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Execute: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetExecuteCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } } } public class Class_Druid { private static int Script_Layermask = LayerMask.GetMask(new string[11] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "character", "character_net", "character_ghost" }); private static GameObject GO_CastFX; private static GameObject GO_Root; private static Projectile P_Root; private static StatusEffect SE_Root; private static GameObject GO_RootDefender; private static int rootCount; private static int rootCountTrigger; public static void Process_Input(Player player, float altitude) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_06fe: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Expected O, but got Unknown //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07f0: Unknown result type (might be due to invalid IL or missing references) //IL_07fc: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_080b: Unknown result type (might be due to invalid IL or missing references) //IL_0832: Unknown result type (might be due to invalid IL or missing references) //IL_0781: Unknown result type (might be due to invalid IL or missing references) //IL_0884: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_0971: Unknown result type (might be due to invalid IL or missing references) //IL_0976: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0f23: Unknown result type (might be due to invalid IL or missing references) //IL_0f28: Unknown result type (might be due to invalid IL or missing references) //IL_0f4c: Unknown result type (might be due to invalid IL or missing references) //IL_0f51: Unknown result type (might be due to invalid IL or missing references) //IL_0ffc: Unknown result type (might be due to invalid IL or missing references) //IL_09ec: Unknown result type (might be due to invalid IL or missing references) //IL_09f2: Unknown result type (might be due to invalid IL or missing references) //IL_09fc: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Unknown result type (might be due to invalid IL or missing references) //IL_0a0c: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_0a1b: Unknown result type (might be due to invalid IL or missing references) //IL_0a20: Unknown result type (might be due to invalid IL or missing references) //IL_0a23: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a3f: Unknown result type (might be due to invalid IL or missing references) //IL_0a44: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0a59: Unknown result type (might be due to invalid IL or missing references) //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a6d: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0a82: Unknown result type (might be due to invalid IL or missing references) //IL_0a8c: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Unknown result type (might be due to invalid IL or missing references) //IL_0aa3: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Expected O, but got Unknown //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0abc: Unknown result type (might be due to invalid IL or missing references) //IL_0bcb: Unknown result type (might be due to invalid IL or missing references) //IL_0bd0: Unknown result type (might be due to invalid IL or missing references) //IL_0b4c: Unknown result type (might be due to invalid IL or missing references) //IL_0b51: Unknown result type (might be due to invalid IL or missing references) //IL_0b96: Unknown result type (might be due to invalid IL or missing references) //IL_0b9b: Unknown result type (might be due to invalid IL or missing references) //IL_0ba8: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_10b8: Unknown result type (might be due to invalid IL or missing references) //IL_0c65: Unknown result type (might be due to invalid IL or missing references) //IL_0c70: Unknown result type (might be due to invalid IL or missing references) //IL_0c7a: Unknown result type (might be due to invalid IL or missing references) //IL_0c7f: Unknown result type (might be due to invalid IL or missing references) //IL_0c85: Unknown result type (might be due to invalid IL or missing references) //IL_0cac: Unknown result type (might be due to invalid IL or missing references) //IL_0cb7: Unknown result type (might be due to invalid IL or missing references) //IL_0cde: Unknown result type (might be due to invalid IL or missing references) //IL_0ce3: Unknown result type (might be due to invalid IL or missing references) //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0ced: Unknown result type (might be due to invalid IL or missing references) //IL_0cf0: Unknown result type (might be due to invalid IL or missing references) //IL_0cf1: Unknown result type (might be due to invalid IL or missing references) //IL_0de6: Unknown result type (might be due to invalid IL or missing references) //IL_0dc6: Unknown result type (might be due to invalid IL or missing references) //IL_0dcb: Unknown result type (might be due to invalid IL or missing references) //IL_0d91: Unknown result type (might be due to invalid IL or missing references) //IL_0d96: Unknown result type (might be due to invalid IL or missing references) //IL_0da3: Unknown result type (might be due to invalid IL or missing references) new Random(); Vector3 val = default(Vector3); if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { ValheimLegends.shouldUseGuardianPower = false; if (player.GetStamina() >= VL_Utility.GetRootCost && !ValheimLegends.isChanneling) { ValheimLegends.isChanneling = true; StatusEffect val2 = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val2.m_ttl = VL_Utility.GetRootCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetRootCost); ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("gpower"); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetSpeed(0.3f); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.ConjurationSkillDef)).m_level; rootCount = 0; rootCountTrigger = 32 - Mathf.RoundToInt(0.12f * level); Vector3 val3 = ((Component)player).transform.right * 2.5f; if (Random.Range(0f, 1f) < 0.5f) { val3 *= -1f; } val = ((Component)player).transform.position + ((Component)player).transform.up * 3f + ((Character)player).GetLookDir() * 2f + val3; GO_Root = Object.Instantiate(ZNetScene.instance.GetPrefab("gdking_root_projectile"), new Vector3(val.x, val.y, val.z), Quaternion.identity); P_Root = GO_Root.GetComponent(); ((Object)P_Root).name = "Root"; P_Root.m_respawnItemOnHit = false; P_Root.m_spawnOnHit = null; P_Root.m_ttl = 35f; P_Root.m_gravity = 0f; P_Root.m_rayRadius = 0.1f; Traverse.Create((object)P_Root).Field("m_skill").SetValue((object)ValheimLegends.ConjurationSkill); ((Component)P_Root).transform.localRotation = Quaternion.LookRotation(((Character)player).GetLookDir()); GO_Root.transform.localScale = Vector3.one * 1.5f; ((Character)player).RaiseSkill(ValheimLegends.ConjurationSkill, VL_Utility.GetRootSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to channel Root: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetRootCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability3_Input_Pressed && player.GetStamina() > VL_Utility.GetRootCostPerUpdate && ValheimLegends.isChanneling && Mathf.Max(0f, altitude - ((Component)player).transform.position.y) <= 2f) { rootCount++; VL_Utility.SetTimer(); ((Character)player).UseStamina(VL_Utility.GetRootCostPerUpdate); ValheimLegends.isChanneling = true; if (rootCount < rootCountTrigger) { return; } ((Character)player).RaiseSkill(ValheimLegends.ConjurationSkill, 0.06f); float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.ConjurationSkillDef)).m_level; rootCount = 0; if ((Object)(object)GO_Root != (Object)null && (Object)(object)GO_Root.transform != (Object)null) { RaycastHit val4 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val5 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val4, float.PositiveInfinity, Script_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val4)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val4)).point); HitData val6 = new HitData(); val6.m_damage.m_pierce = Random.Range(10f + 0.6f * level2, 15f + 1.2f * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_druidVines; val6.m_pushForce = 2f; Vector3 val7 = Vector3.MoveTowards(GO_Root.transform.position, val5, 1f); if ((Object)(object)P_Root != (Object)null && ((Object)P_Root).name == "Root") { P_Root.Setup((Character)(object)player, (val7 - GO_Root.transform.position) * 75f, -1f, val6, (ItemData)null, (ItemData)null); Traverse.Create((object)P_Root).Field("m_skill").SetValue((object)ValheimLegends.ConjurationSkill); } } GO_Root = null; Vector3 val8 = ((Component)player).transform.right * 2.5f; if (Random.Range(0f, 1f) < 0.5f) { val8 *= -1f; } val = ((Component)player).transform.position + ((Component)player).transform.up * 3f + ((Character)player).GetLookDir() * 2f + val8; GO_Root = Object.Instantiate(ZNetScene.instance.GetPrefab("gdking_root_projectile"), new Vector3(val.x, val.y, val.z), Quaternion.identity); P_Root = GO_Root.GetComponent(); ((Object)P_Root).name = "Root"; P_Root.m_respawnItemOnHit = false; P_Root.m_spawnOnHit = null; P_Root.m_ttl = rootCountTrigger + 1; P_Root.m_gravity = 0f; P_Root.m_rayRadius = 0.1f; Traverse.Create((object)P_Root).Field("m_skill").SetValue((object)ValheimLegends.ConjurationSkill); ((Component)P_Root).transform.localRotation = Quaternion.LookRotation(((Character)player).GetLookDir()); GO_Root.transform.localScale = Vector3.one * 1.5f; } else if (((VL_Utility.Ability3_Input_Up || player.GetStamina() <= VL_Utility.GetRootCostPerUpdate) && ValheimLegends.isChanneling) || Mathf.Max(0f, altitude - ((Component)player).transform.position.y) > 2f) { if ((Object)(object)GO_Root != (Object)null && (Object)(object)GO_Root.transform != (Object)null) { RaycastHit val9 = default(RaycastHit); Vector3 position2 = ((Component)player).transform.position; Vector3 val10 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val9, float.PositiveInfinity, Script_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val9)).collider)) ? (position2 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val9)).point); HitData val11 = new HitData(); val11.m_damage.m_pierce = 10f; val11.m_pushForce = 10f; val11.SetAttacker((Character)(object)player); Vector3 val12 = Vector3.MoveTowards(GO_Root.transform.position, val10, 1f); P_Root.Setup((Character)(object)player, (val12 - GO_Root.transform.position) * 65f, -1f, val11, (ItemData)null, (ItemData)null); Traverse.Create((object)P_Root).Field("m_skill").SetValue((object)ValheimLegends.ConjurationSkill); } GO_Root = null; ValheimLegends.isChanneling = false; } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetDefenderCost) { Vector3 lookDir = ((Character)player).GetLookDir(); lookDir.y = 0f; ((Component)player).transform.rotation = Quaternion.LookRotation(lookDir); ValheimLegends.shouldUseGuardianPower = false; StatusEffect val13 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val13.m_ttl = VL_Utility.GetDefenderCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val13, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetDefenderCost); float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.ConjurationSkillDef)).m_level; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("gpower"); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_WishbonePing"), ((Component)player).transform.position, Quaternion.identity); GameObject prefab = ZNetScene.instance.GetPrefab("TentaRoot"); CharacterTimedDestruction component = prefab.GetComponent(); if ((Object)(object)component != (Object)null) { component.m_timeoutMin = 24f + 0.3f * level3; component.m_timeoutMax = component.m_timeoutMin; component.m_triggerOnAwake = true; ((Behaviour)component).enabled = true; } List list = new List(); list.Clear(); val = ((Component)player).transform.position + ((Character)player).GetLookDir() * 5f + ((Component)player).transform.right * 5f; list.Add(val); val = ((Component)player).transform.position + ((Character)player).GetLookDir() * 5f + ((Component)player).transform.right * 5f * -1f; list.Add(val); val = ((Component)player).transform.position + ((Character)player).GetLookDir() * 5f * -1f; list.Add(val); for (int num = 0; num < list.Count; num++) { GO_RootDefender = Object.Instantiate(prefab, list[num], Quaternion.identity); Character component2 = GO_RootDefender.GetComponent(); if ((Object)(object)component2 != (Object)null) { SE_RootsBuff sE_RootsBuff = (SE_RootsBuff)(object)ScriptableObject.CreateInstance(typeof(SE_RootsBuff)); ((StatusEffect)sE_RootsBuff).m_ttl = SE_RootsBuff.m_baseTTL; sE_RootsBuff.damageModifier = 0.5f + 0.015f * level3 * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_druidDefenders; sE_RootsBuff.staminaRegen = 0.5f + 0.05f * level3; sE_RootsBuff.summoner = player; sE_RootsBuff.centerPoint = ((Component)player).transform.position; component2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_RootsBuff, false, 0, 0f); component2.SetMaxHealth(30f + 6f * level3); ((Component)component2).transform.localScale = (0.75f + 0.005f * level3) * Vector3.one; component2.m_faction = (Faction)0; component2.SetTamed(true); } Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"), ((Component)component2).transform.position, Quaternion.identity); } GameObject prefab2 = ZNetScene.instance.GetPrefab("VL_Deathsquit"); CharacterTimedDestruction component3 = prefab2.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.m_timeoutMin = 24f + 0.3f * level3; component3.m_timeoutMax = component3.m_timeoutMin; component3.m_triggerOnAwake = true; ((Behaviour)component3).enabled = true; } int num2 = 2 + Mathf.RoundToInt(0.05f * level3); for (int num3 = 0; num3 < num2; num3++) { val = ((Component)player).transform.position + ((Component)player).transform.up * 4f + (((Character)player).GetLookDir() * Random.Range(0f - (5f + 0.1f * level3), 5f + 0.1f * level3) + ((Component)player).transform.right * Random.Range(0f - (5f + 0.1f * level3), 5f + 0.1f * level3)); Character component4 = Object.Instantiate(prefab2, val, Quaternion.identity).GetComponent(); component4.m_name = "Drusquito"; if ((Object)(object)component4 != (Object)null) { SE_Companion sE_Companion = (SE_Companion)(object)ScriptableObject.CreateInstance(typeof(SE_Companion)); ((StatusEffect)sE_Companion).m_ttl = 60f; sE_Companion.damageModifier = 0.05f + 0.0075f * level3 * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_druidDefenders; sE_Companion.summoner = player; component4.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Companion, false, 0, 0f); ((Component)component4).transform.localScale = (0.4f + 0.005f * level3) * Vector3.one; component4.m_faction = (Faction)0; component4.SetTamed(true); } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_float_hitwater"), ((Component)component4).transform.position, Quaternion.identity); } ((Character)player).RaiseSkill(ValheimLegends.ConjurationSkill, VL_Utility.GetDefenderSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to summon root defenders: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetDefenderCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetRegenerationCost) { StatusEffect val14 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val14.m_ttl = VL_Utility.GetRegenerationCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val14, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetRegenerationCost); float level4 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; player.StartEmote("cheer", true); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_guardstone_permitted_add"), ((Character)player).GetCenterPoint(), Quaternion.identity); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_WishbonePing"), ((Component)player).transform.position, Quaternion.identity); SE_Regeneration sE_Regeneration = (SE_Regeneration)(object)ScriptableObject.CreateInstance(typeof(SE_Regeneration)); ((StatusEffect)sE_Regeneration).m_ttl = SE_Regeneration.m_baseTTL; ((StatusEffect)sE_Regeneration).m_icon = ZNetScene.instance.GetPrefab("TrophyGreydwarfShaman").GetComponent().m_itemData.GetIcon(); sE_Regeneration.m_HealAmount = 0.5f + 0.4f * level4 * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_druidRegen; sE_Regeneration.doOnce = false; ((StatusEffect)sE_Regeneration).m_tooltip = $"Regenerating {sE_Regeneration.m_HealAmount} hp every second"; List list2 = new List(); list2.Clear(); Character.GetCharactersInRange(((Character)player).GetCenterPoint(), 30f + 0.2f * level4, list2); foreach (Character item in list2) { if (!BaseAI.IsEnemy((Character)(object)player, item)) { if ((Object)(object)item == (Object)(object)Player.m_localPlayer) { item.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Regeneration, true, 0, 0f); } else if (item.IsPlayer()) { item.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_Regeneration).name), true, 0, 0f); } else { item.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Regeneration, true, 0, 0f); } } } ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetRegenerationSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Regeneration: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetRegenerationCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Duelist { private static int ScriptChar_Layermask = LayerMask.GetMask(new string[11] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "character", "character_net", "character_ghost" }); private static GameObject GO_CastFX; private static GameObject GO_QuickShot; private static Projectile P_QuickShot; public static float riposte_returnDamageMultiplier_base = 1.5f; public static float riposte_returnDamageMultiplier_scaling = 0.01f; public static void Execute_Slash(Player player) { //IL_0010: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_BlinkStrike"), ((Character)player).GetCenterPoint() + ((Character)player).GetLookDir() * 3f, Quaternion.LookRotation(((Character)player).GetLookDir())); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; float num = 0.8f + level * 0.006f * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_duelistSeismicSlash; Vector3 val = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 6f; List list = new List(); list.Clear(); Character.GetCharactersInRange(val, 6f, list); foreach (Character item in list) { if (BaseAI.IsEnemy((Character)(object)player, item) && VL_Utility.LOS_IsValid(item, val, val)) { _ = ((Component)item).transform.position - ((Component)player).transform.position; HitData val2 = new HitData(); val2.m_damage = ((Humanoid)player).GetCurrentWeapon().GetDamage(); val2.ApplyModifier(Random.Range(0.8f, 1.2f) * num); val2.m_pushForce = 25f + 0.1f * level; val2.m_point = item.GetEyePoint(); val2.m_dir = ((Component)player).transform.position - ((Component)item).transform.position; val2.m_skill = ValheimLegends.DisciplineSkill; item.Damage(val2); } } } public static void Process_Input(Player player) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Expected O, but got Unknown //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) new Random(); if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() >= VL_Utility.GetBlinkStrikeCost) { StatusEffect val = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val.m_ttl = VL_Utility.GetBlinkStrikeCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetBlinkStrikeCost); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("knife_stab1"); ValheimLegends.isChanneling = true; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetBlinkStrikeSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for S. Slash : (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetBlinkStrikeCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetRiposteCost) { StatusEffect val2 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val2.m_ttl = VL_Utility.GetRiposteCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetRiposteCost); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_backstab"), ((Character)player).GetCenterPoint(), Quaternion.identity); SE_Riposte sE_Riposte = (SE_Riposte)(object)ScriptableObject.CreateInstance(typeof(SE_Riposte)); sE_Riposte.damageMultiplier = riposte_returnDamageMultiplier_base + riposte_returnDamageMultiplier_scaling * level * VL_GlobalConfigs.c_duelistRiposte * VL_GlobalConfigs.g_DamageModifer; ((StatusEffect)sE_Riposte).m_tooltip = $"Ready to riposte an enemy attack. Parrying an enemy will automatically return {(int)((sE_Riposte.damageMultiplier - 1f) * 100f)}% of the damage blocked while following up with the equipped weapon"; ((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Riposte, false, 0, 0f); ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetRiposteSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Riposte: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetRiposteCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetQuickShotCost) { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; StatusEffect val3 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val3.m_ttl = VL_Utility.GetQuickShotCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetQuickShotCost + 0.5f * level2); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("interact"); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_smelter_add"), ((Component)player).transform.position, Quaternion.identity); Vector3 val4 = ((Component)player).transform.position + ((Component)player).transform.up * 1.2f + ((Character)player).GetLookDir() * 0.5f; GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_QuickShot"), val4, Quaternion.LookRotation(((Character)player).GetLookDir())); GO_QuickShot = Object.Instantiate(ZNetScene.instance.GetPrefab("Greydwarf_throw_projectile"), val4, Quaternion.identity); P_QuickShot = GO_QuickShot.GetComponent(); ((Object)P_QuickShot).name = "QuickShot"; P_QuickShot.m_respawnItemOnHit = false; P_QuickShot.m_spawnOnHit = null; P_QuickShot.m_ttl = 10f; P_QuickShot.m_gravity = 1.2f; P_QuickShot.m_rayRadius = 0.05f; P_QuickShot.m_hitNoise = 20f; ((Component)P_QuickShot).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val4)); GO_QuickShot.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f); RaycastHit val5 = default(RaycastHit); Vector3 val6 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val5, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val5)).collider)) ? (((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val5)).point); HitData val7 = new HitData(); val7.m_damage.m_pierce = Random.Range(5f + 1f * level2, 30f + 1f * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_duelistHipShot; val7.m_pushForce = 1f; val7.m_skill = ValheimLegends.DisciplineSkill; Vector3 val8 = Vector3.MoveTowards(val4, val6, 1f); P_QuickShot.Setup((Character)(object)player, (val8 - GO_QuickShot.transform.position) * 100f, -1f, val7, (ItemData)null, (ItemData)null); Traverse.Create((object)P_QuickShot).Field("m_skill").SetValue((object)ValheimLegends.DisciplineSkill); GO_QuickShot = null; VL_Utility.RotatePlayerToTarget(player); ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetQuickShotSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to for Hip Shot: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetQuickShotCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Enchanter { public enum EnchanterAttackType { Charm = 10, Shock = 8, None = 0 } private static int Script_Layermask = LayerMask.GetMask(new string[8] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock" }); private static int ScriptChar_Layermask = LayerMask.GetMask(new string[14] { "Default", "static_solid", "Default_small", "piece_nonsolid", "piece", "terrain", "vehicle", "viewblock", "character", "character_noenv", "character_trigger", "character_net", "character_ghost", "Water" }); private static bool zonechargeCharging = false; private static float zonechargeCount; private static int zonechargeChargeAmount; private static int zonechargeChargeAmountMax; private static float zonechargeSkillGain = 0f; public static EnchanterAttackType QueuedAttack; public static StatusEffect HasZoneBuffTime(Player p) { foreach (StatusEffect statusEffect in ((Character)p).GetSEMan().GetStatusEffects()) { if (statusEffect.m_name.StartsWith("VL_Biome")) { return statusEffect; } } return null; } public static void Execute_Attack(Player player, ref Rigidbody playerBody, ref float altitude) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) if (QueuedAttack == EnchanterAttackType.Charm) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; Vector3 val = ((Character)player).GetEyePoint() + ((Component)player).transform.up * 0.1f + ((Character)player).GetLookDir() * 0.5f + ((Component)player).transform.right * 0.25f; GameObject val2 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_Charm"), val, Quaternion.identity); Projectile component = val2.GetComponent(); ((Object)component).name = "VL_Charm"; component.m_respawnItemOnHit = false; component.m_spawnOnHit = null; component.m_ttl = 30f * VL_GlobalConfigs.c_enchanterCharm; component.m_gravity = 0f; component.m_rayRadius = 0.01f; component.m_aoe = 1f + 0.01f * level; ((Component)component).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val)); val2.transform.localScale = Vector3.zero; RaycastHit val3 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val4 = ((!Physics.Raycast(val, ((Character)player).GetLookDir(), ref val3, 1000f, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val3)).point); HitData val5 = new HitData(); val5.m_skill = ValheimLegends.AlterationSkill; Vector3 val6 = Vector3.MoveTowards(val2.transform.position, val4, 1f); component.Setup((Character)(object)player, (val6 - val2.transform.position) * 40f, -1f, val5, (ItemData)null, (ItemData)null); Traverse.Create((object)component).Field("m_skill").SetValue((object)ValheimLegends.AlterationSkill); } else { if (QueuedAttack != EnchanterAttackType.Shock) { return; } StatusEffect val7 = HasZoneBuffTime(player); if (!((Object)(object)val7 != (Object)null)) { return; } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Shock"), ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 2.5f + ((Component)player).transform.right * 0.25f, Quaternion.LookRotation(((Character)player).GetLookDir())); float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; Vector3 val8 = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 4f; List list = new List(); list.Clear(); Character.GetCharactersInRange(val8, 4f, list); foreach (Character item in list) { if (BaseAI.IsEnemy((Character)(object)player, item) && VL_Utility.LOS_IsValid(item, val8, val8)) { Vector3 dir = ((Component)item).transform.position - ((Component)player).transform.position; HitData val9 = new HitData(); val9.m_damage.m_lightning = 15f + level2 + val7.m_ttl * Random.Range(0.03f, 0.06f) * (1f + 0.1f * level2) * VL_GlobalConfigs.c_enchanterBiomeShock; val9.m_pushForce = 0f; val9.m_point = item.GetEyePoint(); val9.m_dir = dir; val9.m_skill = ValheimLegends.AlterationSkill; item.Damage(val9); item.Stagger(val9.m_dir); } } if (((Object)val7).name == "SE_VL_BiomeSwamp") { SE_BiomeSwamp sE_BiomeSwamp = val7 as SE_BiomeSwamp; if ((Object)(object)sE_BiomeSwamp.biomeLight != (Object)null) { Object.Destroy((Object)(object)sE_BiomeSwamp.biomeLight); } } ((Character)player).GetSEMan().RemoveStatusEffect(val7, false); } } public static void Process_Input(Player player, ref float altitude) { //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0316: 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_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Invalid comparison between Unknown and I4 //IL_0d6d: Unknown result type (might be due to invalid IL or missing references) //IL_0d83: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Invalid comparison between Unknown and I4 //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Invalid comparison between Unknown and I4 //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_0ed2: Unknown result type (might be due to invalid IL or missing references) //IL_0ee3: Unknown result type (might be due to invalid IL or missing references) //IL_0eef: Unknown result type (might be due to invalid IL or missing references) //IL_0ef4: Unknown result type (might be due to invalid IL or missing references) //IL_0ef7: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Invalid comparison between Unknown and I4 //IL_0f2c: Unknown result type (might be due to invalid IL or missing references) //IL_0f2f: Unknown result type (might be due to invalid IL or missing references) //IL_0f39: Unknown result type (might be due to invalid IL or missing references) //IL_0f3e: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Invalid comparison between Unknown and I4 //IL_0f43: Unknown result type (might be due to invalid IL or missing references) //IL_0f54: Unknown result type (might be due to invalid IL or missing references) //IL_0f56: Unknown result type (might be due to invalid IL or missing references) //IL_0f25: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Invalid comparison between Unknown and I4 //IL_0cae: Unknown result type (might be due to invalid IL or missing references) //IL_0a76: Unknown result type (might be due to invalid IL or missing references) //IL_0a80: Invalid comparison between Unknown and I4 //IL_0f7b: Unknown result type (might be due to invalid IL or missing references) //IL_0f86: Unknown result type (might be due to invalid IL or missing references) //IL_0f9a: Unknown result type (might be due to invalid IL or missing references) //IL_0f9f: Unknown result type (might be due to invalid IL or missing references) //IL_0fa4: Unknown result type (might be due to invalid IL or missing references) //IL_0b7f: Unknown result type (might be due to invalid IL or missing references) //IL_0b86: Invalid comparison between Unknown and I4 //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_070d: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_1052: Unknown result type (might be due to invalid IL or missing references) //IL_1057: Unknown result type (might be due to invalid IL or missing references) //IL_1059: Unknown result type (might be due to invalid IL or missing references) //IL_105e: Unknown result type (might be due to invalid IL or missing references) //IL_10d5: Unknown result type (might be due to invalid IL or missing references) //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_0942: Unknown result type (might be due to invalid IL or missing references) //IL_0a46: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Unknown result type (might be due to invalid IL or missing references) //IL_0b4f: Unknown result type (might be due to invalid IL or missing references) //IL_0b54: Unknown result type (might be due to invalid IL or missing references) //IL_0c55: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) if (VL_Utility.Ability3_Input_Down && !zonechargeCharging) { StatusEffect val = HasZoneBuffTime(player); if ((Object)(object)val != (Object)null && val.m_ttl > 0f && QueuedAttack != EnchanterAttackType.Shock) { QueuedAttack = EnchanterAttackType.Shock; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; VL_Utility.RotatePlayerToTarget(player); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("unarmed_attack0"); } else if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD")) && !zonechargeCharging) { if (player.GetStamina() >= VL_Utility.GetZoneChargeCost) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level; player.StartEmote("challenge", true); ValheimLegends.isChanneling = true; ValheimLegends.shouldUseGuardianPower = false; StatusEffect val2 = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val2.m_ttl = VL_Utility.GetZoneChargeCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetZoneChargeCost); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ParticleTailField"), ((Component)player).transform.position, Quaternion.identity); zonechargeCharging = true; zonechargeChargeAmount = 0; zonechargeChargeAmountMax = Mathf.RoundToInt(15f * (1f - level * 0.005f)); zonechargeCount = 10f; zonechargeSkillGain += VL_Utility.GetZoneChargeSkillGain; } else { ((Character)player).Message((MessageType)1, "Not enough stamina to begin Zone Charge : (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetZoneChargeCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability3_Input_Pressed && player.GetStamina() > 1f && player.GetStamina() > VL_Utility.GetZoneChargeCostPerUpdate && Mathf.Max(0f, altitude - ((Component)player).transform.position.y) <= 1f && zonechargeCharging && ValheimLegends.isChanneling) { VL_Utility.SetTimer(); ValheimLegends.isChanneling = true; zonechargeChargeAmount++; ((Character)player).UseStamina(VL_Utility.GetZoneChargeCostPerUpdate); if (zonechargeChargeAmount >= zonechargeChargeAmountMax) { zonechargeCount += 2f; zonechargeChargeAmount = 0; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ParticleTailField"), ((Component)player).transform.position, Quaternion.identity); zonechargeSkillGain += 0.2f; } } else if ((VL_Utility.Ability3_Input_Up || player.GetStamina() <= 1f || player.GetStamina() <= VL_Utility.GetZoneChargeCostPerUpdate || Mathf.Max(0f, altitude - ((Component)player).transform.position.y) >= 1f) && zonechargeCharging && ValheimLegends.isChanneling) { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ParticleFieldBurst"), ((Component)player).transform.position, Quaternion.identity); List list = new List(); list.Clear(); Character.GetCharactersInRange(((Component)player).transform.position, 30f + 0.2f * level2, list); float num = (3f * level2 + 2f * zonechargeCount) * VL_GlobalConfigs.c_enchanterBiome; if ((int)player.GetCurrentBiome() == 1) { GameObject prefab = ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"); foreach (Character item in list) { SE_BiomeMeadows sE_BiomeMeadows = (SE_BiomeMeadows)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeMeadows)); ((StatusEffect)sE_BiomeMeadows).m_ttl = SE_BiomeMeadows.m_baseTTL + num; sE_BiomeMeadows.regenBonus = (1f + 0.1f * level2) * VL_GlobalConfigs.g_DamageModifer; sE_BiomeMeadows.doOnce = false; if (!BaseAI.IsEnemy(item, (Character)(object)player)) { if ((Object)(object)item == (Object)(object)Player.m_localPlayer) { item.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeMeadows, true, 0, 0f); } else if (item.IsPlayer()) { item.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeMeadows).name), true, 0, 0f); } else { item.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeMeadows, true, 0, 0f); } Object.Instantiate(prefab, item.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 8) { GameObject prefab2 = ZNetScene.instance.GetPrefab("fx_Potion_frostresist"); foreach (Character item2 in list) { SE_BiomeBlackForest sE_BiomeBlackForest = (SE_BiomeBlackForest)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeBlackForest)); ((StatusEffect)sE_BiomeBlackForest).m_ttl = SE_BiomeBlackForest.m_baseTTL + num; sE_BiomeBlackForest.carryModifier = 50f + level2; sE_BiomeBlackForest.doOnce = false; if (!BaseAI.IsEnemy(item2, (Character)(object)player)) { if ((Object)(object)item2 == (Object)(object)Player.m_localPlayer) { item2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeBlackForest, true, 0, 0f); } else if (item2.IsPlayer()) { item2.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeBlackForest).name), true, 0, 0f); } else { item2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeBlackForest, true, 0, 0f); } Object.Instantiate(prefab2, item2.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 2) { GameObject prefab3 = ZNetScene.instance.GetPrefab("vfx_Potion_health_medium"); foreach (Character item3 in list) { SE_BiomeSwamp sE_BiomeSwamp = (SE_BiomeSwamp)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeSwamp)); ((StatusEffect)sE_BiomeSwamp).m_ttl = SE_BiomeSwamp.m_baseTTL + num; sE_BiomeSwamp.resistModifier = 0.8f - 0.002f * level2; sE_BiomeSwamp.doOnce = false; if (!BaseAI.IsEnemy(item3, (Character)(object)player)) { if ((Object)(object)item3 == (Object)(object)Player.m_localPlayer) { item3.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeSwamp, true, 0, 0f); } else if (item3.IsPlayer()) { item3.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeSwamp).name), true, 0, 0f); } else { item3.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeSwamp, true, 0, 0f); } Object.Instantiate(prefab3, item3.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 4) { GameObject prefab4 = ZNetScene.instance.GetPrefab("fx_Potion_frostresist"); foreach (Character item4 in list) { SE_BiomeMountain sE_BiomeMountain = (SE_BiomeMountain)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeMountain)); ((StatusEffect)sE_BiomeMountain).m_ttl = SE_BiomeMountain.m_baseTTL + num; sE_BiomeMountain.resistModifier = 1f + 0.1f * level2; sE_BiomeMountain.staminaRegen = 5f + 0.075f * level2; sE_BiomeMountain.doOnce = false; if (!BaseAI.IsEnemy(item4, (Character)(object)player)) { if ((Object)(object)item4 == (Object)(object)Player.m_localPlayer) { item4.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeMountain, true, 0, 0f); } else if (item4.IsPlayer()) { item4.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeMountain).name), true, 0, 0f); } else { item4.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeMountain, true, 0, 0f); } Object.Instantiate(prefab4, item4.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 16) { GameObject prefab5 = ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"); foreach (Character item5 in list) { SE_BiomePlains sE_BiomePlains = (SE_BiomePlains)(object)ScriptableObject.CreateInstance(typeof(SE_BiomePlains)); ((StatusEffect)sE_BiomePlains).m_ttl = SE_BiomePlains.m_baseTTL + num; sE_BiomePlains.doOnce = false; if (!BaseAI.IsEnemy(item5, (Character)(object)player)) { if ((Object)(object)item5 == (Object)(object)Player.m_localPlayer) { item5.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomePlains, true, 0, 0f); } else if (item5.IsPlayer()) { item5.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomePlains).name), true, 0, 0f); } else { item5.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomePlains, true, 0, 0f); } Object.Instantiate(prefab5, item5.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 256) { GameObject prefab6 = ZNetScene.instance.GetPrefab("fx_Potion_frostresist"); foreach (Character item6 in list) { SE_BiomeOcean sE_BiomeOcean = (SE_BiomeOcean)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeOcean)); ((StatusEffect)sE_BiomeOcean).m_ttl = SE_BiomeOcean.m_baseTTL + num; sE_BiomeOcean.doOnce = false; if (!BaseAI.IsEnemy(item6, (Character)(object)player)) { if ((Object)(object)item6 == (Object)(object)Player.m_localPlayer) { item6.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeOcean, true, 0, 0f); } else if (item6.IsPlayer()) { item6.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeOcean).name), true, 0, 0f); } else { item6.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeOcean, true, 0, 0f); } Object.Instantiate(prefab6, item6.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 512) { GameObject prefab7 = ZNetScene.instance.GetPrefab("fx_Potion_frostresist"); foreach (Character item7 in list) { SE_BiomeMist sE_BiomeMist = (SE_BiomeMist)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeMist)); ((StatusEffect)sE_BiomeMist).m_ttl = SE_BiomeMist.m_baseTTL + num; sE_BiomeMist.doOnce = false; if (!BaseAI.IsEnemy(item7, (Character)(object)player)) { if ((Object)(object)item7 == (Object)(object)Player.m_localPlayer) { item7.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeMist, true, 0, 0f); } else if (item7.IsPlayer()) { item7.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeMist).name), true, 0, 0f); } else { item7.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeMist, true, 0, 0f); } Object.Instantiate(prefab7, item7.GetCenterPoint(), Quaternion.identity); } } } else if ((int)player.GetCurrentBiome() == 32) { GameObject prefab8 = ZNetScene.instance.GetPrefab("vfx_Potion_health_medium"); foreach (Character item8 in list) { SE_BiomeAsh sE_BiomeAsh = (SE_BiomeAsh)(object)ScriptableObject.CreateInstance(typeof(SE_BiomeAsh)); ((StatusEffect)sE_BiomeAsh).m_ttl = SE_BiomeAsh.m_baseTTL + num; sE_BiomeAsh.doOnce = false; if (!BaseAI.IsEnemy(item8, (Character)(object)player)) { if ((Object)(object)item8 == (Object)(object)Player.m_localPlayer) { item8.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeAsh, true, 0, 0f); } else if (item8.IsPlayer()) { item8.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_BiomeAsh).name), true, 0, 0f); } else { item8.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_BiomeAsh, true, 0, 0f); } Object.Instantiate(prefab8, item8.GetCenterPoint(), Quaternion.identity); } } } else { ZLog.Log((object)"Biome invalid."); } zonechargeCharging = false; zonechargeCount = 0f; zonechargeChargeAmount = 0; ValheimLegends.isChanneling = false; QueuedAttack = EnchanterAttackType.None; ((Character)player).RaiseSkill(ValheimLegends.AbjurationSkill, zonechargeSkillGain); zonechargeSkillGain = 0f; } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetCharmCost) { StatusEffect val3 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val3.m_ttl = VL_Utility.GetCharmCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetCharmCost); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; QueuedAttack = EnchanterAttackType.Charm; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("knife_stab0"); VL_Utility.RotatePlayerToTarget(player); ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetCharmSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Charm: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetCharmCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetWeakenCost) { ValheimLegends.shouldUseGuardianPower = false; float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; StatusEffect val4 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val4.m_ttl = VL_Utility.GetWeakenCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val4, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetWeakenCost + 0.5f * level3); ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("gpower"); RaycastHit val5 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val6 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val5, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val5)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val5)).point); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Weaken"), val6, Quaternion.identity); for (int num2 = 0; num2 < 4; num2++) { Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_WeakenStatus"), ((Component)player).transform.position + ((Component)player).transform.up * Random.Range(0.4f, 1.1f), Quaternion.identity); } SE_Weaken sE_Weaken = (SE_Weaken)(object)ScriptableObject.CreateInstance(typeof(SE_Weaken)); ((StatusEffect)sE_Weaken).m_ttl = SE_Weaken.m_baseTTL; sE_Weaken.damageReduction = (0.15f + 0.0015f * level3) * VL_GlobalConfigs.c_enchanterWeaken; sE_Weaken.speedReduction = 0.8f - 0.001f * level3; sE_Weaken.staminaDrain = (0.1f + 0.001f * level3) * VL_GlobalConfigs.c_enchanterWeaken; foreach (Character allCharacter in Character.GetAllCharacters()) { if (!BaseAI.IsEnemy((Character)(object)player, allCharacter)) { continue; } Vector3 val7 = ((Component)allCharacter).transform.position - val6; if (((Vector3)(ref val7)).magnitude <= 5f + 0.01f * level3) { if (allCharacter.IsPlayer()) { allCharacter.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_Weaken).name), true, 0, 0f); } else { allCharacter.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Weaken, true, 0, 0f); } } } ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetWeakenSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Weaken: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetWeakenCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Mage { public enum MageAttackType { IceDagger = 20, FlameNova = 60 } private static int Script_Layermask = LayerMask.GetMask(new string[8] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock" }); private static int ScriptChar_Layermask = LayerMask.GetMask(new string[11] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "character", "character_net", "character_ghost" }); private static GameObject GO_CastFX; private static GameObject GO_Fireball; private static Projectile P_Fireball; private static StatusEffect SE_Fireball; private static GameObject GO_Meteor; private static Projectile P_Meteor; private static StatusEffect SE_Meteor; private static bool meteorCharging = false; private static int meteorCount; private static int meteorChargeAmount; private static int meteorChargeAmountMax; private static float meteorSkillGain = 0f; public static MageAttackType QueuedAttack; public static void Execute_Attack(Player player) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if (QueuedAttack == MageAttackType.FlameNova) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_FlameBurst"), ((Component)player).transform.position, Quaternion.identity); foreach (Character allCharacter in Character.GetAllCharacters()) { if (BaseAI.IsEnemy((Character)(object)player, allCharacter)) { Vector3 val = ((Component)allCharacter).transform.position - ((Component)player).transform.position; if (((Vector3)(ref val)).magnitude <= 8f + 0.1f * level && VL_Utility.LOS_IsValid(allCharacter, ((Character)player).GetCenterPoint(), ((Component)player).transform.position + ((Component)player).transform.up * 0.2f)) { Vector3 dir = ((Component)allCharacter).transform.position - ((Component)player).transform.position; HitData val2 = new HitData(); val2.m_damage.m_fire = Random.Range(5f + 2.75f * level, 10f + 3.5f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageInferno; val2.m_pushForce = 0f; val2.m_point = allCharacter.GetEyePoint(); val2.m_dir = dir; val2.m_skill = ValheimLegends.EvocationSkill; allCharacter.Damage(val2); } } } GameCamera.instance.AddShake(((Component)player).transform.position, 15f, 2f, false); ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetFrostNovaSkillGain * 1.5f); } else if (QueuedAttack == MageAttackType.IceDagger) { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; Vector3 val3 = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.2f + ((Component)player).transform.up * 0.1f + ((Component)player).transform.right * 0.28f; GameObject val4 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_FrostDagger"), val3, Quaternion.identity); Projectile component = val4.GetComponent(); ((Object)component).name = "IceDagger"; component.m_respawnItemOnHit = false; component.m_spawnOnHit = null; component.m_ttl = 0.6f; ((Component)component).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val3)); val4.transform.localScale = Vector3.one * 0.8f; RaycastHit val5 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val6 = ((!Physics.Raycast(val3, ((Character)player).GetLookDir(), ref val5, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val5)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val5)).point); HitData val7 = new HitData(); val7.m_damage.m_pierce = Random.Range(2f + 0.25f * level2, 5f + 0.75f * level2) * VL_GlobalConfigs.c_mageFrostDagger * VL_GlobalConfigs.g_DamageModifer; val7.m_damage.m_frost = Random.Range(0.5f * level2, 2f + 1f * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageFrostDagger; val7.m_skill = ValheimLegends.EvocationSkill; val7.SetAttacker((Character)(object)player); Vector3 val8 = Vector3.MoveTowards(val4.transform.position, val6, 1f); component.Setup((Character)(object)player, (val8 - val4.transform.position) * 55f, -1f, val7, (ItemData)null, (ItemData)null); Traverse.Create((object)component).Field("m_skill").SetValue((object)ValheimLegends.EvocationSkill); val4 = null; } } public static void Process_Input(Player player, float altitude) { //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_08d9: Unknown result type (might be due to invalid IL or missing references) //IL_08fd: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Expected O, but got Unknown //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_0d32: Unknown result type (might be due to invalid IL or missing references) //IL_0d5d: Unknown result type (might be due to invalid IL or missing references) //IL_0d81: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Unknown result type (might be due to invalid IL or missing references) //IL_0d9b: Unknown result type (might be due to invalid IL or missing references) //IL_0da6: Unknown result type (might be due to invalid IL or missing references) //IL_0db0: Unknown result type (might be due to invalid IL or missing references) //IL_0db5: Unknown result type (might be due to invalid IL or missing references) //IL_0dbb: Unknown result type (might be due to invalid IL or missing references) //IL_0dc5: Unknown result type (might be due to invalid IL or missing references) //IL_0dca: Unknown result type (might be due to invalid IL or missing references) //IL_0dcf: Unknown result type (might be due to invalid IL or missing references) //IL_0de0: Unknown result type (might be due to invalid IL or missing references) //IL_0de7: Unknown result type (might be due to invalid IL or missing references) //IL_0dee: Unknown result type (might be due to invalid IL or missing references) //IL_0df5: Unknown result type (might be due to invalid IL or missing references) //IL_0dfa: Unknown result type (might be due to invalid IL or missing references) //IL_0e8d: Unknown result type (might be due to invalid IL or missing references) //IL_0e8f: Unknown result type (might be due to invalid IL or missing references) //IL_0e94: Unknown result type (might be due to invalid IL or missing references) //IL_0ea8: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Unknown result type (might be due to invalid IL or missing references) //IL_0ec5: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Unknown result type (might be due to invalid IL or missing references) //IL_0eca: Unknown result type (might be due to invalid IL or missing references) //IL_0c11: Unknown result type (might be due to invalid IL or missing references) //IL_0c34: Unknown result type (might be due to invalid IL or missing references) //IL_0ef9: Unknown result type (might be due to invalid IL or missing references) //IL_0efc: Unknown result type (might be due to invalid IL or missing references) //IL_0f06: Unknown result type (might be due to invalid IL or missing references) //IL_0f0b: Unknown result type (might be due to invalid IL or missing references) //IL_0f10: Unknown result type (might be due to invalid IL or missing references) //IL_0f12: Unknown result type (might be due to invalid IL or missing references) //IL_0f19: Expected O, but got Unknown //IL_0f99: Unknown result type (might be due to invalid IL or missing references) //IL_0f9e: Unknown result type (might be due to invalid IL or missing references) //IL_0fb5: Unknown result type (might be due to invalid IL or missing references) //IL_0fba: Unknown result type (might be due to invalid IL or missing references) //IL_0fc1: Unknown result type (might be due to invalid IL or missing references) //IL_0fc6: Unknown result type (might be due to invalid IL or missing references) //IL_0fce: Unknown result type (might be due to invalid IL or missing references) //IL_0fda: Unknown result type (might be due to invalid IL or missing references) //IL_0fdf: Unknown result type (might be due to invalid IL or missing references) //IL_0fe9: Unknown result type (might be due to invalid IL or missing references) //IL_1010: Unknown result type (might be due to invalid IL or missing references) //IL_1027: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Unknown result type (might be due to invalid IL or missing references) //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_0979: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_0ab4: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Unknown result type (might be due to invalid IL or missing references) //IL_09a8: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09d8: Unknown result type (might be due to invalid IL or missing references) //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_09e8: Unknown result type (might be due to invalid IL or missing references) //IL_09ed: Unknown result type (might be due to invalid IL or missing references) //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Expected O, but got Unknown //IL_0a39: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a45: Unknown result type (might be due to invalid IL or missing references) //IL_0a47: Unknown result type (might be due to invalid IL or missing references) //IL_0a4e: Unknown result type (might be due to invalid IL or missing references) //IL_0a53: Unknown result type (might be due to invalid IL or missing references) Random random = new Random(); if (VL_Utility.Ability3_Input_Down && !meteorCharging) { ValheimLegends.shouldUseGuardianPower = false; if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() >= VL_Utility.GetMeteorCost) { ValheimLegends.isChanneling = true; meteorSkillGain = 0f; StatusEffect val = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val.m_ttl = VL_Utility.GetMeteorCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetMeteorCost); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("gpower"); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Flames"), ((Component)player).transform.position, Quaternion.identity); meteorCharging = true; meteorChargeAmount = 0; meteorChargeAmountMax = Mathf.RoundToInt(60f * (1f - level / 200f)); meteorCount = 1; meteorSkillGain += VL_Utility.GetMeteorSkillGain; } else { ((Character)player).Message((MessageType)1, "Not enough stamina to begin Meteor : (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetMeteorCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability3_Input_Pressed && meteorCharging && player.GetStamina() > 1f && Mathf.Max(0f, altitude - ((Component)player).transform.position.y) <= 1f) { ValheimLegends.shouldUseGuardianPower = false; VL_Utility.SetTimer(); meteorChargeAmount++; ((Character)player).UseStamina(VL_Utility.GetMeteorCostPerUpdate); ValheimLegends.isChanneling = true; if (meteorChargeAmount >= meteorChargeAmountMax) { meteorCount++; meteorChargeAmount = 0; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("gpower"); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Flames"), ((Component)player).transform.position, Quaternion.identity); meteorSkillGain += 0.2f; } } else if ((VL_Utility.Ability3_Input_Up || player.GetStamina() <= 1f || Mathf.Max(0f, altitude - ((Component)player).transform.position.y) > 1f) && meteorCharging) { ValheimLegends.shouldUseGuardianPower = false; Vector3 val2 = ((Component)player).transform.position + ((Component)player).transform.up * 2f + ((Character)player).GetLookDir() * 1f; GameObject prefab = ZNetScene.instance.GetPrefab("projectile_meteor"); meteorCharging = false; float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; for (int num = 0; num < meteorCount; num++) { GO_Meteor = Object.Instantiate(prefab, new Vector3(val2.x + (float)random.Next(-100, 100), val2.y + 250f, val2.z + (float)random.Next(-100, 100)), Quaternion.identity); P_Meteor = GO_Meteor.GetComponent(); ((Object)P_Meteor).name = "Meteor" + num; P_Meteor.m_respawnItemOnHit = false; P_Meteor.m_spawnOnHit = null; P_Meteor.m_ttl = 6f; P_Meteor.m_gravity = 0f; P_Meteor.m_rayRadius = 0.1f; P_Meteor.m_aoe = 8f + 0.04f * level2; ((Component)P_Meteor).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val2)); GO_Meteor.transform.localScale = Vector3.zero; RaycastHit val3 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val4 = ((!Physics.Raycast(val2, ((Character)player).GetLookDir(), ref val3, 1000f, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val3)).point); val4.x += random.Next(-8, 8); val4.y += random.Next(-8, 8); val4.z += random.Next(-8, 8); HitData val5 = new HitData(); val5.m_damage.m_fire = Random.Range(30f + 0.5f * level2, 50f + level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageMeteor; val5.m_damage.m_blunt = Random.Range(15f + 0.25f * level2, 30f + 0.5f * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageMeteor; val5.m_pushForce = 10f; val5.SetAttacker((Character)(object)player); val5.m_skill = ValheimLegends.EvocationSkill; Vector3 val6 = Vector3.MoveTowards(GO_Meteor.transform.position, val4, 1f); P_Meteor.Setup((Character)(object)player, (val6 - GO_Meteor.transform.position) * Random.Range(78f, 86f), -1f, val5, (ItemData)null, (ItemData)null); Traverse.Create((object)P_Meteor).Field("m_skill").SetValue((object)ValheimLegends.EvocationSkill); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_guardstone_permitted_removed"), ((Component)player).transform.position + ((Component)player).transform.right * Random.Range(-1f, 1f) + ((Component)player).transform.up * Random.Range(0f, 1.5f), Quaternion.identity); } meteorCount = 0; meteorChargeAmount = 0; GO_Meteor = null; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, meteorSkillGain); meteorSkillGain = 0f; ValheimLegends.isChanneling = false; } else if (VL_Utility.Ability2_Input_Down) { ValheimLegends.shouldUseGuardianPower = false; if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (((Character)player).IsBlocking()) { ValheimLegends.shouldUseGuardianPower = false; if (player.GetStamina() >= VL_Utility.GetFrostNovaCost * 2f) { StatusEffect val7 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val7.m_ttl = VL_Utility.GetFrostNovaCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val7, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetFrostNovaCost * 2f); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("swing_sledge"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; QueuedAttack = MageAttackType.FlameNova; } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Inferno: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetFrostNovaCost * 2f + ")", 0, (Sprite)null); } } else if (player.GetStamina() >= VL_Utility.GetFrostNovaCost) { StatusEffect val8 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val8.m_ttl = VL_Utility.GetFrostNovaCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val8, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetFrostNovaCost); float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("swing_axe1"); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_guardstone_activate"), ((Component)player).transform.position, Quaternion.identity); if (((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("Burning"))) { ((Character)player).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("Burning"), false); } foreach (Character allCharacter in Character.GetAllCharacters()) { if (BaseAI.IsEnemy((Character)(object)player, allCharacter)) { Vector3 val9 = ((Component)allCharacter).transform.position - ((Component)player).transform.position; if (((Vector3)(ref val9)).magnitude <= 10f + 0.1f * level3 && VL_Utility.LOS_IsValid(allCharacter, ((Character)player).GetCenterPoint(), ((Component)player).transform.position + ((Component)player).transform.up * 0.15f)) { Vector3 dir = ((Component)allCharacter).transform.position - ((Component)player).transform.position; HitData val10 = new HitData(); val10.m_damage.m_frost = Random.Range(10f + 0.5f * level3, 20f + level3) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageFrostNova; val10.m_pushForce = 20f; val10.m_point = allCharacter.GetEyePoint(); val10.m_dir = dir; val10.m_skill = ValheimLegends.EvocationSkill; allCharacter.Damage(val10); SE_Slow sE_Slow = (SE_Slow)(object)ScriptableObject.CreateInstance(typeof(SE_Slow)); allCharacter.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_Slow).name), true, 0, 0f); } } } ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetFrostNovaSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Frost Nova: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetFrostNovaCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { ValheimLegends.shouldUseGuardianPower = false; if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { float level4 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; if (((Character)player).IsBlocking()) { if (player.GetStamina() >= VL_Utility.GetFireballCost * 0.5f) { ValheimLegends.shouldUseGuardianPower = false; StatusEffect val11 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val11.m_ttl = 0.5f; ((Character)player).GetSEMan().AddStatusEffect(val11, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetFireballCost * 0.5f); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("swing_axe2"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; QueuedAttack = MageAttackType.IceDagger; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetFireballSkillGain * 0.5f); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Ice Dagger: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetFireballCost * 0.5f + ")", 0, (Sprite)null); } } else if (player.GetStamina() >= VL_Utility.GetFireballCost + 0.5f * level4) { StatusEffect val12 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val12.m_ttl = VL_Utility.GetFireballCooldownTime - 0.02f * level4; ((Character)player).GetSEMan().AddStatusEffect(val12, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetFireballCost + 0.5f * level4); ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("gpower"); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetSpeed(3f); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Flames"), ((Component)player).transform.position, Quaternion.identity); Vector3 val13 = ((Component)player).transform.position + ((Component)player).transform.up * 2.5f + ((Character)player).GetLookDir() * 0.5f; GO_Fireball = Object.Instantiate(ZNetScene.instance.GetPrefab("Imp_fireball_projectile"), new Vector3(val13.x, val13.y, val13.z), Quaternion.identity); P_Fireball = GO_Fireball.GetComponent(); ((Object)P_Fireball).name = "Fireball"; P_Fireball.m_respawnItemOnHit = false; P_Fireball.m_spawnOnHit = null; P_Fireball.m_ttl = 60f; P_Fireball.m_gravity = 2.5f; P_Fireball.m_rayRadius = 0.1f; P_Fireball.m_aoe = 3f + 0.03f * level4; ((Component)P_Fireball).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val13)); GO_Fireball.transform.localScale = Vector3.zero; RaycastHit val14 = default(RaycastHit); Vector3 position2 = ((Component)player).transform.position; Vector3 val15 = ((!Physics.Raycast(val13, ((Character)player).GetLookDir(), ref val14, float.PositiveInfinity, Script_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val14)).collider)) ? (position2 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val14)).point); HitData val16 = new HitData(); val16.m_damage.m_fire = Random.Range(5f + 1.6f * level4, 10f + 1.8f * level4) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageFireball; val16.m_damage.m_blunt = Random.Range(5f + 0.9f * level4, 10f + 1.1f * level4) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_mageFireball; val16.m_pushForce = 2f; val16.m_skill = ValheimLegends.EvocationSkill; val16.SetAttacker((Character)(object)player); Vector3 val17 = Vector3.MoveTowards(GO_Fireball.transform.position, val15, 1f); P_Fireball.Setup((Character)(object)player, (val17 - GO_Fireball.transform.position) * 25f, -1f, val16, (ItemData)null, (ItemData)null); Traverse.Create((object)P_Fireball).Field("m_skill").SetValue((object)ValheimLegends.EvocationSkill); GO_Fireball = null; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetFireballSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to for Fireball: (" + player.GetStamina().ToString("#.#") + "/" + (VL_Utility.GetFireballCost + 0.5f * level4) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Metavoker { public enum MetavokerAttackType { ForceWave = 0x10 } private static int Warp_Layermask = LayerMask.GetMask(new string[12] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "Water", "character", "character_net", "character_ghost" }); private static int Light_Layermask = LayerMask.GetMask(new string[11] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "character", "character_net", "character_ghost" }); private static int SafeFall_Layermask = LayerMask.GetMask(new string[9] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "Water" }); private static GameObject GO_Light; private static Projectile P_Light; private static float warpCount; private static float warpDistance; private static int warpGrowthTrigger; public static MetavokerAttackType QueuedAttack; public static void Execute_Attack(Player player, ref Rigidbody playerBody, ref float altitude) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) if (QueuedAttack != MetavokerAttackType.ForceWave) { return; } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ForceWall"), ((Character)player).GetEyePoint(), Quaternion.LookRotation(((Character)player).GetLookDir())); List list = new List(); list.Clear(); Vector3 val = ((Character)player).GetCenterPoint() + ((Component)player).transform.forward * 6f; Character.GetCharactersInRange(val, 6f, list); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; List list2 = Object.FindObjectsOfType().ToList(); if (list2 != null && list2.Count > 0) { foreach (Projectile item in list2) { if (Vector3.Distance(((Component)item).transform.position, val) <= 6f) { item.m_ttl = 0.05f; string text = ((Object)item).name.Substring(0, ((Object)item).name.IndexOf('(')); GameObject prefab = ZNetScene.instance.GetPrefab(text); if ((Object)(object)prefab != (Object)null) { GameObject obj = Object.Instantiate(prefab, ((Component)item).transform.position, Quaternion.identity); Projectile component = obj.GetComponent(); ((Object)component).name = "DupeProj"; component.m_respawnItemOnHit = false; component.m_spawnOnHit = null; component.m_ttl = 4f; ((Component)component).transform.localRotation = Quaternion.LookRotation(((Component)item).transform.forward * -1f); obj.transform.localScale = ((Component)item).transform.localScale; HitData val2 = new HitData(); val2.m_damage = item.m_damage; val2.SetAttacker((Character)(object)player); val2.m_skill = ValheimLegends.EvocationSkill; component.Setup((Character)(object)player, item.GetVelocity() * -1f, -1f, val2, (ItemData)null, (ItemData)null); Traverse.Create((object)component).Field("m_skill").SetValue((object)ValheimLegends.EvocationSkill); } } } } foreach (Character item2 in list) { if (!BaseAI.IsEnemy((Character)(object)player, item2) || !VL_Utility.LOS_IsValid(item2, ((Character)player).GetCenterPoint(), ((Component)player).transform.position)) { continue; } Vector3 val3 = ((Component)item2).transform.position - ((Component)player).transform.position; float magnitude = ((Vector3)(ref val3)).magnitude; Rigidbody value = Traverse.Create((object)item2).Field("m_body").GetValue(); if ((Object)(object)value != (Object)null) { float mass = value.mass; if (Random.value * (1f - mass / 100f) > 0.5f) { item2.Stagger(val3); } mass *= 0.02f; Vector3 val4 = val3 * ((15f - magnitude) / mass) + new Vector3(0f, Mathf.Clamp(3f / mass, 1f, 5f), 0f); val4 *= VL_GlobalConfigs.c_metavokerBonusForceWave; Traverse.Create((object)item2).Field("m_pushForce").SetValue((object)val4); HitData val5 = new HitData(); val5.m_damage.m_damage = magnitude * Random.Range(0.75f, 1.25f) * (1f + 0.02f * level) * VL_GlobalConfigs.c_metavokerBonusForceWave; val5.m_point = item2.GetEyePoint(); val5.m_dir = val3; val5.m_skill = ValheimLegends.EvocationSkill; item2.Damage(val5); } } } public static void Process_Input(Player player, ref float altitude, ref Rigidbody playerBody) { //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d5d: Unknown result type (might be due to invalid IL or missing references) //IL_0d62: Unknown result type (might be due to invalid IL or missing references) //IL_0d67: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Unknown result type (might be due to invalid IL or missing references) //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09ba: Unknown result type (might be due to invalid IL or missing references) //IL_09bf: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_0dbf: Unknown result type (might be due to invalid IL or missing references) //IL_0dc6: Expected O, but got Unknown //IL_0dc8: Unknown result type (might be due to invalid IL or missing references) //IL_0dcd: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0de8: Unknown result type (might be due to invalid IL or missing references) //IL_0ded: Unknown result type (might be due to invalid IL or missing references) //IL_0df8: Unknown result type (might be due to invalid IL or missing references) //IL_0e02: Unknown result type (might be due to invalid IL or missing references) //IL_0e07: Unknown result type (might be due to invalid IL or missing references) //IL_0e0c: Unknown result type (might be due to invalid IL or missing references) //IL_0e1d: Unknown result type (might be due to invalid IL or missing references) //IL_0e1f: Unknown result type (might be due to invalid IL or missing references) //IL_0e7c: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Unknown result type (might be due to invalid IL or missing references) //IL_0e83: Unknown result type (might be due to invalid IL or missing references) //IL_0e94: Unknown result type (might be due to invalid IL or missing references) //IL_0ea0: Unknown result type (might be due to invalid IL or missing references) //IL_0eac: Unknown result type (might be due to invalid IL or missing references) //IL_0eb1: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0eba: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_10bb: Unknown result type (might be due to invalid IL or missing references) //IL_10c6: Unknown result type (might be due to invalid IL or missing references) //IL_10d0: Unknown result type (might be due to invalid IL or missing references) //IL_10d5: Unknown result type (might be due to invalid IL or missing references) //IL_10e0: Unknown result type (might be due to invalid IL or missing references) //IL_10ea: Unknown result type (might be due to invalid IL or missing references) //IL_10ef: Unknown result type (might be due to invalid IL or missing references) //IL_10f4: Unknown result type (might be due to invalid IL or missing references) //IL_1105: Unknown result type (might be due to invalid IL or missing references) //IL_1107: Unknown result type (might be due to invalid IL or missing references) //IL_1121: Unknown result type (might be due to invalid IL or missing references) //IL_1123: Unknown result type (might be due to invalid IL or missing references) //IL_118f: Unknown result type (might be due to invalid IL or missing references) //IL_1191: Unknown result type (might be due to invalid IL or missing references) //IL_1196: Unknown result type (might be due to invalid IL or missing references) //IL_11aa: Unknown result type (might be due to invalid IL or missing references) //IL_11b6: Unknown result type (might be due to invalid IL or missing references) //IL_11c2: Unknown result type (might be due to invalid IL or missing references) //IL_11c7: Unknown result type (might be due to invalid IL or missing references) //IL_11c9: Unknown result type (might be due to invalid IL or missing references) //IL_11cc: Unknown result type (might be due to invalid IL or missing references) //IL_0ee9: Unknown result type (might be due to invalid IL or missing references) //IL_0eec: Unknown result type (might be due to invalid IL or missing references) //IL_0ef6: Unknown result type (might be due to invalid IL or missing references) //IL_0efb: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_11fb: Unknown result type (might be due to invalid IL or missing references) //IL_11fe: Unknown result type (might be due to invalid IL or missing references) //IL_1208: Unknown result type (might be due to invalid IL or missing references) //IL_120d: Unknown result type (might be due to invalid IL or missing references) //IL_0f00: Unknown result type (might be due to invalid IL or missing references) //IL_0f9e: Unknown result type (might be due to invalid IL or missing references) //IL_0fa3: Unknown result type (might be due to invalid IL or missing references) //IL_0faa: Unknown result type (might be due to invalid IL or missing references) //IL_0faf: Unknown result type (might be due to invalid IL or missing references) //IL_0fb3: Unknown result type (might be due to invalid IL or missing references) //IL_0fbc: Unknown result type (might be due to invalid IL or missing references) //IL_0fc1: Unknown result type (might be due to invalid IL or missing references) //IL_0fcb: Unknown result type (might be due to invalid IL or missing references) //IL_0fed: Unknown result type (might be due to invalid IL or missing references) //IL_0ee2: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_1212: Unknown result type (might be due to invalid IL or missing references) //IL_1214: Unknown result type (might be due to invalid IL or missing references) //IL_121b: Expected O, but got Unknown //IL_121d: Unknown result type (might be due to invalid IL or missing references) //IL_1222: Unknown result type (might be due to invalid IL or missing references) //IL_1231: Unknown result type (might be due to invalid IL or missing references) //IL_1236: Unknown result type (might be due to invalid IL or missing references) //IL_123d: Unknown result type (might be due to invalid IL or missing references) //IL_1249: Unknown result type (might be due to invalid IL or missing references) //IL_1270: Unknown result type (might be due to invalid IL or missing references) //IL_1281: Unknown result type (might be due to invalid IL or missing references) //IL_11f4: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0733: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_0cbf: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0757: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Unknown result type (might be due to invalid IL or missing references) //IL_0762: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Expected O, but got Unknown //IL_07b2: Unknown result type (might be due to invalid IL or missing references) //IL_07b7: Unknown result type (might be due to invalid IL or missing references) //IL_07c5: Unknown result type (might be due to invalid IL or missing references) //IL_07d0: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07e6: Unknown result type (might be due to invalid IL or missing references) //IL_0a3a: Unknown result type (might be due to invalid IL or missing references) //IL_0a45: Unknown result type (might be due to invalid IL or missing references) //IL_0a4a: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0af5: Unknown result type (might be due to invalid IL or missing references) //IL_0afa: Unknown result type (might be due to invalid IL or missing references) //IL_0b1e: Unknown result type (might be due to invalid IL or missing references) //IL_0b27: Unknown result type (might be due to invalid IL or missing references) //IL_0b2c: Unknown result type (might be due to invalid IL or missing references) //IL_0b94: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Unknown result type (might be due to invalid IL or missing references) //IL_0c10: Unknown result type (might be due to invalid IL or missing references) //IL_0c7f: Unknown result type (might be due to invalid IL or missing references) //IL_0c8b: Unknown result type (might be due to invalid IL or missing references) //IL_0c95: Unknown result type (might be due to invalid IL or missing references) //IL_0c9a: Unknown result type (might be due to invalid IL or missing references) //IL_0c9f: Unknown result type (might be due to invalid IL or missing references) if (((Character)player).IsBlocking() && ZInput.GetButtonDown("Attack") && !((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD")) && player.GetStamina() >= VL_Utility.GetForceWaveCost) { StatusEffect val = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val.m_ttl = VL_Utility.GetForceWaveCooldown; ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetForceWaveCost); VL_Utility.RotatePlayerToTarget(player); ((MonoBehaviour)(ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).StopAllCoroutines(); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("battleaxe_attack2"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; QueuedAttack = MetavokerAttackType.ForceWave; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetForceWaveSkillGain); } if ((Object)(object)P_Light != (Object)null) { ((Component)P_Light).transform.position = ((Character)player).GetEyePoint() + ((Component)player).transform.up * 0.4f + ((Component)player).transform.right * -0.8f; } if (ZInput.GetButton("Jump") && !((Character)player).IsOnGround() && !((Character)player).IsDead() && !((Character)player).InAttack() && !((Character)player).IsEncumbered() && !((Character)player).InDodge() && !((Character)player).IsKnockedBack()) { Vector3 velocity = playerBody.velocity; if (velocity.y < 0f) { bool flag = true; if (!((Character)player).HaveStamina(1f)) { if (((Character)player).IsPlayer()) { Hud.instance.StaminaBarEmptyFlash(); } flag = false; } if (flag) { ((Character)player).UseStamina(0.6f * VL_GlobalConfigs.c_metavokerBonusSafeFallCost); RaycastHit val2 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; if (Physics.Raycast(position, new Vector3(0f, -1f, 0f), ref val2, float.PositiveInfinity, SafeFall_Layermask) && Object.op_Implicit((Object)(object)((RaycastHit)(ref val2)).collider)) { _ = ((RaycastHit)(ref val2)).point; } else { _ = position + ((Component)player).transform.up * -1000f; } float y = ((RaycastHit)(ref val2)).point.y; float num = altitude - y; float num2 = Mathf.Clamp(-0.15f * velocity.y, 0f, 1.5f); float num3 = num2 / (0f - velocity.y); float num4 = num * num3; playerBody.velocity = velocity + new Vector3(0f, num2, 0f); altitude -= num4; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ReverseLightburst"), ((Component)player).transform.position, Quaternion.LookRotation(new Vector3(0f, 1f, 0f))); } } } Vector3 splash_alternate; if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { ValheimLegends.shouldUseGuardianPower = false; if (player.GetStamina() >= VL_Utility.GetWarpCost && !ValheimLegends.isChanneling) { StatusEffect val3 = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val3.m_ttl = VL_Utility.GetWarpCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetWarpCost); VL_Utility.RotatePlayerToTarget(player); player.StartEmote("point", true); ValheimLegends.isChanneling = true; warpDistance = 15f; warpGrowthTrigger = 10; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetWarpSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to initiate Warp: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetWarpCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability3_Input_Pressed && player.GetStamina() > VL_Utility.GetWarpCostPerUpdate && ValheimLegends.isChanneling && Mathf.Max(0f, altitude - ((Component)player).transform.position.y) <= 2f) { VL_Utility.SetTimer(); warpCount += 1f; ((Character)player).UseStamina(VL_Utility.GetWarpCostPerUpdate); ValheimLegends.isChanneling = true; if (warpCount >= (float)warpGrowthTrigger) { warpCount = 0f; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ParticleLightSuction"), ((Component)player).transform.position, Quaternion.identity); ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, 0.06f); warpDistance += 5f; } } else if ((VL_Utility.Ability3_Input_Up || player.GetStamina() <= VL_Utility.GetWarpCostPerUpdate || player.GetStamina() <= 2f) && ValheimLegends.isChanneling) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; warpDistance = warpDistance * (1f + 0.01f * level) * VL_GlobalConfigs.c_metavokerWarpDistance; ValheimLegends.isChanneling = false; RaycastHit val4 = default(RaycastHit); Vector3 eyePoint = ((Character)player).GetEyePoint(); Vector3 val5 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val4, float.PositiveInfinity, Warp_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val4)).collider)) ? (eyePoint + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val4)).point); Vector3.MoveTowards(eyePoint, val5, 1f); splash_alternate = ((RaycastHit)(ref val4)).point - eyePoint; float magnitude = ((Vector3)(ref splash_alternate)).magnitude; splash_alternate = warpDistance * ((Character)player).GetLookDir(); float num5 = ((Vector3)(ref splash_alternate)).magnitude; float num6 = 0f; if (num5 > magnitude) { num6 = num5 - magnitude; num5 = magnitude; } bool flag2 = num5 >= 140f; Vector3 val6 = Vector3.MoveTowards(((Component)player).transform.position, val5, num5); Vector3 val7 = val6 + ((Character)player).GetLookDir() * -10f; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ParticleLightburst"), ((Character)player).GetEyePoint(), Quaternion.LookRotation(((Character)player).GetLookDir())); if (num5 > 0f) { Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ForwardLightningShock"), val7, Quaternion.LookRotation(((Character)player).GetLookDir())); List list = new List(); list.Clear(); Character.GetCharactersInRange(val6, 8f + 0.02f * level, list); bool flag3 = false; foreach (Character item in list) { if (BaseAI.IsEnemy((Character)(object)player, item)) { Vector3 position2 = ((Component)player).transform.position; splash_alternate = default(Vector3); if (VL_Utility.LOS_IsValid(item, position2, splash_alternate)) { _ = ((Component)item).transform.position - ((Component)player).transform.position; HitData val8 = new HitData(); val8.m_damage.m_lightning = Random.Range(num6 * (level / 15f), num6 * (level / 10f)) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_metavokerWarpDamage; val8.m_pushForce = (num6 + level) * 0.1f; val8.m_point = item.GetEyePoint(); val8.m_dir = ((Component)item).transform.position - ((Component)player).transform.position; val8.m_skill = ValheimLegends.EvocationSkill; item.Damage(val8); flag3 = true; } } } if (!flag3 && !flag2) { float num7 = num6 * 1.5f; ((Character)player).AddStamina(num7); } } if (flag2) { if (num5 >= 200f) { ((Character)player).TeleportTo(val6, ((Component)player).transform.rotation, true); } else { ((Character)player).TeleportTo(val6, ((Component)player).transform.rotation, false); } } else { playerBody.position = val6; } altitude = 0f; } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetReplicaCost) { Vector3 lookDir = ((Character)player).GetLookDir(); lookDir.y = 0f; ((Component)player).transform.rotation = Quaternion.LookRotation(lookDir); ValheimLegends.shouldUseGuardianPower = false; StatusEffect val9 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val9.m_ttl = VL_Utility.GetReplicaCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val9, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetReplicaCost); float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.IllusionSkillDef)).m_level; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("gpower"); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Replica"), ((Component)player).transform.position + ((Component)player).transform.up * 0.6f, Quaternion.identity); List list2 = new List(); foreach (Character allCharacter in Character.GetAllCharacters()) { if (!allCharacter.IsBoss()) { list2.Add(allCharacter); } } for (int num8 = 0; num8 < list2.Count; num8++) { Character val10 = list2[num8]; if (!BaseAI.IsEnemy((Character)(object)player, val10)) { continue; } splash_alternate = ((Component)val10).transform.position - ((Component)player).transform.position; if (!(((Vector3)(ref splash_alternate)).magnitude <= 18f + 0.05f * level2)) { continue; } string text = ((Object)val10).name.Substring(0, ((Object)val10).name.IndexOf('(')); GameObject prefab = ZNetScene.instance.GetPrefab(text); if ((Object)(object)prefab != (Object)null) { if ((Object)(object)prefab.GetComponent() == (Object)null) { prefab.AddComponent(); } prefab.GetComponent().m_timeoutMin = 8f + 0.2f * level2; prefab.GetComponent().m_timeoutMax = 8f + 0.2f * level2; Vector3 position3 = ((Component)val10).transform.position; position3.x += 5f * Random.Range(-1f, 1f); GameObject obj = Object.Instantiate(prefab, position3, Quaternion.Inverse(((Component)val10).transform.rotation)); CharacterTimedDestruction component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.m_timeoutMin = 8f + 0.2f * level2; component.m_timeoutMax = component.m_timeoutMin; component.Trigger(); } Character component2 = obj.GetComponent(); component2.SetMaxHealth(1f + level2); ((Component)component2).transform.localScale = 0.8f * Vector3.one; SE_Companion sE_Companion = (SE_Companion)(object)ScriptableObject.CreateInstance(typeof(SE_Companion)); ((StatusEffect)sE_Companion).m_ttl = 8f + 0.2f * level2; sE_Companion.damageModifier = 0.05f + 0.0075f * level2 * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_metavokerReplica; sE_Companion.summoner = player; component2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Companion, false, 0, 0f); component2.m_faction = (Faction)0; CharacterDrop component3 = ((Component)component2).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.m_drops.Clear(); } ((Object)component2).name = "VL_" + ((Object)component2).name; component2.m_name = "(" + component2.m_name + ")"; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ReplicaCreate"), ((Component)component2).transform.position + ((Component)component2).transform.up * 0.2f, Quaternion.identity); } } ((Character)player).RaiseSkill(ValheimLegends.IllusionSkill, VL_Utility.GetReplicaSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to create illusions: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetReplicaCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if ((Object)(object)P_Light != (Object)null) { splash_alternate = ((Component)P_Light).transform.position - ((Character)player).GetEyePoint(); if (((Vector3)(ref splash_alternate)).magnitude < 2f) { float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.IllusionSkillDef)).m_level; P_Light.m_ttl = 0.05f; HitData val11 = new HitData(); val11.m_skill = ValheimLegends.EvocationSkill; Vector3 val12 = ((Character)player).GetEyePoint() + ((Component)player).transform.up * 0.5f + ((Component)player).transform.right * -1f; GameObject val13 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_Light"), val12, Quaternion.identity); Projectile component4 = val13.GetComponent(); component4.m_respawnItemOnHit = false; component4.m_spawnOnHit = null; component4.m_ttl = 5f; component4.m_gravity = 0.25f; component4.m_rayRadius = 0.1f; component4.m_aoe = 4f + 0.04f * level3; ((Component)component4).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val12)); val13.transform.localScale = Vector3.zero; RaycastHit val14 = default(RaycastHit); Vector3 position4 = ((Component)player).transform.position; Vector3 val15 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val14, float.PositiveInfinity, Light_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val14)).collider)) ? (position4 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val14)).point); val11.m_damage.m_lightning = Random.Range(5f + 0.3f * level3, 10f + 0.6f * level3) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_meteavokerLight; val11.m_damage.m_pierce = Random.Range(5f + 0.3f * level3, 10f + 0.6f * level3) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_meteavokerLight; val11.m_pushForce = (100f + 2f * level3) * VL_GlobalConfigs.c_meteavokerLight; val11.SetAttacker((Character)(object)player); Vector3 val16 = Vector3.MoveTowards(val13.transform.position, val15, 1f); component4.Setup((Character)(object)player, (val16 - val13.transform.position) * 80f, -1f, val11, (ItemData)null, (ItemData)null); Traverse.Create((object)component4).Field("m_skill").SetValue((object)ValheimLegends.IllusionSkill); val13 = null; GO_Light = null; return; } } if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetLightCost) { StatusEffect val17 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val17.m_ttl = VL_Utility.GetLightCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val17, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetLightCost); _ = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.IllusionSkillDef)).m_level; player.StartEmote("cheer", true); VL_Utility.SetTimer(); Vector3 val18 = ((Character)player).GetEyePoint() + ((Component)player).transform.up * 0.4f + ((Component)player).transform.right * -0.8f; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Lightburst"), val18, Quaternion.identity); GO_Light = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_Light"), val18, Quaternion.identity); P_Light = GO_Light.GetComponent(); P_Light.m_respawnItemOnHit = false; P_Light.m_spawnOnHit = null; P_Light.m_ttl = 300f; P_Light.m_gravity = 0f; P_Light.m_rayRadius = 0.1f; ((Component)P_Light).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val18)); GO_Light.transform.localScale = Vector3.zero; RaycastHit val19 = default(RaycastHit); Vector3 position5 = ((Component)player).transform.position; Vector3 val20 = ((!Physics.Raycast(val18, ((Character)player).GetLookDir(), ref val19, float.PositiveInfinity, Light_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val19)).collider)) ? (position5 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val19)).point); HitData val21 = new HitData(); val21.m_skill = ValheimLegends.EvocationSkill; Vector3.MoveTowards(GO_Light.transform.position, val20, 1f); P_Light.Setup((Character)(object)player, Vector3.zero, -1f, val21, (ItemData)null, (ItemData)null); Traverse.Create((object)P_Light).Field("m_skill").SetValue((object)ValheimLegends.IllusionSkill); ((Character)player).RaiseSkill(ValheimLegends.IllusionSkill, VL_Utility.GetLightSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to for Light: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetLightCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Monk { public enum MonkAttackType { MeteorPunch = 12, MeteorSlam = 13, FlyingKick = 1, FlyingKickStart = 8, Surge = 20, Psibolt = 15 } private static int Script_Solidmask = LayerMask.GetMask(new string[8] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock" }); private static int Script_Layermask = LayerMask.GetMask(new string[11] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "character", "character_noenv", "character_trigger", "character_net", "character_ghost" }); private static int ScriptChar_Layermask = LayerMask.GetMask(new string[14] { "Default", "static_solid", "Default_small", "piece_nonsolid", "piece", "terrain", "vehicle", "viewblock", "character", "character_noenv", "character_trigger", "character_net", "character_ghost", "Water" }); public static MonkAttackType QueuedAttack; private static int fkickCount; private static int fkickCountMax; private static Vector3 kickDir; private static List kicklist; public static bool PlayerIsUnarmed { get { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 Player localPlayer = Player.m_localPlayer; if (((Humanoid)localPlayer).GetCurrentWeapon() != null) { ItemData value = Traverse.Create((object)localPlayer).Field("m_leftItem").GetValue(); SharedData shared = ((Humanoid)localPlayer).GetCurrentWeapon().m_shared; if (shared != null && ((int)shared.m_skillType == 11 || (int)shared.m_attachOverride == 12) && value == null) { return true; } } return false; } } public static void Impact_Effect(Player player, float altitude) { //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) List allCharacters = Character.GetAllCharacters(); ValheimLegends.shouldValkyrieImpact = false; foreach (Character item in allCharacters) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; if (!BaseAI.IsEnemy((Character)(object)player, item)) { continue; } Vector3 splash_alternate = ((Component)item).transform.position - ((Component)player).transform.position; if (((Vector3)(ref splash_alternate)).magnitude <= 6f + 0.03f * level) { Vector3 position = ((Component)player).transform.position; splash_alternate = default(Vector3); if (VL_Utility.LOS_IsValid(item, position, splash_alternate)) { Vector3 dir = ((Component)item).transform.position - ((Component)player).transform.position; HitData val = new HitData(); val.m_damage.m_blunt = 5f + 3f * altitude + Random.Range(1f * level, 2f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_monkChiSlam; val.m_pushForce = 20f * VL_GlobalConfigs.g_DamageModifer; val.m_point = item.GetEyePoint(); val.m_dir = dir; val.m_skill = ValheimLegends.DisciplineSkill; item.Damage(val); } } } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_MeteorSlam"), ((Component)player).transform.position + ((Component)player).transform.up * 0.2f, Quaternion.identity); } public static void Execute_Attack(Player player, ref Rigidbody playerBody, ref float altitude) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_0800: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0853: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Expected O, but got Unknown //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06bd: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_0707: Unknown result type (might be due to invalid IL or missing references) //IL_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0b63: Unknown result type (might be due to invalid IL or missing references) //IL_0b6a: Unknown result type (might be due to invalid IL or missing references) //IL_0886: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Unknown result type (might be due to invalid IL or missing references) //IL_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08ca: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Unknown result type (might be due to invalid IL or missing references) //IL_095f: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_098c: Unknown result type (might be due to invalid IL or missing references) //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_0ba5: Unknown result type (might be due to invalid IL or missing references) //IL_0bac: Unknown result type (might be due to invalid IL or missing references) //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0b80: Unknown result type (might be due to invalid IL or missing references) //IL_0906: Unknown result type (might be due to invalid IL or missing references) //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Unknown result type (might be due to invalid IL or missing references) //IL_08fa: Unknown result type (might be due to invalid IL or missing references) //IL_09ba: Unknown result type (might be due to invalid IL or missing references) //IL_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_0bed: Unknown result type (might be due to invalid IL or missing references) //IL_0bf2: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Unknown result type (might be due to invalid IL or missing references) //IL_0c7b: Unknown result type (might be due to invalid IL or missing references) //IL_0c09: Unknown result type (might be due to invalid IL or missing references) //IL_0c0f: Unknown result type (might be due to invalid IL or missing references) //IL_0bdf: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0a09: Unknown result type (might be due to invalid IL or missing references) //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a17: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09d1: Unknown result type (might be due to invalid IL or missing references) //IL_09d8: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_0e19: Unknown result type (might be due to invalid IL or missing references) //IL_0e21: Unknown result type (might be due to invalid IL or missing references) //IL_0e2b: Unknown result type (might be due to invalid IL or missing references) //IL_0e30: Unknown result type (might be due to invalid IL or missing references) //IL_0e3b: Unknown result type (might be due to invalid IL or missing references) //IL_0e40: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0ca0: Unknown result type (might be due to invalid IL or missing references) //IL_09f2: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0e77: Unknown result type (might be due to invalid IL or missing references) //IL_0e94: Unknown result type (might be due to invalid IL or missing references) //IL_0e9b: Unknown result type (might be due to invalid IL or missing references) //IL_0eaf: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0a3d: Unknown result type (might be due to invalid IL or missing references) //IL_0a44: Expected O, but got Unknown //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a51: Unknown result type (might be due to invalid IL or missing references) //IL_0a73: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0a92: Unknown result type (might be due to invalid IL or missing references) //IL_0a97: Unknown result type (might be due to invalid IL or missing references) //IL_0a99: Unknown result type (might be due to invalid IL or missing references) //IL_0a9e: Unknown result type (might be due to invalid IL or missing references) //IL_0aa5: Unknown result type (might be due to invalid IL or missing references) //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0ab6: Unknown result type (might be due to invalid IL or missing references) //IL_0ac1: Unknown result type (might be due to invalid IL or missing references) //IL_0ce2: Unknown result type (might be due to invalid IL or missing references) //IL_0ce7: Unknown result type (might be due to invalid IL or missing references) //IL_0d2a: Unknown result type (might be due to invalid IL or missing references) //IL_0d31: Expected O, but got Unknown //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b12: Unknown result type (might be due to invalid IL or missing references) //IL_0d4f: Unknown result type (might be due to invalid IL or missing references) //IL_0d56: Expected O, but got Unknown //IL_0d5e: Unknown result type (might be due to invalid IL or missing references) //IL_0d63: Unknown result type (might be due to invalid IL or missing references) //IL_0d83: Unknown result type (might be due to invalid IL or missing references) //IL_0d85: Unknown result type (might be due to invalid IL or missing references) //IL_0d98: Unknown result type (might be due to invalid IL or missing references) //IL_0da0: Unknown result type (might be due to invalid IL or missing references) //IL_0da5: Unknown result type (might be due to invalid IL or missing references) //IL_0daa: Unknown result type (might be due to invalid IL or missing references) //IL_0db1: Unknown result type (might be due to invalid IL or missing references) //IL_0db6: Unknown result type (might be due to invalid IL or missing references) //IL_0dd9: Unknown result type (might be due to invalid IL or missing references) //IL_0dde: Unknown result type (might be due to invalid IL or missing references) //IL_0df8: Unknown result type (might be due to invalid IL or missing references) //IL_0dfa: Unknown result type (might be due to invalid IL or missing references) if (QueuedAttack == MonkAttackType.MeteorPunch) { Vector3 val = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.2f + ((Component)player).transform.up * -0.4f + ((Component)player).transform.right * -0.4f; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Shockwave"), val, Quaternion.LookRotation(((Component)player).transform.forward)); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ReverseLightburst"), val, Quaternion.LookRotation(((Component)player).transform.forward)); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; RaycastHit val2 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; if (Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val2, float.PositiveInfinity, ScriptChar_Layermask) && Object.op_Implicit((Object)(object)((RaycastHit)(ref val2)).collider)) { _ = ((RaycastHit)(ref val2)).point; } else { _ = position + ((Character)player).GetLookDir() * 1000f; } Physics.SphereCast(((Character)player).GetEyePoint(), 0.1f, ((Character)player).GetLookDir(), ref val2, 4f, ScriptChar_Layermask); if (!((Object)(object)((RaycastHit)(ref val2)).collider != (Object)null) || !((Object)(object)((Component)((RaycastHit)(ref val2)).collider).gameObject != (Object)null)) { return; } Character val3 = null; ((Component)((RaycastHit)(ref val2)).collider).gameObject.TryGetComponent(ref val3); bool flag = (Object)(object)val3 != (Object)null; if ((Object)(object)val3 == (Object)null) { val3 = (Character)((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent(typeof(Character)); flag = (Object)(object)val3 != (Object)null; if ((Object)(object)val3 == (Object)null) { val3 = ((Component)((RaycastHit)(ref val2)).collider).GetComponentInChildren(); flag = (Object)(object)val3 != (Object)null; } } List list = new List(); list.Clear(); Character.GetCharactersInRange(val + ((Component)player).transform.forward * 2f, 2.5f, list); if (flag && !val3.IsPlayer()) { list.Add(val3); } { foreach (Character item in list) { if (BaseAI.IsEnemy((Character)(object)player, item)) { Vector3 dir = ((Component)item).transform.position - ((Component)player).transform.position; HitData val4 = new HitData(); val4.m_damage.m_blunt = Random.Range(12f + 0.5f * level, 24f + 1f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_monkChiPunch; val4.m_pushForce = 45f + 0.5f * level; val4.m_point = item.GetEyePoint(); val4.m_dir = dir; val4.m_skill = ValheimLegends.DisciplineSkill; item.Damage(val4); } } return; } } if (QueuedAttack == MonkAttackType.MeteorSlam) { Rigidbody obj = playerBody; obj.velocity += new Vector3(0f, -8f, 0f); for (int num = 0; num < 4; num++) { Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ReverseLightburst"), ((Component)player).transform.position + ((Component)player).transform.up * Random.Range(0f, 0.5f) + ((Component)player).transform.right * Random.Range(-0.3f, 0.3f), Quaternion.LookRotation(new Vector3(0f, -1f, 0f))); } Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_perfectblock"), ((Character)player).GetCenterPoint(), Quaternion.identity); } else if (QueuedAttack == MonkAttackType.Surge) { ((SE_Monk)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk"))).surging = true; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_Potion_frostresist"), ((Component)player).transform.position, Quaternion.identity); ValheimLegends.isChanneling = false; } else if (QueuedAttack == MonkAttackType.Psibolt) { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; SE_Monk sE_Monk = (SE_Monk)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk")); Vector3 val5 = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.4f + ((Component)player).transform.up * 0.1f + ((Component)player).transform.right * 0.22f; GameObject val6 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_PsiBolt"), val5, Quaternion.identity); Projectile component = val6.GetComponent(); ((Object)component).name = "PsiBolt"; component.m_respawnItemOnHit = false; component.m_spawnOnHit = null; component.m_ttl = 12f; component.m_rayRadius = 0.01f; ((Component)component).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val5)); val6.transform.localScale = Vector3.one; RaycastHit val7 = default(RaycastHit); Vector3 position2 = ((Component)player).transform.position; Vector3 val8 = ((!Physics.Raycast(val5, ((Character)player).GetLookDir(), ref val7, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val7)).collider)) ? (position2 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val7)).point); HitData val9 = new HitData(); val9.m_damage.m_slash = Random.Range(1f + 0.2f * level2, 4f + 0.4f * level2) * (float)sE_Monk.hitCount * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_monkChiBlast; val9.m_damage.m_spirit = Random.Range(0.2f * level2, 1f + 0.2f * level2) * (float)sE_Monk.hitCount * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_monkChiBlast; val9.m_skill = ValheimLegends.DisciplineSkill; val9.SetAttacker((Character)(object)player); Vector3 val10 = Vector3.MoveTowards(val6.transform.position, val8, 1f); component.Setup((Character)(object)player, (val10 - val6.transform.position) * 60f, -1f, val9, (ItemData)null, (ItemData)null); Traverse.Create((object)component).Field("m_skill").SetValue((object)ValheimLegends.DisciplineSkill); sE_Monk.hitCount = 0; val6 = null; } else { if (QueuedAttack != MonkAttackType.FlyingKick && QueuedAttack != MonkAttackType.FlyingKickStart) { return; } float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; float num2 = 0.5f + level3 * 0.005f * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_monkFlyingKick; SE_Monk sE_Monk2 = (SE_Monk)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk")); Vector3 lookDir = ((Character)player).GetLookDir(); lookDir.y = 0f; ((Component)player).transform.rotation = Quaternion.AngleAxis((float)(40 * fkickCount), ((Component)player).transform.up) * Quaternion.LookRotation(kickDir); Vector3 val11 = default(Vector3); Vector3 val12 = kickDir; Vector3 position3 = ((Component)player).transform.position; Vector3 val13 = ((Component)player).transform.position; Vector3 val14 = ((Component)player).transform.position + ((Component)player).transform.forward * 0.2f + ((Component)player).transform.up * 0.7f; val13.y += 0.1f; int num3; for (num3 = 0; num3 <= 1; num3++) { RaycastHit val15 = default(RaycastHit); bool flag2 = false; for (int num4 = 0; num4 <= 10; num4++) { Vector3 val16 = Vector3.MoveTowards(((Component)player).transform.position, ((Component)player).transform.position + val12 * 100f, (float)num3 + (float)num4 * 0.1f); val16.y = val13.y; if (val16.y < ZoneSystem.instance.GetGroundHeight(val16)) { val13.y = ZoneSystem.instance.GetGroundHeight(val16) + 1f; val16.y = val13.y; } flag2 = Physics.SphereCast(val16, 0.05f, val12, ref val15, float.PositiveInfinity, ScriptChar_Layermask); if (flag2 && Object.op_Implicit((Object)(object)((RaycastHit)(ref val15)).collider)) { val11 = ((RaycastHit)(ref val15)).point; break; } } position3 = Vector3.MoveTowards(((Component)player).transform.position, ((Component)player).transform.position + val12 * 100f, (float)num3 * 0.6f); position3.y = ((ZoneSystem.instance.GetSolidHeight(position3) - ZoneSystem.instance.GetGroundHeight(position3) <= 1f) ? ZoneSystem.instance.GetSolidHeight(position3) : ZoneSystem.instance.GetGroundHeight(position3)); if (flag2 && Vector3.Distance(new Vector3(position3.x, val13.y, position3.z), val11) <= 1.5f) { val13 = Vector3.MoveTowards(val11, val13, 1f); break; } ((Vector3)(ref val13))..ctor(position3.x, val13.y, position3.z); foreach (Character allCharacter in Character.GetAllCharacters()) { HitData val17 = new HitData(); val17.m_damage = ((Humanoid)player).GetCurrentWeapon().GetDamage(); val17.ApplyModifier(Random.Range(0.8f, 1.2f) * num2); val17.m_point = allCharacter.GetCenterPoint(); val17.m_pushForce = 4f; val17.m_dir = ((Component)allCharacter).transform.position - position3; val17.m_skill = ValheimLegends.DisciplineSkill; float num5 = Vector3.Distance(((Component)allCharacter).transform.position, ((Component)player).transform.position); if (BaseAI.IsEnemy(allCharacter, (Character)(object)player) && num5 <= 2.5f && !kicklist.Contains(((Object)allCharacter).GetInstanceID())) { allCharacter.Damage(val17); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_HeavyCrit"), allCharacter.GetCenterPoint(), Quaternion.identity); kicklist.Add(((Object)allCharacter).GetInstanceID()); } } } if (num3 > 10 && ZoneSystem.instance.GetSolidHeight(val13) - val13.y <= 2f) { val13.y = ZoneSystem.instance.GetSolidHeight(val13); } if ((float)fkickCount <= (float)fkickCountMax * 0.4f) { RaycastHit val18 = default(RaycastHit); if (Physics.Raycast(((Character)player).GetEyePoint(), ((Component)player).transform.up, ref val18, 1f, Script_Solidmask) && Object.op_Implicit((Object)(object)((RaycastHit)(ref val18)).collider)) { _ = ((RaycastHit)(ref val18)).point; } else { _ = ((Component)player).transform.position + Vector3.up * 10f; } if (Vector3.Distance(((RaycastHit)(ref val18)).point, ((Character)player).GetEyePoint()) > 0.8f) { val13.y += 0.15f; } else { val13.y -= 0.18f; } } if (fkickCount % 3 == 0) { kicklist.Clear(); } if (fkickCount < fkickCountMax) { fkickCount++; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; } playerBody.position = val13; bool flag3 = false; if (fkickCount >= 9) { RaycastHit val19 = default(RaycastHit); if (Physics.SphereCast(val13, 0.05f, val12, ref val19, 1f, ScriptChar_Layermask) && Object.op_Implicit((Object)(object)((RaycastHit)(ref val19)).collider) && (Object)(object)((Component)((RaycastHit)(ref val19)).collider).gameObject != (Object)null) { val11 = ((RaycastHit)(ref val19)).point; Character val20 = null; ((Component)((RaycastHit)(ref val19)).collider).gameObject.TryGetComponent(ref val20); flag3 = (Object)(object)val20 != (Object)null; if ((Object)(object)val20 == (Object)null) { val20 = (Character)((Component)((RaycastHit)(ref val19)).collider).GetComponentInParent(typeof(Character)); flag3 = (Object)(object)val20 != (Object)null; } if (flag3 && BaseAI.IsEnemy(val20, (Character)(object)player)) { HitData val21 = new HitData(); val21.m_damage = ((Humanoid)player).GetCurrentWeapon().GetDamage(); val21.ApplyModifier(Random.Range(1f, 1.5f) * num2); val21.m_point = val11; val21.m_pushForce = 10f; val21.m_dir = val11 - ((Component)player).transform.position; val21.m_skill = ValheimLegends.DisciplineSkill; val20.Damage(val21); Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_perfectblock"), val11, Quaternion.identity); } else { flag3 = false; } } } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ChiPulse"), val14 + ((Component)player).transform.up * 0.2f, Quaternion.LookRotation(((Component)player).transform.forward)); QueuedAttack = MonkAttackType.FlyingKick; if (flag3) { VL_Utility.RotatePlayerToTarget(player); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("jump"); val12.y = 0f; playerBody.velocity = val12 * -1.5f + new Vector3(0f, 10f, 0f); ValheimLegends.isChargingDash = false; sE_Monk2.hitCount += 2; } altitude = 0f; } } public static void Process_Input(Player player, ref Rigidbody playerBody, ref float altitude, ref Animator anim) { //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) SE_Monk sE_Monk = (SE_Monk)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk")); if (VL_Utility.Ability3_Input_Down) { if (PlayerIsUnarmed) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (sE_Monk.hitCount >= 1) { StatusEffect val = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val.m_ttl = VL_Utility.GetPsiBoltCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); if (((Character)player).IsBlocking()) { player.StartEmote("challenge", true); QueuedAttack = MonkAttackType.Surge; ValheimLegends.isChanneling = true; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; } else { VL_Utility.RotatePlayerToTarget(player); _ = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("swing_axe2"); QueuedAttack = MonkAttackType.Psibolt; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; } ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetPsiBoltSkillGain * (float)sE_Monk.hitCount); } else { ((Character)player).Message((MessageType)1, "Not enough energy for Chi Blast : (" + sE_Monk.hitCount.ToString("#") + "/" + VL_Utility.GetPsiBoltCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Must be unarmed to use this ability", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (PlayerIsUnarmed) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetFlyingKickCost) { StatusEffect val2 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val2.m_ttl = VL_Utility.GetFlyingKickCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetFlyingKickCost); _ = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("unarmed_kick"); QueuedAttack = MonkAttackType.FlyingKickStart; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; kickDir = new Vector3(((Character)player).GetLookDir().x, 0f, ((Character)player).GetLookDir().z); fkickCount = 0; fkickCountMax = 18; kicklist = new List(); kicklist.Clear(); ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetFlyingKickSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Flying Kick: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetFlyingKickCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Must be unarmed to use this ability", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if (PlayerIsUnarmed) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if ((float)sE_Monk.hitCount >= VL_Utility.GetMeteorPunchCost) { VL_Utility.RotatePlayerToTarget(player); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; StatusEffect val3 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val3.m_ttl = VL_Utility.GetMeteorPunchCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); ((Character)player).AddStamina(10f + 0.3f * level); sE_Monk.hitCount -= Mathf.RoundToInt(VL_Utility.GetMeteorPunchCost); if (((Character)player).IsOnGround() || ((Component)player).transform.position.y - ZoneSystem.instance.GetSolidHeight(((Component)player).transform.position) < 2f) { ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("unarmed_attack1"); QueuedAttack = MonkAttackType.MeteorPunch; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; } else { ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("battleaxe_attack2"); QueuedAttack = MonkAttackType.MeteorSlam; ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; ValheimLegends.shouldValkyrieImpact = true; } ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetMeteorPunchSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough energy for Chi Strike: (" + sE_Monk.hitCount.ToString("#") + "/" + VL_Utility.GetMeteorPunchCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Must be unarmed to use this ability", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Priest { private static int Layermask = LayerMask.GetMask(new string[12] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "character", "character_net", "character_ghost", "Water" }); private static GameObject GO_CastFX; private static GameObject GO_Sanctify; private static Projectile P_Sanctify; private static bool healCharging = false; private static int healCount; private static int healChargeAmount; private static int healChargeAmountMax; private static float healSkillGain = 0f; public static void PurgeStatus_NearbyPlayers(Player healer, float radius, List effectNames) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (effectNames == null || effectNames.Count <= 0) { return; } List list = new List(); list.Clear(); Character.GetCharactersInRange(((Component)healer).transform.position, radius, list); foreach (Character item in list) { if (BaseAI.IsEnemy(item, (Character)(object)healer)) { continue; } foreach (string effectName in effectNames) { if (item.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode(effectName))) { item.GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode(effectName), false); break; } } } } public static void HealNearbyPlayers(Player healer, float radius, float amount) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) List list = new List(); list.Clear(); Character.GetCharactersInRange(((Component)healer).transform.position, radius, list); foreach (Character item in list) { if (!BaseAI.IsEnemy(item, (Character)(object)healer)) { item.Heal(amount, true); } } } public static void Process_Input(Player player, ref float altitude) { //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0836: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_0853: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Unknown result type (might be due to invalid IL or missing references) //IL_0862: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_087a: Unknown result type (might be due to invalid IL or missing references) //IL_090c: Unknown result type (might be due to invalid IL or missing references) //IL_0916: Unknown result type (might be due to invalid IL or missing references) //IL_091d: Expected O, but got Unknown //IL_09de: Unknown result type (might be due to invalid IL or missing references) //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Expected O, but got Unknown //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) new Random(); if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() >= VL_Utility.GetHealCost) { ValheimLegends.isChanneling = true; StatusEffect val = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val.m_ttl = VL_Utility.GetHealCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetHealCost); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("gpower"); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_HealPulse"), ((Character)player).GetCenterPoint(), Quaternion.identity); healCharging = true; healChargeAmount = 0; healChargeAmountMax = 60; List list = new List(); list.Clear(); list.Add("Burning"); list.Add("Poison"); list.Add("Frost"); list.Add("Wet"); list.Add("Smoked"); PurgeStatus_NearbyPlayers(player, 30f + 0.2f * level, list); HealNearbyPlayers(player, 30f + 0.2f * level, (10f + level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestHeal); ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetHealSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to begin heal : (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetHealCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability3_Input_Pressed && healCharging && player.GetStamina() > VL_Utility.GetHealCostPerUpdate && Mathf.Max(0f, altitude - ((Component)player).transform.position.y) <= 1f) { healChargeAmount++; ((Character)player).UseStamina(VL_Utility.GetHealCostPerUpdate); ValheimLegends.isChanneling = true; VL_Utility.SetTimer(); if (healChargeAmount >= healChargeAmountMax) { healCount++; healChargeAmount = 0; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("gpower"); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_HealPulse"), ((Character)player).GetCenterPoint(), Quaternion.identity); float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; HealNearbyPlayers(player, 20f + 0.2f * level2, ((float)healCount + level2 * 0.3f) * 2f * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestHeal); ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetHealSkillGain * 0.5f); } } else if ((VL_Utility.Ability3_Input_Up || player.GetStamina() <= VL_Utility.GetHealCostPerUpdate || Mathf.Max(0f, altitude - ((Component)player).transform.position.y) > 1f) && healCharging) { healCount = 0; healChargeAmount = 0; healCharging = false; ValheimLegends.isChanneling = false; } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetPurgeCost) { ValheimLegends.shouldUseGuardianPower = false; float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; float level4 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; StatusEffect val2 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val2.m_ttl = VL_Utility.GetPurgeCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetPurgeCost); player.StartEmote("challenge", true); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Purge"), ((Character)player).GetCenterPoint(), Quaternion.identity); HealNearbyPlayers(player, 20f + 0.2f * level4, 0.5f + Random.Range(0.4f, 0.6f) * level4 * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestPurgeHeal); List list2 = new List(); list2.Clear(); Character.GetCharactersInRange(((Component)player).transform.position, 20f + 0.2f * level3, list2); foreach (Character item in list2) { if (BaseAI.IsEnemy((Character)(object)player, item) && VL_Utility.LOS_IsValid(item, ((Character)player).GetCenterPoint(), ((Component)player).transform.position)) { _ = ((Component)item).transform.position - ((Component)player).transform.position; HitData val3 = new HitData(); val3.m_damage.m_spirit = Random.Range(4f + 0.4f * level3, 8f + 0.8f * level3) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestPurgeDamage; val3.m_damage.m_fire = Random.Range(4f + 0.4f * level3, 8f + 0.8f * level3) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestPurgeDamage; val3.m_pushForce = 0f; val3.m_point = item.GetEyePoint(); val3.m_dir = ((Component)player).transform.position - ((Component)item).transform.position; val3.m_skill = ValheimLegends.EvocationSkill; item.Damage(val3); } } ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetPurgeSkillGain * 0.5f); ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetPurgeSkillGain * 0.5f); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to for Purge: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetPurgeCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetSanctifyCost) { StatusEffect val4 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val4.m_ttl = VL_Utility.GetSanctifyCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val4, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetSanctifyCost); float level5 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("battleaxe_attack0"); RaycastHit val5 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val6 = ((!Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val5, float.PositiveInfinity, Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val5)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val5)).point) + ((Component)player).transform.up * 12f; GO_Sanctify = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_SanctifyHammer"), val6, Quaternion.identity); P_Sanctify = GO_Sanctify.GetComponent(); ((Object)P_Sanctify).name = "Sanctify"; P_Sanctify.m_respawnItemOnHit = false; P_Sanctify.m_spawnOnHit = null; P_Sanctify.m_ttl = 30f; P_Sanctify.m_gravity = 9f; P_Sanctify.m_rayRadius = 1f; P_Sanctify.m_aoe = 8f + 0.04f * level5; GO_Sanctify.transform.localScale = Vector3.one; HitData val7 = new HitData(); val7.m_damage.m_fire = Random.Range(10f + 0.5f * level5, 20f + 0.75f * level5) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestSanctify; val7.m_damage.m_blunt = Random.Range(10f + 0.5f * level5, 20f + 0.75f * level5) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestSanctify; val7.m_damage.m_spirit = Random.Range(10f + 0.5f * level5, 20f + 0.75f * level5) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_priestSanctify; val7.SetAttacker((Character)(object)player); val7.m_pushForce = 50f; val7.m_skill = ValheimLegends.EvocationSkill; P_Sanctify.Setup((Character)(object)player, new Vector3(0f, -1f, 0f), -1f, val7, (ItemData)null, (ItemData)null); Traverse.Create((object)P_Sanctify).Field("m_skill").SetValue((object)ValheimLegends.EvocationSkill); GO_Sanctify = null; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetSanctifySkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Sanctify: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetSanctifyCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Ranger { public static float powershot_damagebonus_base = 1.4f; public static float powershot_damagebonus_scaling = 0.015f; public static int powershot_charges_base = 3; public static float powershot_charges_scaling = 0.05f; public static float powershot_velocitybonus_base = 1.2f; private static int Script_Layermask = LayerMask.GetMask(new string[8] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock" }); public static GameObject GO_Wolf; public static void Process_Input(Player player) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) new Random(); Vector3 val = default(Vector3); if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() >= VL_Utility.GetPowerShotCost(player)) { StatusEffect val2 = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val2.m_ttl = VL_Utility.GetPowerShotCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetPowerShotCost(player)); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_crit"), ((Character)player).GetCenterPoint(), Quaternion.identity); int num = (int)((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; SE_PowerShot sE_PowerShot = (SE_PowerShot)(object)ScriptableObject.CreateInstance(typeof(SE_PowerShot)); ((StatusEffect)sE_PowerShot).m_ttl = SE_PowerShot.m_baseTTL + (float)Mathf.RoundToInt(powershot_damagebonus_scaling * (float)num); sE_PowerShot.damageBonus = powershot_damagebonus_base + powershot_damagebonus_scaling * (float)num * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_rangerPowerShot; sE_PowerShot.hitCount = Mathf.RoundToInt((float)powershot_charges_base + powershot_charges_scaling * (float)num); ((StatusEffect)sE_PowerShot).m_tooltip = $"Increases damage of next {sE_PowerShot.hitCount} projectiles by {(int)((sE_PowerShot.damageBonus - 1f) * 100f)}%"; if (((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_PowerShot"))) { StatusEffect statusEffect = ((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_PowerShot")); ((Character)player).GetSEMan().RemoveStatusEffect(statusEffect, false); } ((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_PowerShot, false, 0, 0f); ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetPowerShotSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Power Shot: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetPowerShotCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetSummonWolfCost(player)) { StatusEffect val3 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val3.m_ttl = VL_Utility.GetSummonWolfCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.ConjurationSkillDef)).m_level; ((Character)player).UseStamina(VL_Utility.GetSummonWolfCost(player)); player.StartEmote("cheer", true); val = ((Component)player).transform.position + ((Component)player).transform.forward * 4f; GameObject prefab = ZNetScene.instance.GetPrefab("VL_ShadowWolf"); prefab.GetComponent().m_timeoutMin = 600f; prefab.GetComponent().m_timeoutMin = 600f; GO_Wolf = Object.Instantiate(prefab, val, Quaternion.identity); Character component = GO_Wolf.GetComponent(); component.m_name = "Shadow Wolf"; Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"), ((Component)component).transform.position, Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_WishbonePing"), ((Component)component).transform.position, Quaternion.identity); if ((Object)(object)component != (Object)null) { component.m_faction = (Faction)0; component.SetTamed(true); float num2 = 50f + 10f * level; component.SetMaxHealth(num2); component.SetHealth(num2); ((Component)component).transform.localScale = (0.5f + 0.015f * level) * Vector3.one; component.m_swimSpeed *= 2f; CharacterTimedDestruction component2 = GO_Wolf.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.m_timeoutMin = 600f; component2.m_timeoutMax = component2.m_timeoutMin; component2.Trigger(); } SE_Companion sE_Companion = (SE_Companion)(object)ScriptableObject.CreateInstance(typeof(SE_Companion)); ((StatusEffect)sE_Companion).m_ttl = SE_Companion.m_baseTTL; sE_Companion.damageModifier = (0.05f + 0.01f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_rangerShadowWolf; sE_Companion.healthRegen = 1f + 0.1f * level; sE_Companion.speedModifier = 1.2f; sE_Companion.damageTakenModifier = Mathf.Clamp(0.8f - level * 0.006f, 0.5f, 0.8f); sE_Companion.summoner = player; BaseAI baseAI = component.GetBaseAI(); ((MonsterAI)((baseAI is MonsterAI) ? baseAI : null)).SetFollowTarget(((Component)player).gameObject); component.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Companion, false, 0, 0f); } ((Character)player).RaiseSkill(ValheimLegends.ConjurationSkill, VL_Utility.GetSummonWolfSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to Summon Wolf: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetSummonWolfCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { if (!VL_Utility.Ability1_Input_Down) { return; } if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetShadowStalkCost(player)) { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; StatusEffect val4 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val4.m_ttl = VL_Utility.GetShadowStalkCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val4, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetShadowStalkCost(player)); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_odin_despawn"), ((Component)player).transform.position, Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_wraith_death"), ((Component)player).transform.position, Quaternion.identity); SE_ShadowStalk sE_ShadowStalk = (SE_ShadowStalk)(object)ScriptableObject.CreateInstance(typeof(SE_ShadowStalk)); ((StatusEffect)sE_ShadowStalk).m_ttl = SE_ShadowStalk.m_baseTTL * (1f + 0.02f * level2); sE_ShadowStalk.speedAmount = 1.5f + 0.01f * level2 * VL_GlobalConfigs.c_rangerShadowStalk; sE_ShadowStalk.speedDuration = 3f + 0.03f * level2; ((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_ShadowStalk, false, 0, 0f); List list = new List(); list.Clear(); Character.GetCharactersInRange(((Character)player).GetCenterPoint(), 500f, list); foreach (Character item in list) { if ((Object)(object)item.GetBaseAI() != (Object)null && item.GetBaseAI() is MonsterAI && item.GetBaseAI().IsEnemy((Character)(object)player)) { BaseAI baseAI2 = item.GetBaseAI(); MonsterAI val5 = (MonsterAI)(object)((baseAI2 is MonsterAI) ? baseAI2 : null); if ((Object)(object)val5 != (Object)null && (Object)(object)((BaseAI)val5).GetTargetCreature() == (Object)(object)player) { Traverse.Create((object)val5).Field("m_alerted").SetValue((object)false); Traverse.Create((object)val5).Field("m_targetCreature").SetValue((object)null); } } } ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetShadowStalkSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Shadow Stalk: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetShadowStalkCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } } } public class Class_Rogue { private static int ScriptChar_Layermask = LayerMask.GetMask(new string[14] { "character", "character_noenv", "character_trigger", "character_net", "character_ghost", "Default", "static_solid", "Default_small", "piece_nonsolid", "piece", "terrain", "vehicle", "viewblock", "Water" }); public static Vector3 fadePoint; public static Quaternion fadeRotation; public static Vector3 backstabPoint; public static Vector3 backstabVector; public static bool throwDagger = false; public static bool canDoubleJump = true; public static bool canGainTrick = false; public static bool PlayerUsingDaggerOnly { get { Player localPlayer = Player.m_localPlayer; if (((Humanoid)localPlayer).GetCurrentWeapon() != null) { SharedData shared = ((Humanoid)localPlayer).GetCurrentWeapon().m_shared; ItemData value = Traverse.Create((object)localPlayer).Field("m_leftItem").GetValue(); if (shared != null && (shared.m_name.ToLower().Contains("knife") || shared.m_name.Contains("dagger")) && value == null) { return true; } } return false; } } public static void Execute_Throw(Player player) { //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_035d: 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_0046: 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_0055: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_009e: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) if (!throwDagger) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; Vector3 val = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.2f + ((Component)player).transform.up * 0.3f + ((Component)player).transform.right * 0.28f; GameObject val2 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_PoisonBomb"), val, Quaternion.identity); GameObject prefab = ZNetScene.instance.GetPrefab("VL_PoisonBombExplosion"); Aoe componentInChildren = prefab.gameObject.GetComponentInChildren(); componentInChildren.m_damage.m_poison = (10f + 2f * level) * VL_GlobalConfigs.c_roguePoisonBomb; componentInChildren.m_ttl = 4f + 0.1f * level; componentInChildren.m_hitInterval = 0.5f; Projectile component = val2.GetComponent(); ((Object)component).name = "Poison Bomb"; component.m_respawnItemOnHit = false; component.m_spawnOnHit = null; component.m_ttl = 10f; ((Component)component).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val)); component.m_spawnOnHit = prefab; val2.transform.localScale = Vector3.one * 0.5f; RaycastHit val3 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; Vector3 val4 = ((!Physics.Raycast(val, ((Character)player).GetLookDir(), ref val3, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val3)).collider)) ? (position + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val3)).point); HitData val5 = new HitData(); val5.m_skill = ValheimLegends.AlterationSkill; val5.SetAttacker((Character)(object)player); Vector3 val6 = Vector3.MoveTowards(val2.transform.position, val4, 1f); component.Setup((Character)(object)player, (val6 - val2.transform.position) * 25f, -1f, val5, (ItemData)null, (ItemData)null); Traverse.Create((object)component).Field("m_skill").SetValue((object)ValheimLegends.AlterationSkill); val2 = null; } else { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; Vector3 val7 = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.2f + ((Component)player).transform.up * 0.3f + ((Component)player).transform.right * 0.28f; GameObject val8 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_ThrowingKnife"), val7, Quaternion.identity); Projectile component2 = val8.GetComponent(); ((Object)component2).name = "ThrowingKnife"; component2.m_respawnItemOnHit = false; component2.m_spawnOnHit = null; component2.m_ttl = 10f; ((Component)component2).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val7)); val8.transform.localScale = Vector3.one * 0.2f; RaycastHit val9 = default(RaycastHit); Vector3 position2 = ((Component)player).transform.position; Vector3 val10 = ((!Physics.Raycast(val7, ((Character)player).GetLookDir(), ref val9, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val9)).collider)) ? (position2 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val9)).point); HitData val11 = new HitData(); val11.m_damage.m_pierce = Random.Range(5f + level2, 10f + 2f * level2) * VL_GlobalConfigs.c_rogueBonusThrowingDagger; val11.m_skill = ValheimLegends.DisciplineSkill; val11.SetAttacker((Character)(object)player); Vector3 val12 = Vector3.MoveTowards(val8.transform.position, val10, 1f); component2.Setup((Character)(object)player, (val12 - val8.transform.position) * 30f, -1f, val11, (ItemData)null, (ItemData)null); Traverse.Create((object)component2).Field("m_skill").SetValue((object)ValheimLegends.AlterationSkill); val8 = null; } } public static void Process_Input(Player player, ref Rigidbody playerBody, ref float altitude) { //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_083a: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown //IL_0997: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_0891: Unknown result type (might be due to invalid IL or missing references) //IL_089e: Unknown result type (might be due to invalid IL or missing references) //IL_0761: Unknown result type (might be due to invalid IL or missing references) //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0798: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Expected O, but got Unknown //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) if (ZInput.GetButtonDown("Jump") && !((Character)player).IsDead() && !((Character)player).InAttack() && !((Character)player).IsEncumbered() && !((Character)player).InDodge() && !((Character)player).IsKnockedBack()) { SE_Rogue sE_Rogue = (SE_Rogue)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Rogue")); if (!((Character)player).IsOnGround() && canDoubleJump && (Object)(object)sE_Rogue != (Object)null && sE_Rogue.hitCount > 0) { Vector3 velocity = ((Character)player).GetVelocity(); velocity.y = 0f; playerBody.velocity = velocity * 2f + new Vector3(0f, 8f, 0f); sE_Rogue.hitCount--; canDoubleJump = false; altitude = 0f; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("jump"); } else if (((Character)player).IsOnGround()) { canDoubleJump = true; } } if (((Character)player).IsBlocking() && ZInput.GetButtonDown("Attack")) { SE_Rogue sE_Rogue2 = (SE_Rogue)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Rogue")); if ((Object)(object)sE_Rogue2 != (Object)null && sE_Rogue2.hitCount > 0) { sE_Rogue2.hitCount--; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("throw_bomb"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; throwDagger = true; ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetPoisonBombSkillGain * 0.3f); } } if (VL_Utility.Ability3_Input_Down) { RaycastHit val = default(RaycastHit); _ = ((Component)player).transform.position; Physics.SphereCast(((Character)player).GetEyePoint(), 0.2f, ((Character)player).GetLookDir(), ref val, 150f, ScriptChar_Layermask); VL_Utility.SetTimer(); if ((Object)(object)((RaycastHit)(ref val)).collider != (Object)null && (Object)(object)((Component)((RaycastHit)(ref val)).collider).gameObject != (Object)null) { Character val2 = null; ((Component)((RaycastHit)(ref val)).collider).gameObject.TryGetComponent(ref val2); bool flag = (Object)(object)val2 != (Object)null; List list = new List(); list.Clear(); ((Component)((RaycastHit)(ref val)).collider).gameObject.GetComponents(list); if ((Object)(object)val2 == (Object)null) { val2 = (Character)((Component)((RaycastHit)(ref val)).collider).GetComponentInParent(typeof(Character)); flag = (Object)(object)val2 != (Object)null; if ((Object)(object)val2 == (Object)null) { val2 = ((Component)((RaycastHit)(ref val)).collider).GetComponentInChildren(); flag = (Object)(object)val2 != (Object)null; } } if (flag && !val2.IsPlayer()) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() >= VL_Utility.GetBackstabCost) { StatusEffect val3 = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val3.m_ttl = VL_Utility.GetBackstabCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val3, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetBackstabCost); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill val8) => val8.m_info == ValheimLegends.DisciplineSkillDef)).m_level; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Smokeburst"), ((Character)player).GetEyePoint(), Quaternion.identity); backstabVector = (((Component)val2).transform.position - ((Component)player).transform.position) / Vector3.Distance(((Component)val2).transform.position, ((Component)player).transform.position); float num = -1.5f; _ = ((RaycastHit)(ref val)).collider.bounds; Bounds bounds = ((RaycastHit)(ref val)).collider.bounds; _ = ((Bounds)(ref bounds)).size; bounds = ((RaycastHit)(ref val)).collider.bounds; float x = ((Bounds)(ref bounds)).size.x; bounds = ((RaycastHit)(ref val)).collider.bounds; num = (x + ((Bounds)(ref bounds)).size.z) / 2f; num = Mathf.Clamp(num, 0.6f, 2f); num *= -1f; backstabPoint = ((Component)val2).transform.position + ((Component)val2).transform.forward * num; backstabPoint.y += 0.1f; playerBody.position = backstabPoint; ((Component)player).transform.rotation = ((Component)val2).transform.rotation; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("knife_stab2"); if (BaseAI.IsEnemy((Character)(object)player, val2)) { Vector3 dir = ((Component)val2).transform.position - ((Component)player).transform.position; HitData val4 = new HitData(); val4.m_damage = ((Humanoid)player).GetCurrentWeapon().GetDamage(); ((DamageTypes)(ref val4.m_damage)).Modify(Random.Range(0.6f, 0.8f) * (1f + 0.005f * level) * VL_GlobalConfigs.c_rogueBackstab); val4.m_pushForce = 10f + 0.1f * level; val4.m_point = val2.GetEyePoint(); val4.m_dir = dir; val4.m_skill = ValheimLegends.DisciplineSkill; val2.Damage(val4); } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Smokeburst"), backstabPoint, Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_Shadowburst"), backstabPoint + ((Component)player).transform.up * 0.5f, Quaternion.LookRotation(((Character)player).GetLookDir())); altitude = 0f; ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetBackstabSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Backstab: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetBackstabCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Invalid target", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "No target", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetFadeCost) { StatusEffect val5 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val5.m_ttl = VL_Utility.GetFadeCooldownTime * VL_GlobalConfigs.c_rogueFadeCooldown; ((Character)player).GetSEMan().AddStatusEffect(val5, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetFadeCost); _ = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill val8) => val8.m_info == ValheimLegends.EvocationSkillDef)).m_level; Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_odin_despawn"), ((Character)player).GetCenterPoint(), Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_wraith_death"), ((Component)player).transform.position, Quaternion.identity); fadePoint = playerBody.position; canGainTrick = true; ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetFadeSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to set Fade point: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetFadeCost + ")", 0, (Sprite)null); } } else if (((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { float num2 = 50f; Vector3 val6 = fadePoint - ((Component)player).transform.position; if (((Vector3)(ref val6)).sqrMagnitude < num2 * num2) { Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_odin_despawn"), ((Character)player).GetCenterPoint(), Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_wraith_death"), ((Component)player).transform.position, Quaternion.identity); playerBody.MovePosition(fadePoint); altitude = 0f; if (canGainTrick) { ((SE_Rogue)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Rogue"))).hitCount++; canGainTrick = false; } } else { ((Character)player).Message((MessageType)1, "Cannot fade at this distance.", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability1_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetPoisonBombCost) { StatusEffect val7 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val7.m_ttl = VL_Utility.GetPoisonBombCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val7, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetPoisonBombCost); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("throw_bomb"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; throwDagger = false; ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetPoisonBombSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to throw Poison Bomb: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetPoisonBombCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { ValheimLegends.isChanneling = false; } } } public class Class_Shaman { private static int Script_Layermask = LayerMask.GetMask(new string[8] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock" }); private static int ObjectBlock_Layermask = LayerMask.GetMask(new string[9] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "item" }); public static bool isWaterWalking = false; private static int glideDelay = 0; public static float shell_spiritdamage_base = 10f; public static float shell_spiritdamage_scaling = 0.5f; public static float shell_resistModifier_base = 0.6f; public static float shell_resistModifier_negscaling = 0.6f; public static float enrage_staminamodifier_base = 5f; public static float enrage_staminamodifier_scaling = 0.1f; public static float enrage_speedmodifier_base = 1.2f; public static float enrage_speedmodifier_scaling = 0.0025f; public static void Process_Input(Player player, ref Rigidbody playerBody, ref float altitude, ref float lastGroundTouch, float waterLevel) { //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06bc: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0bed: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Expected O, but got Unknown //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_0bc0: Unknown result type (might be due to invalid IL or missing references) //IL_0bc5: Unknown result type (might be due to invalid IL or missing references) ValheimLegends.isChanneling = false; if (ZInput.GetButton("Jump")) { glideDelay++; if (!((Character)player).IsDead() && !((Character)player).InAttack() && !((Character)player).IsEncumbered() && !((Character)player).InDodge() && !((Character)player).IsKnockedBack() && glideDelay > 20 && ((Component)player).transform.position.y <= waterLevel + 0.4f) { bool flag = true; if (!((Character)player).HaveStamina(1f)) { if (((Character)player).IsPlayer()) { Hud.instance.StaminaBarEmptyFlash(); } flag = false; isWaterWalking = false; } if (flag) { ((Character)player).UseStamina(0.3f * VL_GlobalConfigs.c_shamanBonusWaterGlideCost); VL_Utility.RotatePlayerToTarget(player); ((MonoBehaviour)(ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).StopAllCoroutines(); RaycastHit val = default(RaycastHit); Vector3 val2 = ((Component)player).transform.position + ((Component)player).transform.up * 0.15f; Vector3 lookDir = ((Character)player).GetLookDir(); lookDir.y = 0f; Physics.SphereCast(val2, 0.1f, lookDir, ref val, 10f, ObjectBlock_Layermask); Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(((Component)player).transform.position.x + ((Character)player).GetLookDir().x * 0.3f, waterLevel + 0.3f, ((Component)player).transform.position.z + ((Character)player).GetLookDir().z * 0.3f); if (Vector3.Distance(val2, val3) + 0.25f > Vector3.Distance(val2, ((RaycastHit)(ref val)).point)) { ((Vector3)(ref val3))..ctor(((Component)player).transform.position.x, waterLevel + 0.3f, ((Component)player).transform.position.z); } playerBody.position = val3; playerBody.velocity = Vector3.zero; ValheimLegends.isChanneling = true; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_FlyingKick"), ((Component)player).transform.position + ((Component)player).transform.up * -0.2f, Quaternion.LookRotation(((Component)player).transform.forward * -1f)); } } } else { glideDelay = 0; } if (((Component)player).transform.position.y + 0.3f > waterLevel) { isWaterWalking = false; } if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() > VL_Utility.GetSpiritBombCost(player)) { StatusEffect val4 = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val4.m_ttl = VL_Utility.GetSpiritBombCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val4, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetSpiritBombCost(player)); float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("battleaxe_attack1"); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_goblinking_nova"), ((Component)player).transform.position, Quaternion.identity); SE_SpiritDrain sE_SpiritDrain = (SE_SpiritDrain)(object)ScriptableObject.CreateInstance(typeof(SE_SpiritDrain)); ((StatusEffect)sE_SpiritDrain).m_ttl = SE_SpiritDrain.m_baseTTL; sE_SpiritDrain.damageModifier = 1f + 0.1f * level; foreach (Character allCharacter in Character.GetAllCharacters()) { if (BaseAI.IsEnemy((Character)(object)player, allCharacter)) { Vector3 val5 = ((Component)allCharacter).transform.position - ((Component)player).transform.position; if (((Vector3)(ref val5)).magnitude <= 11f + 0.05f * level && VL_Utility.LOS_IsValid(allCharacter, ((Character)player).GetCenterPoint(), ((Component)player).transform.position)) { Vector3 dir = ((Component)allCharacter).transform.position - ((Component)player).transform.position; HitData val6 = new HitData(); val6.m_damage.m_spirit = Random.Range(6f + 0.4f * level, 12f + 0.6f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_shamanSpiritShock; val6.m_damage.m_lightning = Random.Range(6f + 0.4f * level, 12f + 0.6f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_shamanSpiritShock; val6.m_pushForce = 25f + 0.1f * level; val6.m_point = allCharacter.GetEyePoint(); val6.m_dir = dir; val6.m_skill = ValheimLegends.EvocationSkill; allCharacter.Damage(val6); allCharacter.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_SpiritDrain, false, 0, 0f); } } } ((Character)player).RaiseSkill(ValheimLegends.EvocationSkill, VL_Utility.GetSpiritBombSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Spirit Shock: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetSpiritBombCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() > VL_Utility.GetShellCost(player)) { StatusEffect val7 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val7.m_ttl = VL_Utility.GetShellCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val7, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetShellCost(player)); float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level; ValheimLegends.shouldUseGuardianPower = false; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("gpower"); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetSpeed(1.25f); List list = new List(); list.Clear(); Character.GetCharactersInRange(((Component)player).transform.position, 30f + 0.2f * level2, list); GameObject prefab = ZNetScene.instance.GetPrefab("fx_guardstone_permitted_add"); foreach (Character item in list) { SE_Shell sE_Shell = (SE_Shell)(object)ScriptableObject.CreateInstance(typeof(SE_Shell)); ((StatusEffect)sE_Shell).m_ttl = SE_Shell.m_baseTTL + 0.3f * level2; sE_Shell.spiritDamageOffset = (shell_spiritdamage_base + shell_spiritdamage_scaling * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_shamanShell; sE_Shell.resistModifier = (0.6f - 0.006f * level2) * VL_GlobalConfigs.c_shamanShell; ((StatusEffect)sE_Shell).m_icon = ZNetScene.instance.GetPrefab("ShieldSerpentscale").GetComponent().m_itemData.GetIcon(); ((StatusEffect)sE_Shell).m_tooltip = $"Reduces elemental damage taken by {(int)((1f - sE_Shell.resistModifier) * 100f)}%, while adding {(int)sE_Shell.spiritDamageOffset} Spirit damage to your attacks"; sE_Shell.doOnce = false; if (!BaseAI.IsEnemy((Character)(object)player, item)) { if ((Object)(object)item == (Object)(object)Player.m_localPlayer) { item.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Shell, true, 0, 0f); } else if (item.IsPlayer()) { item.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_Shell).name), true, 0, 0f); } else { item.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Shell, true, 0, 0f); } Object.Instantiate(prefab, item.GetCenterPoint(), Quaternion.identity); } } Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_wraith_death"), ((Component)player).transform.position, Quaternion.identity); ((Character)player).RaiseSkill(ValheimLegends.AbjurationSkill, VL_Utility.GetShellSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Shell: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetShellCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { if (!VL_Utility.Ability1_Input_Down) { return; } if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() > VL_Utility.GetEnrageCost(player)) { StatusEffect val8 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val8.m_ttl = VL_Utility.GetEnrageCooldown(player); ((Character)player).GetSEMan().AddStatusEffect(val8, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetEnrageCost(player)); float level3 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("challenge"); GameObject prefab2 = ZNetScene.instance.GetPrefab("fx_guardstone_permitted_removed"); prefab2.transform.localScale = Vector3.one * 3f; Object.Instantiate(prefab2, ((Character)player).GetCenterPoint(), Quaternion.identity); GameObject prefab3 = ZNetScene.instance.GetPrefab("fx_GP_Activation"); List list2 = new List(); Character.GetCharactersInRange(((Component)player).transform.position, 30f, list2); SE_Enrage sE_Enrage = (SE_Enrage)(object)ScriptableObject.CreateInstance(typeof(SE_Enrage)); ((StatusEffect)sE_Enrage).m_ttl = 16f + 0.2f * level3; sE_Enrage.staminaModifier = (enrage_staminamodifier_base + enrage_staminamodifier_scaling * level3) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_shamanEnrage; sE_Enrage.speedModifier = enrage_speedmodifier_base + enrage_speedmodifier_scaling * level3; ((StatusEffect)sE_Enrage).m_icon = ZNetScene.instance.GetPrefab("TrophyGoblinBrute").GetComponent().m_itemData.GetIcon(); sE_Enrage.doOnce = false; ((StatusEffect)sE_Enrage).m_tooltip = $"Enraged by a shaman, regenerating {sE_Enrage.staminaModifier} stamina per second and moving {(int)((sE_Enrage.speedModifier - 1f) * 100f)}% faster"; foreach (Character item2 in list2) { if (!BaseAI.IsEnemy((Character)(object)player, item2)) { if ((Object)(object)item2 == (Object)(object)Player.m_localPlayer) { item2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Enrage, true, 0, 0f); } else if (item2.IsPlayer()) { item2.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_Enrage).name), true, 0, 0f); } else { item2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Enrage, true, 0, 0f); } Object.Instantiate(prefab3, item2.GetCenterPoint(), Quaternion.identity); } } ((Character)player).RaiseSkill(ValheimLegends.AlterationSkill, VL_Utility.GetEnrageSkillGain(player)); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Enrage: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetEnrageCost(player) + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } } } public class Class_Valkyrie { public enum ValkyrieAttackType { ShieldRelease = 12, HarpoonPull = 20 } private static int Script_Layermask = LayerMask.GetMask(new string[8] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock" }); private static int ScriptChar_Layermask = LayerMask.GetMask(new string[14] { "Default", "static_solid", "Default_small", "piece_nonsolid", "piece", "terrain", "vehicle", "viewblock", "character", "character_noenv", "character_trigger", "character_net", "character_ghost", "Water" }); private static GameObject GO_CastFX; public static bool inFlight = false; public static bool isBlocking = false; public static ValkyrieAttackType QueuedAttack; public static bool PlayerUsingShield { get { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 ItemData value = Traverse.Create((object)Player.m_localPlayer).Field("m_leftItem").GetValue(); if (value != null) { SharedData shared = value.m_shared; if (shared != null && (int)shared.m_itemType == 5) { return true; } } return false; } } public static void Execute_Attack(Player player, ref Rigidbody playerBody, ref float altitude) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Expected O, but got Unknown //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_0600: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Expected O, but got Unknown //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) SE_Valkyrie sE_Valkyrie = (SE_Valkyrie)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Valkyrie")); if (QueuedAttack == ValkyrieAttackType.ShieldRelease) { Vector3 val = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.2f + ((Component)player).transform.up * -0.4f + ((Component)player).transform.right * -0.4f; for (int i = 0; i < sE_Valkyrie.hitCount; i++) { Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ShieldRelease"), val, Quaternion.LookRotation(((Component)player).transform.forward)); } float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level; List list = new List(); list.Clear(); List list2 = new List(); list2.Clear(); Character.GetCharactersInRange(val + ((Component)player).transform.forward * 2f, 2.5f, list); Character.GetCharactersInRange(val + ((Component)player).transform.forward * 6f, 3f, list2); list.AddRange(list2); RaycastHit val2 = default(RaycastHit); Vector3 position = ((Component)player).transform.position; if (Physics.Raycast(((Character)player).GetEyePoint(), ((Character)player).GetLookDir(), ref val2, float.PositiveInfinity, ScriptChar_Layermask) && Object.op_Implicit((Object)(object)((RaycastHit)(ref val2)).collider)) { _ = ((RaycastHit)(ref val2)).point; } else { _ = position + ((Character)player).GetLookDir() * 1000f; } Physics.SphereCast(((Character)player).GetEyePoint(), 0.1f, ((Character)player).GetLookDir(), ref val2, 4f, ScriptChar_Layermask); if ((Object)(object)((RaycastHit)(ref val2)).collider != (Object)null && (Object)(object)((Component)((RaycastHit)(ref val2)).collider).gameObject != (Object)null) { Character val3 = null; ((Component)((RaycastHit)(ref val2)).collider).gameObject.TryGetComponent(ref val3); bool flag = (Object)(object)val3 != (Object)null; if ((Object)(object)val3 == (Object)null) { val3 = (Character)((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent(typeof(Character)); flag = (Object)(object)val3 != (Object)null; if ((Object)(object)val3 == (Object)null) { val3 = ((Component)((RaycastHit)(ref val2)).collider).GetComponentInChildren(); flag = (Object)(object)val3 != (Object)null; } } if (flag && BaseAI.IsEnemy(val3, (Character)(object)player) && !list.Contains(val3)) { list.Add(val3); } } foreach (Character item in list) { if (BaseAI.IsEnemy((Character)(object)player, item)) { Vector3 dir = ((Component)item).transform.position - ((Component)player).transform.position; HitData val4 = new HitData(); val4.m_damage.m_spirit = Random.Range((float)sE_Valkyrie.hitCount * (1f + 0.02f * level), (float)sE_Valkyrie.hitCount * (2f + 0.015f * level)) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_valkyrieBonusChillWave; val4.m_damage.m_frost = Random.Range((float)sE_Valkyrie.hitCount * (1f + 0.02f * level), (float)sE_Valkyrie.hitCount * (2f + 0.015f * level)) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_valkyrieBonusChillWave; val4.m_point = item.GetEyePoint(); val4.m_dir = dir; val4.m_skill = ValheimLegends.AbjurationSkill; item.Damage(val4); } } sE_Valkyrie.hitCount = 0; } else if (QueuedAttack == ValkyrieAttackType.HarpoonPull) { float level2 = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; Vector3 val5 = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 0.2f + ((Component)player).transform.up * 0.1f + ((Component)player).transform.right * 0.28f; GameObject val6 = Object.Instantiate(ZNetScene.instance.GetPrefab("VL_ValkyrieSpear"), val5, Quaternion.identity); Projectile component = val6.GetComponent(); ((Object)component).name = "VL_ValkyrieSpear"; component.m_respawnItemOnHit = false; component.m_spawnOnHit = null; component.m_ttl = 6f; component.m_gravity = 2f; component.m_aoe = 1f; ((Component)component).transform.localRotation = Quaternion.LookRotation(((Humanoid)player).GetAimDir(val5)); val6.transform.localScale = Vector3.one * 0.8f; RaycastHit val7 = default(RaycastHit); Vector3 position2 = ((Component)player).transform.position; Vector3 val8 = ((!Physics.Raycast(val5, ((Character)player).GetLookDir(), ref val7, float.PositiveInfinity, ScriptChar_Layermask) || !Object.op_Implicit((Object)(object)((RaycastHit)(ref val7)).collider)) ? (position2 + ((Character)player).GetLookDir() * 1000f) : ((RaycastHit)(ref val7)).point); HitData val9 = new HitData(); val9.m_skill = ValheimLegends.DisciplineSkill; val9.m_dir = ((Character)player).GetLookDir() * -1f; val9.m_damage.m_frost = Random.Range(1f + 0.2f * level2, 2f + 0.3f * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_valkyrieBonusIceLance; val9.m_damage.m_spirit = Random.Range(1f + 0.2f * level2, 2f + 0.3f * level2) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_valkyrieBonusIceLance; val9.SetAttacker((Character)(object)player); Vector3 val10 = Vector3.MoveTowards(val6.transform.position, val8, 1f); component.Setup((Character)(object)player, (val10 - val6.transform.position) * 40f, -1f, val9, (ItemData)null, (ItemData)null); Traverse.Create((object)component).Field("m_skill").SetValue((object)ValheimLegends.DisciplineSkill); val6 = null; } } public static void Impact_Effect(Player player, float altitude) { //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) List allCharacters = Character.GetAllCharacters(); inFlight = false; ValheimLegends.shouldValkyrieImpact = false; foreach (Character item in allCharacters) { float level = ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; if (BaseAI.IsEnemy((Character)(object)player, item)) { Vector3 val = ((Component)item).transform.position - ((Component)player).transform.position; if (((Vector3)(ref val)).magnitude <= 6f + 0.03f * level && VL_Utility.LOS_IsValid(item, ((Component)player).transform.position, ((Character)player).GetCenterPoint())) { Vector3 dir = ((Component)item).transform.position - ((Component)player).transform.position; HitData val2 = new HitData(); val2.m_damage.m_blunt = 5f + 3f * altitude + Random.Range(1.5f * level, 2.5f * level) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_valkyrieLeap; val2.m_pushForce = 20f * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_valkyrieLeap; val2.m_point = item.GetEyePoint(); val2.m_dir = dir; val2.m_skill = ValheimLegends.DisciplineSkill; item.Damage(val2); } } } ((MonoBehaviour)(ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).StopAllCoroutines(); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("battleaxe_attack2"); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_gdking_stomp"), ((Component)player).transform.position, Quaternion.identity); } public static void Process_Input(Player player) { //IL_0085: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_070d: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) new Random(); if (((Character)player).IsBlocking() && ZInput.GetButtonDown("Attack")) { SE_Valkyrie sE_Valkyrie = (SE_Valkyrie)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Valkyrie")); if ((float)sE_Valkyrie.hitCount >= VL_Utility.GetHarpoonPullCost) { sE_Valkyrie.hitCount -= (int)VL_Utility.GetHarpoonPullCost; VL_Utility.RotatePlayerToTarget(player); ((MonoBehaviour)(ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).StopAllCoroutines(); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("spear_throw"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; QueuedAttack = ValkyrieAttackType.HarpoonPull; ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetHarpoonPullSkillGain); } } if (VL_Utility.Ability3_Input_Down) { SE_Valkyrie sE_Valkyrie2 = (SE_Valkyrie)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Valkyrie")); if (((Character)player).IsBlocking()) { if (PlayerUsingShield && (Object)(object)sE_Valkyrie2 != (Object)null && sE_Valkyrie2.hitCount > 0) { VL_Utility.RotatePlayerToTarget(player); ((MonoBehaviour)(ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).StopAllCoroutines(); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("unarmed_attack1"); ValheimLegends.isChargingDash = true; ValheimLegends.dashCounter = 0; QueuedAttack = ValkyrieAttackType.ShieldRelease; ((Character)player).RaiseSkill(ValheimLegends.AbjurationSkill, VL_Utility.GetShieldReleaseSkillGain * (float)sE_Valkyrie2.hitCount); } } else if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { if (player.GetStamina() >= VL_Utility.GetLeapCost) { StatusEffect val = (StatusEffect)(object)(SE_Ability3_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability3_CD)); val.m_ttl = VL_Utility.GetLeapCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetLeapCost); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("knife_secondary"); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetSpeed(0.3f); Vector3 velocity = ((Character)player).GetVelocity(); Rigidbody value = Traverse.Create((object)player).Field("m_body").GetValue(); inFlight = true; Vector3 zero = Vector3.zero; zero.z = value.velocity.z; zero.x = value.velocity.x; value.velocity = velocity * 2f + new Vector3(0f, 15f, 0f) + zero * 3f; value.velocity *= 0.8f + ((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level * 0.005f; GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetLeapSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Leap: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetLeapCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else if (VL_Utility.Ability2_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { if (player.GetStamina() >= VL_Utility.GetStaggerCost) { StatusEffect val2 = (StatusEffect)(object)(SE_Ability2_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability2_CD)); val2.m_ttl = VL_Utility.GetStaggerCooldownTime * VL_GlobalConfigs.c_valkyrieStaggerCooldown; ((Character)player).GetSEMan().AddStatusEffect(val2, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetStaggerCost); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("battleaxe_attack1"); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_troll_rock_destroyed"), ((Component)player).transform.position, Quaternion.identity); GO_CastFX = Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_sledge_iron_hit"), ((Component)player).transform.position, Quaternion.identity); foreach (Character allCharacter in Character.GetAllCharacters()) { if (BaseAI.IsEnemy((Character)(object)player, allCharacter)) { Vector3 val3 = ((Component)allCharacter).transform.position - ((Component)player).transform.position; if (((Vector3)(ref val3)).magnitude <= 6f && VL_Utility.LOS_IsValid(allCharacter, ((Component)player).transform.position, ((Character)player).GetCenterPoint())) { Vector3 val4 = ((Component)allCharacter).transform.position - ((Component)player).transform.position; allCharacter.Stagger(val4); } } } ((Character)player).RaiseSkill(ValheimLegends.DisciplineSkill, VL_Utility.GetStaggerSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina to Stagger: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetStaggerCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } else { if (!VL_Utility.Ability1_Input_Down) { return; } if (!((Character)player).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { if (player.GetStamina() >= VL_Utility.GetBulwarkCost) { StatusEffect val5 = (StatusEffect)(object)(SE_Ability1_CD)(object)ScriptableObject.CreateInstance(typeof(SE_Ability1_CD)); val5.m_ttl = VL_Utility.GetBulwarkCooldownTime; ((Character)player).GetSEMan().AddStatusEffect(val5, false, 0, 0f); ((Character)player).UseStamina(VL_Utility.GetBulwarkCost); ValheimLegends.shouldUseGuardianPower = false; player.StartEmote("challenge", true); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_guardstone_deactivate"), ((Character)player).GetCenterPoint(), Quaternion.identity); Object.Instantiate(ZNetScene.instance.GetPrefab("sfx_metal_blocked"), ((Component)player).transform.position, Quaternion.identity); SE_Bulwark sE_Bulwark = (SE_Bulwark)(object)ScriptableObject.CreateInstance(typeof(SE_Bulwark)); ((StatusEffect)sE_Bulwark).m_ttl = SE_Bulwark.m_baseTTL + (float)Mathf.RoundToInt(((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level * 0.2f); ((Character)player).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Bulwark, false, 0, 0f); ((Character)player).RaiseSkill(ValheimLegends.AbjurationSkill, VL_Utility.GetBulwarkSkillGain); } else { ((Character)player).Message((MessageType)1, "Not enough stamina for Bulwark: (" + player.GetStamina().ToString("#.#") + "/" + VL_Utility.GetBulwarkCost + ")", 0, (Sprite)null); } } else { ((Character)player).Message((MessageType)1, "Ability not ready", 0, (Sprite)null); } } } } public static class ObjectDBPatches { [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDBAwake { public static void Postfix(ObjectDB __instance) { AddStatusEffect(__instance); AddCooldownStatusEffect(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDBCopyOtherDB { public static void Postfix(ObjectDB __instance) { AddStatusEffect(__instance); AddCooldownStatusEffect(__instance); } } [HarmonyPatch(typeof(ObjectDB), "GetStatusEffect", new Type[] { typeof(int) })] public static class ObjectDBGetStatusEffect { public static void Postfix(ObjectDB __instance, int nameHash, StatusEffect __result) { if ((Object)(object)__result != (Object)null) { if (nameHash == "SE_Regeneration".GetHashCode() || nameHash == "SE_VL_Regeneration".GetHashCode()) { ((StatusEffect)(__result as SE_Regeneration)).m_icon = SE_Regeneration.AbilityIcon; } else if (nameHash == "SE_Bulwark".GetHashCode()) { ((StatusEffect)(__result as SE_Bulwark)).m_icon = SE_Bulwark.AbilityIcon; } else if (nameHash == "SE_Enrage".GetHashCode() || nameHash == "SE_VL_Enrage".GetHashCode()) { ((StatusEffect)(__result as SE_Enrage)).m_icon = SE_Enrage.AbilityIcon; } else if (nameHash == "SE_Shell".GetHashCode() || nameHash == "SE_VL_Shell".GetHashCode()) { ((StatusEffect)(__result as SE_Shell)).m_icon = SE_Shell.AbilityIcon; } else if (nameHash == "SE_SpiritDrain".GetHashCode()) { ((StatusEffect)(__result as SE_SpiritDrain)).m_icon = SE_SpiritDrain.AbilityIcon; } else if (nameHash == "SE_Berserk".GetHashCode()) { ((StatusEffect)(__result as SE_Berserk)).m_icon = SE_Berserk.AbilityIcon; } else if (nameHash == "SE_Execute".GetHashCode()) { ((StatusEffect)(__result as SE_Execute)).m_icon = SE_Execute.AbilityIcon; } else if (nameHash == "SE_Slow".GetHashCode()) { ((StatusEffect)(__result as SE_Slow)).m_icon = SE_Slow.AbilityIcon; } else if (nameHash == "SE_PowerShot".GetHashCode()) { ((StatusEffect)(__result as SE_PowerShot)).m_icon = SE_PowerShot.AbilityIcon; } else if (nameHash == "SE_ShadowStalk".GetHashCode()) { ((StatusEffect)(__result as SE_ShadowStalk)).m_icon = SE_ShadowStalk.AbilityIcon; } else if (nameHash == "SE_Companion".GetHashCode()) { ((StatusEffect)(__result as SE_Companion)).m_icon = SE_Companion.AbilityIcon; } else if (nameHash == "SE_RootsBuff".GetHashCode()) { ((StatusEffect)(__result as SE_RootsBuff)).m_icon = SE_RootsBuff.AbilityIcon; } else if (nameHash == "SE_Riposte".GetHashCode()) { ((StatusEffect)(__result as SE_Riposte)).m_icon = SE_Riposte.AbilityIcon; } else if (nameHash == "SE_Rogue".GetHashCode()) { ((StatusEffect)(__result as SE_Rogue)).m_icon = SE_Rogue.AbilityIcon; } else if (nameHash == "SE_Monk".GetHashCode()) { ((StatusEffect)(__result as SE_Monk)).m_icon = SE_Monk.AbilityIcon; } else if (nameHash == "SE_Ranger".GetHashCode()) { ((StatusEffect)(__result as SE_Ranger)).m_icon = SE_Ranger.AbilityIcon; } else if (nameHash == "SE_Valkyrie".GetHashCode()) { ((StatusEffect)(__result as SE_Valkyrie)).m_icon = SE_Valkyrie.AbilityIcon; } else if (nameHash == "SE_Weaken".GetHashCode()) { ((StatusEffect)(__result as SE_Weaken)).m_icon = SE_Weaken.AbilityIcon; } if (nameHash == "SE_Ability1_CD".GetHashCode()) { ((StatusEffect)(__result as SE_Ability1_CD)).m_icon = SE_Ability1_CD.AbilityIcon; } else if (nameHash == "SE_Ability2_CD".GetHashCode()) { ((StatusEffect)(__result as SE_Ability2_CD)).m_icon = SE_Ability2_CD.AbilityIcon; } else if (nameHash == "SE_Ability3_CD".GetHashCode()) { ((StatusEffect)(__result as SE_Ability3_CD)).m_icon = SE_Ability3_CD.AbilityIcon; } } } } [HarmonyPatch(typeof(Hud), "Awake")] public static class HudAwake { public static void Postfix(Hud __instance) { SE_Regeneration.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyGreydwarfShaman").GetComponent().m_itemData.GetIcon(); SE_Bulwark.AbilityIcon = ZNetScene.instance.GetPrefab("ShieldBlackmetalTower").GetComponent().m_itemData.GetIcon(); SE_Enrage.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyGoblinBrute").GetComponent().m_itemData.GetIcon(); SE_Shell.AbilityIcon = ZNetScene.instance.GetPrefab("ShieldSerpentscale").GetComponent().m_itemData.GetIcon(); SE_SpiritDrain.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyDragonQueen").GetComponent().m_itemData.GetIcon(); SE_Berserk.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyGoblinKing").GetComponent().m_itemData.GetIcon(); SE_Execute.AbilityIcon = ZNetScene.instance.GetPrefab("SwordCheat").GetComponent().m_itemData.GetIcon(); SE_PowerShot.AbilityIcon = ZNetScene.instance.GetPrefab("ArrowFire").GetComponent().m_itemData.GetIcon(); SE_ShadowStalk.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyWraith").GetComponent().m_itemData.GetIcon(); SE_Companion.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyWolf").GetComponent().m_itemData.GetIcon(); SE_RootsBuff.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyWolf").GetComponent().m_itemData.GetIcon(); SE_Slow.AbilityIcon = ZNetScene.instance.GetPrefab("TrophyWolf").GetComponent().m_itemData.GetIcon(); SE_DyingLight_CD.AbilityIcon = ZNetScene.instance.GetPrefab("TrophySkeleton").GetComponent().m_itemData.GetIcon(); SE_Riposte.AbilityIcon = ValheimLegends.RiposteIcon; SE_Rogue.AbilityIcon = ValheimLegends.RogueIcon; SE_Monk.AbilityIcon = ValheimLegends.MonkIcon; SE_Ranger.AbilityIcon = ValheimLegends.RangerIcon; SE_Valkyrie.AbilityIcon = ValheimLegends.ValkyrieIcon; SE_Weaken.AbilityIcon = ValheimLegends.WeakenIcon; SE_BiomeMeadows.AbilityIcon = ValheimLegends.BiomeMeadowsIcon; SE_BiomeBlackForest.AbilityIcon = ValheimLegends.BiomeBlackForestIcon; SE_BiomeSwamp.AbilityIcon = ValheimLegends.BiomeSwampIcon; SE_BiomeMountain.AbilityIcon = ValheimLegends.BiomeMountainIcon; SE_BiomePlains.AbilityIcon = ValheimLegends.BiomePlainsIcon; SE_BiomeOcean.AbilityIcon = ValheimLegends.BiomeOceanIcon; SE_BiomeMist.AbilityIcon = ValheimLegends.BiomeMistIcon; SE_BiomeAsh.AbilityIcon = ValheimLegends.BiomeAshIcon; SE_Ability1_CD.AbilityIcon = ZNetScene.instance.GetPrefab("ShieldWood").GetComponent().m_itemData.GetIcon(); SE_Ability2_CD.AbilityIcon = ZNetScene.instance.GetPrefab("ShieldBanded").GetComponent().m_itemData.GetIcon(); SE_Ability3_CD.AbilityIcon = ZNetScene.instance.GetPrefab("ShieldSilver").GetComponent().m_itemData.GetIcon(); } } private static void AddCooldownStatusEffect(ObjectDB odb) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Ability1_CD"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Ability2_CD"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Ability3_CD"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } } private static void AddStatusEffect(ObjectDB odb) { if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Regeneration"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Bulwark"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Enrage"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Shell"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_SpiritDrain"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Berserk"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Execute"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_PowerShot"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_ShadowStalk"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Companion"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_RootsBuff"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Slow"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Riposte"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Rogue"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Monk"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Ranger"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Valkyrie"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_Weaken"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeMeadows"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeBlackForest"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeMountain"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeSwamp"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomePlains"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeOcean"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeMist"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } if (!Object.op_Implicit((Object)(object)odb.m_StatusEffects.Find((StatusEffect se) => ((Object)se).name == "SE_VL_BiomeAsh"))) { odb.m_StatusEffects.Add((StatusEffect)(object)ScriptableObject.CreateInstance()); } } } public class SE_Ability1_CD : StatusEffect { public static Sprite AbilityIcon = ValheimLegends.Ability1_Sprite; public static GameObject GO_SEFX; public SE_Ability1_CD() { ((Object)this).name = "SE_VL_Ability1_CD"; base.m_icon = ValheimLegends.Ability1_Sprite; base.m_tooltip = ValheimLegends.Ability1_Name + " Cooldown"; base.m_name = ValheimLegends.Ability1_Name + " Cooldown"; } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Ability2_CD : StatusEffect { public static Sprite AbilityIcon = ValheimLegends.Ability2_Sprite; public static GameObject GO_SEFX; public SE_Ability2_CD() { ((Object)this).name = "SE_VL_Ability2_CD"; base.m_icon = ValheimLegends.Ability2_Sprite; base.m_tooltip = ValheimLegends.Ability2_Name + " Cooldown"; base.m_name = ValheimLegends.Ability2_Name + " Cooldown"; } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Ability3_CD : StatusEffect { public static Sprite AbilityIcon = ValheimLegends.Ability3_Sprite; public static GameObject GO_SEFX; public SE_Ability3_CD() { ((Object)this).name = "SE_VL_Ability3_CD"; base.m_icon = ValheimLegends.Ability3_Sprite; base.m_tooltip = ValheimLegends.Ability3_Name + " Cooldown"; base.m_name = ValheimLegends.Ability3_Name + " Cooldown"; } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Berserk : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Berserk")] public static float m_baseTTL = 18f; public float speedModifier = Class_Berserker.berserk_speedbonus_base; public float damageModifier = Class_Berserker.berserk_damagebonus_base; public float healthAbsorbPercent = Class_Berserker.berserk_healthabsorb_base; private float m_timer; private float m_interval = 3f; private float savedStaminaRegenDelay = 1f; public SE_Berserk() { ((Object)this).name = "SE_VL_Berserk"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = $"Drains hp per second to boost damage by {(int)((damageModifier - 1f) * 100f)}%, speed by {(int)((speedModifier - 1f) * 100f)}%.\n*Additionally absorbs {(int)((healthAbsorbPercent - 1f) * 100f)}% of damage dealt as stamina"; ((StatusEffect)this).m_name = "Berserk"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) speed *= speedModifier; ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void Setup(Character character) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown savedStaminaRegenDelay = Traverse.Create((object)(Player)character).Field("m_staminaRegenDelay").GetValue(); Traverse.Create((object)(Player)character).Field("m_staminaRegenDelay").SetValue((object)0f); ((SE_Stats)this).Setup(character); } public override void UpdateStatusEffect(float dt) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) ((SE_Stats)this).UpdateStatusEffect(dt); m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; HitData val = new HitData(); val.m_damage.m_spirit = Mathf.Clamp(0.05f * ((StatusEffect)this).m_character.GetMaxHealth(), 1f, 15f); val.m_point = ((StatusEffect)this).m_character.GetEyePoint(); ((StatusEffect)this).m_character.ApplyDamage(val, true, true, (DamageModifier)0); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_deathsquito_hit"), ((StatusEffect)this).m_character.GetCenterPoint(), Quaternion.identity); } } public override bool IsDone() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (((StatusEffect)this).m_ttl > 0f && ((StatusEffect)this).m_time > ((StatusEffect)this).m_ttl) { Traverse.Create((object)(Player)((StatusEffect)this).m_character).Field("m_staminaRegenDelay").SetValue((object)savedStaminaRegenDelay); } return ((StatusEffect)this).IsDone(); } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_BiomeAsh : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeAsh")] public static float m_baseTTL = 600f; public float resistModifier = 0.8f; public float fireDamageOffset = 26f; public bool doOnce = true; public SE_BiomeAsh() { ((Object)this).name = "SE_VL_BiomeAsh"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomeAsh"; ((StatusEffect)this).m_name = "VL_BiomeAsh"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 5f * num; fireDamageOffset = (26f + 0.4f * num) * VL_GlobalConfigs.g_DamageModifer; resistModifier = 0.8f - 0.002f * num; } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_fire *= resistModifier; hit.m_damage.m_poison *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomeBlackForest : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeBlackForest")] public static float m_baseTTL = 600f; public float carryModifier = 50f; public bool underRoof = true; public bool doOnce = true; public SE_BiomeBlackForest() { ((Object)this).name = "SE_VL_BiomeBlackForest"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomeBlackForest"; ((StatusEffect)this).m_name = "VL_BiomeBlackForest"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 3f * num; carryModifier = 50f + num; } ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomeMeadows : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeMeadows")] public static float m_baseTTL = 600f; public float regenBonus = 1f; private float m_timer; private float m_interval = 5f; public bool doOnce = true; public SE_BiomeMeadows() { ((Object)this).name = "SE_VL_BiomeMeadows"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Biome Meadows Buff"; ((StatusEffect)this).m_name = "VL_BiomeMeadows"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 3f * num; regenBonus = (1f + 0.1f * num) * VL_GlobalConfigs.g_DamageModifer; } m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; ((StatusEffect)this).m_character.Heal(regenBonus, true); ((StatusEffect)this).m_character.AddStamina(regenBonus * 2f); } ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomeMist : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeMist")] public static float m_baseTTL = 600f; public float resistModifier = 0.8f; public float iceDamageOffset = 20f; public bool doOnce = true; public SE_BiomeMist() { ((Object)this).name = "SE_VL_BiomeMist"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomeMist"; ((StatusEffect)this).m_name = "VL_BiomeMist"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 5f * num; iceDamageOffset = (20f + 0.3f * num) * VL_GlobalConfigs.g_DamageModifer; resistModifier = 0.8f - 0.002f * num; } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_frost *= resistModifier; hit.m_damage.m_spirit *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomeMountain : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeMountain")] public static float m_baseTTL = 600f; public float resistModifier = 0.8f; public float staminaRegen = 5f; private float m_timer; private float m_interval = 5f; public bool doOnce = true; public SE_BiomeMountain() { ((Object)this).name = "SE_VL_BiomeMountain"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomeMountain"; ((StatusEffect)this).m_name = "VL_BiomeMountain"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 3f * num; staminaRegen = 5f + 0.075f * num; resistModifier = 0.8f - 0.002f * num; } m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; ((StatusEffect)this).m_character.AddStamina(staminaRegen); } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_frost *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomeOcean : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeOcean")] public static float m_baseTTL = 600f; public float resistModifier = 0.8f; public float swimSpeed = 1.5f; public bool doOnce = true; public SE_BiomeOcean() { ((Object)this).name = "SE_VL_BiomeOcean"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomeOcean"; ((StatusEffect)this).m_name = "VL_BiomeOcean"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).m_character.IsSwimming()) { speed *= swimSpeed; } ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 3f * num; swimSpeed = 1.5f + 0.01f * num; resistModifier = 0.8f - 0.002f * num; } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_lightning *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomePlains : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomePlains")] public static float m_baseTTL = 600f; public float resistModifier = 0.8f; public float speedBonus = 1.1f; public bool doOnce = true; public SE_BiomePlains() { ((Object)this).name = "SE_VL_BiomePlains"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomePlains"; ((StatusEffect)this).m_name = "VL_BiomePlains"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) speed *= speedBonus; ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 3f * num; speedBonus = 1.1f + 0.001f * num; resistModifier = 0.8f - 0.002f * num; } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_fire *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_BiomeSwamp : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_BiomeSwamp")] public static float m_baseTTL = 600f; public float resistModifier = 0.8f; public bool doOnce = true; private float m_timer; private float m_interval = 3f; public bool doLight = true; public Light biomeLight; public SE_BiomeSwamp() { ((Object)this).name = "SE_VL_BiomeSwamp"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "BiomeSwamp"; ((StatusEffect)this).m_name = "VL_BiomeSwamp"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; doLight = true; } public override void UpdateStatusEffect(float dt) { //IL_00af: Unknown result type (might be due to invalid IL or missing references) if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 3f * num; resistModifier = 0.8f - 0.002f * num; } if (doLight) { doLight = false; ((Component)((StatusEffect)this).m_character).gameObject.AddComponent(); ((Component)((StatusEffect)this).m_character).GetComponent().range = 30f; ((Component)((StatusEffect)this).m_character).GetComponent().color = new Color(233f, 240f, 226f); ((Component)((StatusEffect)this).m_character).GetComponent().intensity = 0.0035f; ((Behaviour)((Component)((StatusEffect)this).m_character).GetComponent()).enabled = true; biomeLight = ((Component)((StatusEffect)this).m_character).GetComponent(); } m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; if (((StatusEffect)this).GetRemaningTime() <= m_interval && (Object)(object)biomeLight != (Object)null) { Object.Destroy((Object)(object)biomeLight); } } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_poison *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_Bulwark : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Bulwark")] public static float m_baseTTL = 12f; public float damageTakenModifier = 0.75f; private float m_timer; public SE_Bulwark() { ((Object)this).name = "SE_VL_Bulwark"; base.m_icon = AbilityIcon; base.m_tooltip = $"Reduces damage taken by {Math.Floor((1f - damageTakenModifier) * 100f)}% + .05%*Abjuration"; base.m_name = "Bulwark"; base.m_ttl = m_baseTTL; } public override void OnDamaged(HitData hit, Character attacker) { float num = damageTakenModifier - ((IEnumerable)base.m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level / 200f; ((DamageTypes)(ref hit.m_damage)).Modify(num * VL_GlobalConfigs.c_valkyrieBulwark); ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Charm : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Charm")] public static float m_baseTTL = 30f; public float speedModifier = 1.2f; public float healthRegen = 1f; public float damageModifier = 1f; private float m_timer; private float m_interval = 1f; public Player summoner; public Faction originalFaction; public SE_Charm() { ((Object)this).name = "SE_VL_Charm"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Charm"; ((StatusEffect)this).m_name = "VL_Charm"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void UpdateStatusEffect(float dt) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_boar_pet"), ((StatusEffect)this).m_character.GetEyePoint(), Quaternion.identity); if (((StatusEffect)this).GetRemaningTime() <= m_interval) { ((StatusEffect)this).m_character.m_faction = originalFaction; } } ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool CanAdd(Character character) { return !character.IsPlayer(); } } public class SE_Companion : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Companion")] public static float m_baseTTL = 600f; public float speedModifier = 1.2f; public float healthRegen = 1f; public float damageModifier = 1f; public float damageTakenModifier = 1f; private float m_timer; private float m_interval = 5f; private float m_targetTimer; private const float m_targetInterval = 0.5f; public Player summoner; public Character priorityTarget; public SE_Companion() { ((Object)this).name = "SE_VL_Companion"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Companion"; ((StatusEffect)this).m_name = "Companion"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) speed *= speedModifier; ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void OnDamaged(HitData hit, Character attacker) { if (damageTakenModifier < 1f) { ((DamageTypes)(ref hit.m_damage)).Modify(damageTakenModifier); } ((StatusEffect)this).OnDamaged(hit, attacker); } public override void UpdateStatusEffect(float dt) { ((SE_Stats)this).UpdateStatusEffect(dt); m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; ((StatusEffect)this).m_character.Heal(healthRegen, true); } m_targetTimer -= dt; if (m_targetTimer <= 0f) { m_targetTimer = 0.5f; VL_Utility.UpdateCompanionTarget(this); } } public override bool IsDone() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if (((StatusEffect)this).m_ttl > 0f && ((StatusEffect)this).m_time > ((StatusEffect)this).m_ttl) { ZLog.Log((object)("killing " + ((StatusEffect)this).m_character.m_name)); HitData val = new HitData(); val.m_damage.m_spirit = 99999f; ((StatusEffect)this).m_character.ApplyDamage(val, true, true, (DamageModifier)6); } return ((StatusEffect)this).IsDone(); } public override bool CanAdd(Character character) { return !character.IsPlayer(); } } public class SE_DyingLight_CD : StatusEffect { public static Sprite AbilityIcon = ZNetScene.instance.GetPrefab("TrophySkeleton").GetComponent().m_itemData.GetIcon(); public static GameObject GO_SEFX; public SE_DyingLight_CD() { ((Object)this).name = "SE_VL_DyingLight_CD"; base.m_icon = ZNetScene.instance.GetPrefab("TrophySkeleton").GetComponent().m_itemData.GetIcon(); base.m_tooltip = "Dying Light has prevented a killing blow. Dying Light will not trigger again until this cooldown expires."; base.m_name = "Dying Light"; } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Enrage : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Enrage")] public static float m_baseTTL = 16f; public float speedModifier = Class_Shaman.enrage_speedmodifier_base; private float m_timer; private float m_interval = 1f; public float staminaModifier = Class_Shaman.enrage_staminamodifier_base; public bool doOnce = true; public SE_Enrage() { ((Object)this).name = "SE_VL_Enrage"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = $"Enraged by a shaman, regenerating {staminaModifier} stamina per second and moving {(int)((speedModifier - 1f) * 100f)}% faster"; ((StatusEffect)this).m_name = "Enrage"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) speed *= speedModifier; ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { ((SE_Stats)this).UpdateStatusEffect(dt); if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = 20f + 0.2f * num; staminaModifier = (5f + 0.1f * num) * VL_GlobalConfigs.c_shamanEnrage; speedModifier = 1.2f + 0.002f * num; ((StatusEffect)this).m_tooltip = $"Enraged by a shaman, regenerating {staminaModifier} stamina per second and moving {(int)((speedModifier - 1f) * 100f)}% faster"; } m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; ((StatusEffect)this).m_character.AddStamina(staminaModifier); } } public override bool CanAdd(Character character) { return true; } } public class SE_Execute : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Execute")] public static float m_baseTTL = 3f; public float staggerForce = Class_Berserker.execute_staggerbonus; public float damageBonus = Class_Berserker.execute_damagebonus; public int hitCount = (int)Class_Berserker.execute_charges_base; public SE_Execute() { ((Object)this).name = "SE_VL_Execute"; base.m_icon = AbilityIcon; base.m_tooltip = $"Increases damage of next {hitCount} hits by {(int)((damageBonus - 1f) * 100f)}%"; base.m_name = "Execute"; base.m_ttl = m_baseTTL; } public override void UpdateStatusEffect(float dt) { base.m_ttl = hitCount; base.m_time = 0f; ((StatusEffect)this).UpdateStatusEffect(dt); } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Monk : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Monk")] public static float m_baseTTL = 5f; private float m_timer; public int hitCount; private float m_interval = 12f; private int maxHitCount = 5; public bool surging; private float m_SurgeTimer = 1f; private float m_SurgeInterval = 1f; public SE_Monk() { ((Object)this).name = "SE_VL_Monk"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "You're a bit of a Tavern Brawler yourself."; ((StatusEffect)this).m_name = "Monk"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) if (surging) { float level = ((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; speed *= 1.2f + 0.003f * level; } ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { m_timer -= dt; if (m_timer <= 0f) { maxHitCount = 10 + Mathf.RoundToInt(((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level * 0.2f); m_timer = m_interval * VL_GlobalConfigs.c_monkChiDuration; hitCount--; hitCount = Mathf.Clamp(hitCount, 0, maxHitCount); } m_SurgeTimer -= dt; if (surging && m_SurgeTimer <= 0f) { hitCount--; m_SurgeTimer = m_SurgeInterval; float level = ((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; ((StatusEffect)this).m_character.Heal(0.2f * level * VL_GlobalConfigs.c_monkSurge, true); ((StatusEffect)this).m_character.AddStamina(0.4f * level * VL_GlobalConfigs.c_monkSurge); if (hitCount <= 0) { hitCount = 0; surging = false; m_SurgeTimer = m_SurgeInterval; } } ((StatusEffect)this).m_ttl = hitCount; ((StatusEffect)this).m_time = 0f; ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool IsDone() { return ValheimLegends.vl_player.vl_class != ValheimLegends.PlayerClass.Monk; } public override bool CanAdd(Character character) { if (character.IsPlayer()) { return ValheimLegends.vl_player.vl_class == ValheimLegends.PlayerClass.Monk; } return false; } } public class SE_PowerShot : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_PowerShot")] public static float m_baseTTL = 3f; public float damageBonus = Class_Ranger.powershot_damagebonus_base; public int hitCount = Class_Ranger.powershot_charges_base; public bool shouldActivate = true; public SE_PowerShot() { ((Object)this).name = "SE_VL_PowerShot"; base.m_icon = AbilityIcon; base.m_tooltip = $"Increases damage of next {hitCount} projectiles by {(int)((damageBonus - 1f) * 100f)}%"; base.m_name = "PowerShot"; base.m_ttl = m_baseTTL; } public override void UpdateStatusEffect(float dt) { base.m_ttl = hitCount; base.m_time = 0f; ((StatusEffect)this).UpdateStatusEffect(dt); } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Ranger : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Ranger")] public static float m_baseTTL = 2f; private float m_timer; public float hitCount; private float m_interval = 1f; private int maxHitCount = 5; public SE_Ranger() { ((Object)this).name = "SE_VL_Ranger"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Shooty McShootface"; ((StatusEffect)this).m_name = "Ranger"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_poison *= 0.75f * VL_GlobalConfigs.c_rangerBonusPoisonResistance; ((StatusEffect)this).OnDamaged(hit, attacker); } public override void ModifyRunStaminaDrain(float baseDrain, ref float drain, Vector3 dir) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) drain *= 0.75f * VL_GlobalConfigs.c_rangerBonusRunCost; ((SE_Stats)this).ModifyRunStaminaDrain(baseDrain, ref drain, dir); } public override void UpdateStatusEffect(float dt) { m_timer -= dt; if (m_timer <= 0f) { m_timer = m_interval; hitCount -= 1f; hitCount = Mathf.Clamp(hitCount, 0f, (float)maxHitCount); } ((StatusEffect)this).m_ttl = hitCount; ((StatusEffect)this).m_time = 0f; ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool IsDone() { return ValheimLegends.vl_player.vl_class != ValheimLegends.PlayerClass.Ranger; } public override bool CanAdd(Character character) { if (character.IsPlayer()) { return ValheimLegends.vl_player.vl_class == ValheimLegends.PlayerClass.Ranger; } return false; } } public class SE_Regeneration : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Regeneration")] public float m_damageInterval = 2f; public static float m_baseTTL = 20f; public float m_TTLPerDamagePlayer = 2f; public float m_TTLPerDamage = 2f; public float m_TTLPower = 0.5f; public float m_HealAmount = 2f; private float m_timer; public bool doOnce = true; public SE_Regeneration() { ((Object)this).name = "SE_VL_Regeneration"; base.m_icon = AbilityIcon; base.m_tooltip = $"Regenerating {m_HealAmount} hp every second"; base.m_name = "Regeneration"; base.m_activationAnimation = "vfx_Potion_health_medium"; base.m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { ((StatusEffect)this).UpdateStatusEffect(dt); if (doOnce) { doOnce = false; m_HealAmount = (2f + 0.25f * (base.m_character.GetSkills().GetTotalSkill() / (float)base.m_character.GetSkills().GetSkillList().Count)) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_druidRegen; } m_timer -= dt; if (m_timer <= 0f) { m_timer = m_damageInterval; base.m_character.Heal(m_HealAmount, true); } } public override bool CanAdd(Character character) { return true; } } public class SE_Riposte : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Riposte")] public static float m_baseTTL = 2f; private float m_timer; public float damageMultiplier = 1.5f; public SE_Riposte() { ((Object)this).name = "SE_VL_Riposte"; base.m_icon = AbilityIcon; base.m_tooltip = "Ready to Riposte an enemy attack"; base.m_name = "Riposte"; base.m_ttl = m_baseTTL; } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Rogue : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Rogue")] public static float m_baseTTL = 2f; private float m_timer; public int hitCount = 1; private float m_interval = 20f; private int maxHitCount = 1; public SE_Rogue() { ((Object)this).name = "SE_VL_Rogue"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Sneaky sneaky"; ((StatusEffect)this).m_name = "Rogue"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).m_character.IsSneaking()) { speed *= 1.5f + 0.01f * ((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; } ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { m_timer -= dt; if (m_timer <= 0f) { maxHitCount = 1 + Mathf.RoundToInt(((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level * 0.1f); m_timer = m_interval * VL_GlobalConfigs.c_rogueTrickCharge; hitCount++; hitCount = Mathf.Clamp(hitCount, 0, maxHitCount); } ((StatusEffect)this).m_ttl = hitCount; ((StatusEffect)this).m_time = 0f; ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool IsDone() { return ValheimLegends.vl_player.vl_class != ValheimLegends.PlayerClass.Rogue; } public override bool CanAdd(Character character) { if (character.IsPlayer()) { return ValheimLegends.vl_player.vl_class == ValheimLegends.PlayerClass.Rogue; } return false; } } public class SE_RootsBuff : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_RootsBuff")] public static float m_baseTTL = 200f; public float staminaRegen = 1f; public float damageModifier = 1f; private float m_timer; private float m_interval = 1f; public Player summoner; public Vector3 centerPoint; public SE_RootsBuff() { ((Object)this).name = "SE_VL_RootsBuff"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "RootsBuff"; ((StatusEffect)this).m_name = "RootsBuff"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void UpdateStatusEffect(float dt) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((SE_Stats)this).UpdateStatusEffect(dt); m_timer -= dt; if (!(m_timer <= 0f)) { return; } m_timer = m_interval; if ((Object)(object)summoner != (Object)null) { if (((Character)summoner).IsDead()) { ((StatusEffect)this).m_time = ((StatusEffect)this).m_ttl + 1f; return; } _ = centerPoint; if (Vector3.Distance(((Component)summoner).transform.position, centerPoint) <= 5f) { ((Character)summoner).AddStamina(staminaRegen); } } else { ((StatusEffect)this).m_time = ((StatusEffect)this).m_ttl + 1f; } } public override bool CanAdd(Character character) { return !character.IsPlayer(); } } public class SE_SeedRegeneration : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_SeedRegeneration")] public float m_damageInterval = 1f; public static float m_baseTTL = 6f; public float m_HealAmount = 5f; private float m_timer; public bool doOnce = true; public SE_SeedRegeneration() { ((Object)this).name = "SE_VL_SeedRegeneration"; base.m_icon = AbilityIcon; base.m_tooltip = "Currently chewing on seeds"; base.m_name = "SeedRegeneration"; base.m_activationAnimation = "vfx_Potion_health_medium"; base.m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { m_timer -= dt; if (m_timer <= 0f) { m_timer = m_damageInterval; base.m_character.AddStamina(m_HealAmount); } ((StatusEffect)this).UpdateStatusEffect(dt); } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_ShadowStalk : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_ShadowStalk")] public static float m_baseTTL = 20f; public float speedDuration = 3f; public float speedAmount = 1.75f; private float m_timer = 1f; public SE_ShadowStalk() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) ((Object)this).name = "SE_VL_ShadowStalk"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Fade into the shadows, moving faster and augmenting stealth"; ((StatusEffect)this).m_name = "ShadowStalk"; ((StatusEffect)this).m_ttl = m_baseTTL; base.m_stealthModifier = 0.1f; base.m_noiseModifier = 0.1f; base.m_raiseSkill = (SkillType)101; base.m_raiseSkillModifier = 2f; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).m_character.IsSneaking()) { speed *= (1.5f + 0.01f * ((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level) * VL_GlobalConfigs.c_rangerShadowStalk; } else if (speedDuration > 0f) { speed *= speedAmount; } ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { ((SE_Stats)this).UpdateStatusEffect(dt); m_timer -= dt; if (m_timer <= 0f) { m_timer = 1f; speedDuration -= 1f; } } public override bool CanAdd(Character character) { return character.IsPlayer(); } } public class SE_Shell : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Shell")] public static float m_baseTTL = 25f; public float resistModifier = Class_Shaman.shell_resistModifier_base; public float spiritDamageOffset = Class_Shaman.shell_spiritdamage_base; public bool doOnce = true; public SE_Shell() { ((Object)this).name = "SE_VL_Shell"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = $"Reduces elemental damage taken by {(int)((1f - resistModifier) * 100f)}%, while adding {(int)spiritDamageOffset} Spirit damage to your attacks"; ((StatusEffect)this).m_name = "Shell"; ((StatusEffect)this).m_ttl = m_baseTTL; doOnce = true; } public override void UpdateStatusEffect(float dt) { if (doOnce) { doOnce = false; float num = ((StatusEffect)this).m_character.GetSkills().GetTotalSkill() / (float)((StatusEffect)this).m_character.GetSkills().GetSkillList().Count; ((StatusEffect)this).m_ttl = m_baseTTL + 0.3f * num; spiritDamageOffset = (Class_Shaman.shell_spiritdamage_base + Class_Shaman.shell_spiritdamage_scaling * num) * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_shamanShell; resistModifier = (Class_Shaman.shell_resistModifier_base - Class_Shaman.shell_resistModifier_negscaling * num) * VL_GlobalConfigs.c_shamanShell; ((StatusEffect)this).m_tooltip = $"Reduces elemental damage taken by {(int)((1f - resistModifier) * 100f)}%, while adding {(int)spiritDamageOffset}% Spirit damage"; } ((SE_Stats)this).UpdateStatusEffect(dt); } public override void OnDamaged(HitData hit, Character attacker) { hit.m_damage.m_fire *= resistModifier; hit.m_damage.m_frost *= resistModifier; hit.m_damage.m_lightning *= resistModifier; hit.m_damage.m_poison *= resistModifier; hit.m_damage.m_spirit *= resistModifier; ((StatusEffect)this).OnDamaged(hit, attacker); } public override bool CanAdd(Character character) { return true; } } public class SE_Slow : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Slow")] public static float m_baseTTL = 4f; public float speedDuration = 3f; public float speedAmount = 0.4f; private float m_timer = 1f; public SE_Slow() { ((Object)this).name = "SE_VL_Slow"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Slow"; ((StatusEffect)this).m_name = "Slow"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) speed *= speedAmount; ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override bool CanAdd(Character character) { return true; } } public class SE_SpiritDrain : StatusEffect { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_SpiritDrain")] public float m_damageInterval = 1f; public static float m_baseTTL = 10f; private float m_timer; public float damageModifier = 1f; public SE_SpiritDrain() { ((Object)this).name = "SE_VL_SpiritDrain"; base.m_icon = AbilityIcon; base.m_tooltip = "Spirit Drain"; base.m_name = "Spirit Drain"; base.m_ttl = m_baseTTL; } public override void UpdateStatusEffect(float dt) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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) ((StatusEffect)this).UpdateStatusEffect(dt); m_timer -= dt; if (m_timer <= 0f) { m_timer = m_damageInterval; HitData val = new HitData(); val.m_damage.m_spirit = (float)Random.Range(2, 4) * damageModifier * VL_GlobalConfigs.g_DamageModifer; val.m_point = base.m_character.GetEyePoint(); base.m_character.ApplyDamage(val, true, true, (DamageModifier)0); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_wraith_hit"), base.m_character.GetCenterPoint(), Quaternion.identity); } } public override bool CanAdd(Character character) { return true; } } public class SE_Valkyrie : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Valkyrie")] public static float m_baseTTL = 5f; private float m_timer; public int hitCount; private float m_interval = 15f; private int maxHitCount = 5; public SE_Valkyrie() { ((Object)this).name = "SE_VL_Valkyrie"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Valkyrie"; ((StatusEffect)this).m_name = "Valkyrie"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override void UpdateStatusEffect(float dt) { m_timer -= dt; if (m_timer <= 0f) { maxHitCount = 5 + Mathf.RoundToInt(((IEnumerable)((StatusEffect)this).m_character.GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level * 0.1f); m_timer = m_interval * VL_GlobalConfigs.c_valkyrieChargeDuration; hitCount--; hitCount = Mathf.Clamp(hitCount, 0, maxHitCount); } ((StatusEffect)this).m_ttl = hitCount; ((StatusEffect)this).m_time = 0f; ((SE_Stats)this).UpdateStatusEffect(dt); } public override bool IsDone() { return ValheimLegends.vl_player.vl_class != ValheimLegends.PlayerClass.Valkyrie; } public override bool CanAdd(Character character) { if (character.IsPlayer()) { return ValheimLegends.vl_player.vl_class == ValheimLegends.PlayerClass.Valkyrie; } return false; } } public class SE_Weaken : SE_Stats { public static Sprite AbilityIcon; public static GameObject GO_SEFX; [Header("SE_VL_Weaken")] public static float m_baseTTL = 30f; public float interval = 1f; public float speedReduction = 0.8f; public float damageReduction = 0.25f; public float staminaDrain = 0.1f; private float m_timer = 1f; public SE_Weaken() { ((Object)this).name = "SE_VL_Weaken"; ((StatusEffect)this).m_icon = AbilityIcon; ((StatusEffect)this).m_tooltip = "Weaken"; ((StatusEffect)this).m_name = "Weaken"; ((StatusEffect)this).m_ttl = m_baseTTL; } public override void UpdateStatusEffect(float dt) { //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) ((SE_Stats)this).UpdateStatusEffect(dt); m_timer -= dt; if (m_timer <= 0f) { m_timer = interval; Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_WeakenStatus"), ((StatusEffect)this).m_character.GetEyePoint(), Quaternion.identity); } } public override void OnDamaged(HitData hit, Character attacker) { if (attacker.IsPlayer()) { attacker.AddStamina(5f + hit.GetTotalDamage() * staminaDrain); } ((StatusEffect)this).OnDamaged(hit, attacker); } public override void ModifySpeed(float baseSpeed, ref float speed, Character character, Vector3 dir) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) speed *= speedReduction; ((SE_Stats)this).ModifySpeed(baseSpeed, ref speed, character, dir); } public override bool CanAdd(Character character) { return true; } } [BepInPlugin("ValheimLegends", "ValheimLegends", "0.7.10")] public class ValheimLegends : BaseUnityPlugin { public class VL_Player { public string vl_name; public PlayerClass vl_class; } public enum PlayerClass { None = 0, Berserker = 1, Druid = 2, Metavoker = 3, Mage = 4, Priest = 5, Monk = 7, Ranger = 8, Duelist = 9, Enchanter = 10, Rogue = 11, Shaman = 16, Valkyrie = 32 } [HarmonyPatch(typeof(ZNet), "Awake")] [HarmonyPriority(int.MaxValue)] public static class ZNet_VL_Register { public static void Postfix(ZNet __instance, ZRoutedRpc ___m_routedRpc) { ___m_routedRpc.Register("VL_ConfigSync", (Action)VL_ConfigSync.RPC_VL_ConfigSync); } } [HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")] public static class ConfigServerSync { private static void Postfix(ref ZNet __instance, ZRpc rpc) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown ServerID = (long)AccessTools.Method(typeof(ZRoutedRpc), "GetServerPeerID", (Type[])null, (Type[])null).Invoke(ZRoutedRpc.instance, new object[0]); if (!__instance.IsServer()) { ZRoutedRpc.instance.InvokeRoutedRPC(ServerID, "VL_ConfigSync", new object[1] { (object)new ZPackage() }); } } } [HarmonyPatch(typeof(PlayerProfile), "SavePlayerToDisk", null)] public static class SaveVLPlayer_Patch { public static void Postfix(PlayerProfile __instance, string ___m_filename, string ___m_playerName) { //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_0053: Unknown result type (might be due to invalid IL or missing references) try { Directory.CreateDirectory(Utils.GetSaveDataPath((FileSource)1) + "/characters/VL"); string text = Utils.GetSaveDataPath((FileSource)1) + "/characters/VL/" + ___m_filename + "_vl.fch"; string text2 = Utils.GetSaveDataPath((FileSource)1) + "/characters/VL/" + ___m_filename + "_vl.fch.new"; ZPackage val = new ZPackage(); val.Write(GetPlayerClassNum); byte[] array = val.GenerateHash(); byte[] array2 = val.GetArray(); FileStream fileStream = File.Create(text2); BinaryWriter binaryWriter = new BinaryWriter(fileStream); binaryWriter.Write(array2.Length); binaryWriter.Write(array2); binaryWriter.Write(array.Length); binaryWriter.Write(array); binaryWriter.Flush(); fileStream.Flush(flushToDisk: true); fileStream.Close(); fileStream.Dispose(); if (File.Exists(text)) { File.Delete(text); } File.Move(text2, text); } catch (NullReferenceException) { } } } [HarmonyPatch(typeof(PlayerProfile), "LoadPlayerFromDisk", null)] public class LoadVLPlayer_Patch { public static void Postfix(PlayerProfile __instance, string ___m_filename, string ___m_playerName) { try { if (vl_playerList == null) { vl_playerList = new List(); } vl_playerList.Clear(); ZPackage val = LoadPlayerDataFromDisk(___m_filename); if (val != null) { int vl_class = val.ReadInt(); VL_Player vL_Player = new VL_Player(); vL_Player.vl_name = ___m_playerName; vL_Player.vl_class = (PlayerClass)vl_class; vl_playerList.Add(vL_Player); } } catch (Exception ex) { ZLog.LogWarning((object)("Exception while loading player VL profile: " + ex.ToString())); } } private static ZPackage LoadPlayerDataFromDisk(string m_filename) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown string path = Utils.GetSaveDataPath((FileSource)1) + "/characters/VL/" + m_filename + "_vl.fch"; FileStream fileStream; try { fileStream = File.OpenRead(path); } catch { return null; } byte[] array; try { BinaryReader binaryReader = new BinaryReader(fileStream); int count = binaryReader.ReadInt32(); array = binaryReader.ReadBytes(count); int count2 = binaryReader.ReadInt32(); binaryReader.ReadBytes(count2); } catch { ZLog.LogError((object)" error loading VL player data"); fileStream.Dispose(); return null; } fileStream.Dispose(); return new ZPackage(array); } } public enum SkillName { Discipline = 781, Abjuration = 791, Alteration = 792, Conjuration = 793, Evocation = 794, Illusion = 795 } [HarmonyPatch(typeof(Skills), "CheatRaiseSkill", null)] public class CheatRaiseSkill_VL_Patch { public static bool Prefix(Skills __instance, string name, float value, Player ___m_player) { if (VL_Console.CheatRaiseSkill(__instance, name, value, ___m_player)) { Console.instance.Print("Skill " + name + " raised " + value); return false; } return true; } } [HarmonyPatch(typeof(Terminal), "TryRunCommand", null)] public class Cheats_VL_Patch { public static void Postfix(Terminal __instance, string text, bool silentFail, bool skipAllowedCheck) { if (Object.op_Implicit((Object)(object)ZNet.instance) && ZNet.instance.IsServer() && Object.op_Implicit((Object)(object)Player.m_localPlayer) && __instance.IsCheatsEnabled() && playerEnabled) { string[] array = text.Split(' '); if (array.Length > 1 && array[0] == "vl_changeclass") { VL_Console.CheatChangeClass(array[1]); } } } } [HarmonyPatch(typeof(Aoe), "OnHit")] public static class Aoe_LOSCheck_Prefix { private static bool Prefix(Aoe __instance, Collider collider, Vector3 hitPoint, List ___m_hitList, ref bool __result) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) GameObject val = Projectile.FindHitObject(collider); if (___m_hitList.Contains(val)) { __result = false; return false; } IDestructible component = val.GetComponent(); if (component != null) { Character val2 = (Character)(object)((component is Character) ? component : null); if (Object.op_Implicit((Object)(object)val2) && !VL_Utility.LOS_IsValid(val2, ((Component)__instance).transform.position)) { __result = false; return false; } } return true; } } [HarmonyPatch(typeof(Humanoid), "GetCurrentWeapon")] public static class UnarmedDamage { private static ItemData Postfix(ItemData __weapon, ref Character __instance) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (__instance.IsPlayer() && __weapon != null && __weapon.m_shared.m_name == "Unarmed") { Player val = (Player)__instance; __weapon.m_shared.m_damages.m_blunt = ((Character)val).GetSkillFactor((SkillType)11) * VL_GlobalConfigs.g_UnarmedDamage * 100f; } return __weapon; } } [HarmonyPatch(typeof(Player), "ActivateGuardianPower", null)] public class ActivatePowerPrevention_Patch { public static bool Prefix(Player __instance, ref bool __result) { if (!shouldUseGuardianPower) { __result = false; return false; } return true; } } [HarmonyPatch(typeof(Player), "OnDodgeMortal", null)] public class DodgeBreaksChanneling_Patch { public static void Postfix(Player __instance) { if (isChanneling) { isChanneling = false; } } } [HarmonyPatch(typeof(Player), "StartGuardianPower", null)] public class StartPowerPrevention_Patch { public static bool Prefix(Player __instance, ref bool __result) { if (!shouldUseGuardianPower) { __result = false; return false; } return true; } } [HarmonyPatch(typeof(Player), "CanMove", null)] public class CanMove_Casting_Patch { public static void Postfix(Player __instance, ref bool __result) { if (isChanneling) { __result = false; } } } [HarmonyPatch(typeof(Menu), "OnQuit", null)] public class QuitYes_Patch { public static bool Prefix() { RemoveSummonedWolf(); return true; } } [HarmonyPatch(typeof(Menu), "OnLogout", null)] public class RemoveWolfOnLogout_Patch { public static bool Prefix() { RemoveSummonedWolf(); return true; } } [HarmonyPatch(typeof(Attack), "Start", null)] public class ShadowWolfAttack_Patch { public static bool Prefix(Attack __instance, Humanoid character, Rigidbody body, ZSyncAnimation zanim, CharacterAnimEvent animEvent, VisEquipment visEquipment, ItemData weapon, Attack previousAttack, float timeSinceLastAttack, float attackDrawPercentage, string ___m_attackAnimation) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character != (Object)null && (((Character)character).m_name == "Shadow Wolf" || ((Character)character).m_name.Contains("Demon Wolf"))) { Vector3 val = ((Component)character).transform.position + ((Component)character).transform.up * 0.3f; RaycastHit val2 = default(RaycastHit); Physics.SphereCast(val, 0.2f, ((Component)character).transform.forward, ref val2, 3f, Script_WolfAttackMask); if ((Object)(object)((RaycastHit)(ref val2)).collider != (Object)null && (Object)(object)((Component)((RaycastHit)(ref val2)).collider).gameObject != (Object)null) { Character val3 = default(Character); ((Component)((RaycastHit)(ref val2)).collider).gameObject.TryGetComponent(ref val3); bool flag = (Object)(object)val3 != (Object)null; if ((Object)(object)val3 == (Object)null) { val3 = (Character)((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent(typeof(Character)); flag = (Object)(object)val3 != (Object)null; if ((Object)(object)val3 == (Object)null) { val3 = ((Component)((RaycastHit)(ref val2)).collider).GetComponentInChildren(); flag = (Object)(object)val3 != (Object)null; } } if (flag && BaseAI.IsEnemy(val3, (Character)(object)character) && !val3.IsDodgeInvincible()) { _ = val - val3.GetEyePoint(); float num = Random.Range(0.6f, 1.2f); if (((Character)character).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { SE_Companion sE_Companion = (SE_Companion)(object)((Character)character).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")); num *= sE_Companion.damageModifier; } HitData val4 = new HitData(); val4.m_damage = weapon.GetDamage(); val4.m_damage.m_slash = weapon.GetDamage().m_slash * num; val4.m_point = ((RaycastHit)(ref val2)).point; val4.m_dir = ((Component)val3).transform.position - ((Component)character).transform.position; val4.m_skill = (SkillType)11; if (val3.IsBlocking()) { Player val5 = (Player)(object)((val3 is Player) ? val3 : null); if ((Object)(object)val5 != (Object)null) { AccessTools.Method(typeof(Humanoid), "BlockAttack", (Type[])null, (Type[])null).Invoke(val5, new object[2] { val4, character }); } } else { val3.Damage(val4); } } } } return true; } } [HarmonyPatch(typeof(BaseAI), "IsEnemy", new Type[] { typeof(Character), typeof(Character) })] public class CompanionIsEnemy_Patch { public static void Postfix(Character a, Character b, ref bool __result) { if (__result) { return; } Character val = null; Character val2 = null; if ((Object)(object)a != (Object)null && a.GetSEMan() != null && a.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { val = a; val2 = b; } else if ((Object)(object)b != (Object)null && b.GetSEMan() != null && b.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { val = b; val2 = a; } if (!((Object)(object)val == (Object)null) && !((Object)(object)val2 == (Object)null)) { SE_Companion sE_Companion = val.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")) as SE_Companion; if ((Object)(object)sE_Companion != (Object)null && VL_Utility.IsExtraCompanionTarget(val2, sE_Companion.summoner)) { __result = true; } } } } [HarmonyPatch(typeof(BaseAI), "Flee")] public class CompanionNoFlee_Patch { public static bool Prefix(BaseAI __instance) { Character component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && component.GetSEMan() != null && component.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")) && VL_Utility.CompanionShouldHoldGround(component)) { return false; } return true; } } [HarmonyPatch(typeof(MonsterAI), "PheromoneFleeCheck")] public class CompanionPheromoneFlee_Patch { public static bool Prefix(MonsterAI __instance, ref bool __result) { Character component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && component.GetSEMan() != null && component.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")) && VL_Utility.CompanionShouldHoldGround(component)) { __result = false; return false; } return true; } } [HarmonyPatch(typeof(BaseAI), "CanSenseTarget", new Type[] { typeof(Character) })] public class CanSee_Shadow_Patch { public static bool Prefix(BaseAI __instance, Character target, ref bool __result) { if ((Object)(object)target != (Object)null) { Player val = (Player)(object)((target is Player) ? target : null); if ((Object)(object)val != (Object)null && ((Character)val).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_ShadowStalk")) && ((Character)val).IsCrouching()) { __result = false; return false; } } return true; } } [HarmonyPatch(typeof(Character), "UpdateGroundContact", null)] public class Valkyrie_ValidateHeight_Patch { public static bool Prefix(Character __instance, ref float ___m_maxAirAltitude, bool ___m_groundContact) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (vl_player != null && vl_player.vl_class == PlayerClass.Monk && ___m_groundContact && Mathf.Max(0f, ___m_maxAirAltitude - ((Component)__instance).transform.position.y) > 4f) { ___m_maxAirAltitude -= 6f; } return true; } public static void Postfix(Character __instance, float ___m_maxAirAltitude, bool ___m_groundContact) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)(object)Player.m_localPlayer && Class_Valkyrie.inFlight && Mathf.Max(0f, ___m_maxAirAltitude - ((Component)__instance).transform.position.y) > 1f) { shouldValkyrieImpact = true; } } } [HarmonyPatch(typeof(Character), "ResetGroundContact", null)] public class Valkyrie_GroundContact_Patch { public static void Postfix(Character __instance, float ___m_maxAirAltitude, bool ___m_groundContact) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)(object)Player.m_localPlayer && shouldValkyrieImpact) { float altitude = Mathf.Max(0f, ___m_maxAirAltitude - ((Component)__instance).transform.position.y); shouldValkyrieImpact = false; if (vl_player.vl_class == PlayerClass.Valkyrie) { Class_Valkyrie.Impact_Effect(Player.m_localPlayer, altitude); Class_Valkyrie.inFlight = false; } if (vl_player.vl_class == PlayerClass.Monk) { Class_Monk.Impact_Effect(Player.m_localPlayer, altitude); } } } } [HarmonyPatch(typeof(Humanoid), "UseItem")] internal class UseItemPatch { public static bool Prefix(Humanoid __instance, Inventory inventory, ItemData item, bool fromInventoryGui, Inventory ___m_inventory, ZSyncAnimation ___m_zanim) { //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) string name = item.m_shared.m_name; Player val = (Player)(object)((__instance is Player) ? __instance : null); if ((Object)(object)val != (Object)null && vl_player != null && val.GetPlayerName() == vl_player.vl_name && vl_player.vl_class == PlayerClass.Druid && (name.Contains("$item_pinecone") || name.Contains("$item_beechseeds") || name.Contains("$item_fircone") || name.Contains("$item_ancientseed") || name.Contains("$item_birchseeds"))) { if (inventory == null) { inventory = ___m_inventory; } if (!inventory.ContainsItem(item)) { return false; } GameObject hoverObject = __instance.GetHoverObject(); if ((Object.op_Implicit((Object)(object)hoverObject) ? hoverObject.GetComponentInParent() : null) != null && !fromInventoryGui) { Interactable componentInParent = hoverObject.GetComponentInParent(); if (componentInParent != null && componentInParent.UseItem(__instance, item)) { return false; } } SE_SeedRegeneration sE_SeedRegeneration = (SE_SeedRegeneration)(object)ScriptableObject.CreateInstance(typeof(SE_SeedRegeneration)); ((StatusEffect)sE_SeedRegeneration).m_ttl = SE_SeedRegeneration.m_baseTTL; ((StatusEffect)sE_SeedRegeneration).m_icon = item.GetIcon(); if (name.Contains("$item_pinecone")) { sE_SeedRegeneration.m_HealAmount = 10f; } else if (name.Contains("$item_ancientseed")) { sE_SeedRegeneration.m_HealAmount = 20f; } else if (name.Contains("$item_fircone")) { sE_SeedRegeneration.m_HealAmount = 7f; } else if (name.Contains("$item_birchseeds")) { sE_SeedRegeneration.m_HealAmount = 12f; } else { sE_SeedRegeneration.m_HealAmount = 5f; } sE_SeedRegeneration.m_HealAmount *= VL_GlobalConfigs.c_druidBonusSeeds; ((Character)val).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_SeedRegeneration, true, 0, 0f); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"), ((Component)val).transform.position, Quaternion.identity); inventory.RemoveOneItem(item); __instance.m_consumeItemEffects.Create(((Component)Player.m_localPlayer).transform.position, Quaternion.identity, (Transform)null, 1f, -1); ___m_zanim.SetTrigger("eat"); return false; } return true; } } [HarmonyPatch(typeof(Character), "Stagger", null)] public class VL_StaggerPrevention_Patch { public static bool Prefix(Character __instance) { if (__instance.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk"))) { return false; } if (__instance.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { return false; } return true; } } [HarmonyPatch(typeof(Attack), "GetAttackStamina", null)] public class AttackStaminaReduction_Patch { public static void Postfix(Attack __instance, ItemData ___m_weapon, ref float __result) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 if (___m_weapon != null && vl_player != null && vl_player.vl_class == PlayerClass.Berserker && (int)___m_weapon.m_shared.m_itemType == 14) { __result *= 0.7f * VL_GlobalConfigs.c_berserkerBonus2h; } } } [HarmonyPatch(typeof(Character), "Damage", null)] public class VL_Damage_Patch { public static bool Prefix(Character __instance, ref HitData hit, float ___m_maxAirAltitude) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) Character attacker = hit.GetAttacker(); if ((Object)(object)__instance == (Object)(object)Player.m_localPlayer && Class_Valkyrie.inFlight) { Class_Valkyrie.inFlight = false; return false; } if (__instance.GetSEMan() != null && __instance.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Charm")) && attacker.IsPlayer()) { SE_Charm sE_Charm = (SE_Charm)(object)__instance.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Charm")); __instance.m_faction = sE_Charm.originalFaction; __instance.GetSEMan().RemoveStatusEffect((StatusEffect)(object)sE_Charm, true); } if ((Object)(object)attacker != (Object)null) { Player val = (Player)(object)((attacker is Player) ? attacker : null); if ((Object)(object)val != (Object)null && !__instance.IsPlayer()) { VL_Utility.NotifyCompanionSummonerAttack(val, __instance); } if (__instance.m_name == "Shadow Wolf" && !BaseAI.IsEnemy(__instance, attacker)) { ((DamageTypes)(ref hit.m_damage)).Modify(0.1f); } Player val2 = (Player)(object)((attacker is Player) ? attacker : null); if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Weaken"))) { SE_Weaken sE_Weaken = (SE_Weaken)(object)attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Weaken")); ((DamageTypes)(ref hit.m_damage)).Modify(1f - sE_Weaken.damageReduction); } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_ShadowStalk"))) { attacker.GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_ShadowStalk"), true); } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Rogue")) && Class_Rogue.PlayerUsingDaggerOnly) { ((DamageTypes)(ref hit.m_damage)).Modify(1.25f); } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk"))) { SE_Monk sE_Monk = (SE_Monk)(object)attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk")); if (Class_Monk.PlayerIsUnarmed) { ((DamageTypes)(ref hit.m_damage)).Modify(1.25f); sE_Monk.hitCount++; } } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Shell"))) { SE_Shell sE_Shell = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Shell")) as SE_Shell; hit.m_damage.m_spirit += sE_Shell.spiritDamageOffset; } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeMist"))) { SE_BiomeMist sE_BiomeMist = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeMist")) as SE_BiomeMist; hit.m_damage.m_frost += sE_BiomeMist.iceDamageOffset; } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeAsh"))) { SE_BiomeAsh sE_BiomeAsh = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeAsh")) as SE_BiomeAsh; hit.m_damage.m_fire += sE_BiomeAsh.fireDamageOffset; } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk"))) { SE_Berserk sE_Berserk = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk")) as SE_Berserk; attacker.AddStamina(hit.GetTotalDamage() * sE_Berserk.healthAbsorbPercent); } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Execute"))) { SE_Execute sE_Execute = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Execute")) as SE_Execute; HitData obj = hit; obj.m_staggerMultiplier *= sE_Execute.staggerForce; ((DamageTypes)(ref hit.m_damage)).Modify(sE_Execute.damageBonus); sE_Execute.hitCount--; if (sE_Execute.hitCount <= 0) { attacker.GetSEMan().RemoveStatusEffect((StatusEffect)(object)sE_Execute, true); } } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { SE_Companion sE_Companion = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")) as SE_Companion; ((DamageTypes)(ref hit.m_damage)).Modify(sE_Companion.damageModifier); } if (attacker.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_RootsBuff"))) { SE_RootsBuff sE_RootsBuff = attacker.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_RootsBuff")) as SE_RootsBuff; ((DamageTypes)(ref hit.m_damage)).Modify(sE_RootsBuff.damageModifier); } if (vl_player != null && (Object)(object)val2 != (Object)null && vl_player.vl_name == val2.GetPlayerName()) { if (vl_player.vl_class == PlayerClass.Berserker) { ((DamageTypes)(ref hit.m_damage)).Modify(1f + (1f - attacker.GetHealthPercentage()) * 0.4f * VL_GlobalConfigs.c_berserkerBonusDamage); } else if (vl_player.vl_class == PlayerClass.Enchanter && Random.value > 0.3f) { float level = ((IEnumerable)((Character)val2).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == AlterationSkillDef)).m_level; float value = Random.value; if (value <= 0.4f) { hit.m_damage.m_fire += level * VL_GlobalConfigs.c_enchanterBonusElementalTouch; } else if (value <= 0.6f) { hit.m_damage.m_frost += level * VL_GlobalConfigs.c_enchanterBonusElementalTouch; } else { hit.m_damage.m_lightning += level * VL_GlobalConfigs.c_enchanterBonusElementalTouch; } } } } return true; } } [HarmonyPatch(typeof(Player), "TeleportTo", null)] public static class DestroySummonedWhenTeleporting_Patch { [HarmonyPriority(800)] public static bool Prefix(Player __instance) { RemoveSummonedWolf(); return true; } } [HarmonyPatch(typeof(Attack), "DoMeleeAttack", null)] public class MeleeAttack_Patch { public static bool Prefix(Attack __instance, Humanoid ___m_character, ref float ___m_damageMultiplier) { if (((Character)___m_character).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk"))) { SE_Berserk sE_Berserk = (SE_Berserk)(object)((Character)___m_character).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Berserk")); ___m_damageMultiplier *= sE_Berserk.damageModifier; } return true; } } [HarmonyPatch(typeof(Attack), "FireProjectileBurst", null)] public class ProjectileAttack_Prefix { public static bool Prefix(Attack __instance, Humanoid ___m_character, ref float ___m_attackDrawPercentage, ref float ___m_projectileVel, ref float ___m_forceMultiplier, ref float ___m_staggerMultiplier, ref float ___m_damageMultiplier, ref float ___m_projectileAccuracy, ref float ___m_projectileAccuracyMin, ref float ___m_projectileVelMin, ref ItemData ___m_weapon) { if (((Character)___m_character).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_PowerShot"))) { SE_PowerShot sE_PowerShot = ((Character)___m_character).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_PowerShot")) as SE_PowerShot; ___m_projectileVel *= Class_Ranger.powershot_velocitybonus_base; ___m_damageMultiplier = Class_Ranger.powershot_damagebonus_base * VL_GlobalConfigs.c_rangerPowerShot + ((IEnumerable)((Character)___m_character).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == DisciplineSkillDef)).m_level * Class_Ranger.powershot_damagebonus_scaling; sE_PowerShot.hitCount--; if (sE_PowerShot.hitCount <= 0) { ((Character)___m_character).GetSEMan().RemoveStatusEffect((StatusEffect)(object)sE_PowerShot, true); } } if (((Character)___m_character).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ranger")) && ((SE_Ranger)(object)((Character)___m_character).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ranger"))).hitCount > 0f) { ___m_attackDrawPercentage = 0.9f; } return true; } } [HarmonyPatch(typeof(Projectile), "OnHit", null)] public class Projectile_Hit_Patch { public static void Postfix(Projectile __instance, Collider collider, Vector3 hitPoint, bool water, float ___m_aoe, int ___s_rayMaskSolids, Character ___m_owner, Vector3 ___m_vel) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) if (((Object)__instance).name == "VL_Charm") { bool hitCharacter = false; if (!(__instance.m_aoe > 0f)) { return; } Collider[] array = Physics.OverlapSphere(hitPoint, __instance.m_aoe, ___s_rayMaskSolids, (QueryTriggerInteraction)0); HashSet hashSet = new HashSet(); Collider[] array2 = array; for (int i = 0; i < array2.Length; i++) { GameObject val = Projectile.FindHitObject(array2[i]); IDestructible component = val.GetComponent(); if (component == null || hashSet.Contains(val)) { continue; } hashSet.Add(val); if (IsValidTarget(component, ref hitCharacter, ___m_owner, __instance.m_dodgeable)) { Character val2 = null; val.TryGetComponent(ref val2); bool flag = (Object)(object)val2 != (Object)null; if ((Object)(object)val2 == (Object)null) { val2 = (Character)val.GetComponentInParent(typeof(Character)); flag = (Object)(object)val2 != (Object)null; } if (flag && !val2.IsPlayer() && ___m_owner is Player && !val2.m_boss) { Player val3 = (Player)(object)((___m_owner is Player) ? ___m_owner : null); SE_Charm sE_Charm = (SE_Charm)(object)ScriptableObject.CreateInstance(typeof(SE_Charm)); ((StatusEffect)sE_Charm).m_ttl = SE_Charm.m_baseTTL * VL_GlobalConfigs.c_enchanterCharm; sE_Charm.summoner = val3; sE_Charm.originalFaction = val2.m_faction; val2.m_faction = ((Character)val3).GetFaction(); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_boar_pet"), val2.GetEyePoint(), Quaternion.identity); val2.GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Charm, false, 0, 0f); } } } } else { if (!(((Object)__instance).name == "VL_ValkyrieSpear")) { return; } bool hitCharacter2 = false; if (!(__instance.m_aoe > 0f)) { return; } Collider[] array3 = Physics.OverlapSphere(hitPoint, __instance.m_aoe, ___s_rayMaskSolids, (QueryTriggerInteraction)0); HashSet hashSet2 = new HashSet(); Collider[] array2 = array3; Vector3 val8 = default(Vector3); for (int i = 0; i < array2.Length; i++) { GameObject val4 = Projectile.FindHitObject(array2[i]); IDestructible component2 = val4.GetComponent(); if (component2 == null || hashSet2.Contains(val4)) { continue; } hashSet2.Add(val4); if (IsValidTarget(component2, ref hitCharacter2, ___m_owner, __instance.m_dodgeable)) { Character val5 = null; val4.TryGetComponent(ref val5); bool flag2 = (Object)(object)val5 != (Object)null; if ((Object)(object)val5 == (Object)null) { val5 = (Character)val4.GetComponentInParent(typeof(Character)); flag2 = (Object)(object)val5 != (Object)null; } if (flag2 && !val5.IsPlayer() && ___m_owner is Player && !val5.m_boss) { Player val6 = (Player)(object)((___m_owner is Player) ? ___m_owner : null); Vector3 val7 = ((Component)val5).transform.position - ((Component)val6).transform.position; _ = ((Vector3)(ref val7)).magnitude; float num = val5.GetMass() * 0.05f; ((Vector3)(ref val8))..ctor(0f, 4f / num, 0f); val5.Stagger(val7); Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_ParticleLightburst"), ((Component)val5).transform.position, Quaternion.LookRotation(new Vector3(0f, 1f, 0f))); Traverse.Create((object)val5).Field("m_pushForce").SetValue((object)val8); } } } } } } [HarmonyPatch(typeof(Player), "InShelter", null)] public class PlayerShelter_BiomePatch { public static void Postfix(Player __instance, ref bool __result) { if (((Character)__instance).IsPlayer() && ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeBlackForest"))) { __result = true; } } } [HarmonyPatch(typeof(Character), "UpdateMotion", null)] public class ClassMotionUpdate_Postfix { public static bool Prefix(Character __instance, ref bool ___m_flying, float ___m_waterLevel) { if (vl_player != null && vl_player.vl_class == PlayerClass.Shaman && Class_Shaman.isWaterWalking) { ___m_flying = true; } return true; } } [HarmonyPatch(typeof(Player), "GetMaxCarryWeight", null)] public class PlayerCarryWeight_BiomePatch { public static void Postfix(Player __instance, ref float __result) { if (((Character)__instance).IsPlayer() && ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeBlackForest"))) { SE_BiomeBlackForest sE_BiomeBlackForest = (SE_BiomeBlackForest)(object)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_BiomeBlackForest")); __result += sE_BiomeBlackForest.carryModifier; } } } [HarmonyPatch(typeof(Humanoid), "BlockAttack", null)] public class Block_Class_Patch { public static bool Prefix(Humanoid __instance, HitData hit, Character attacker, float ___m_blockTimer, ItemData ___m_leftItem, ref bool __result) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)(object)Player.m_localPlayer) { if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Bulwark"))) { Class_Valkyrie.isBlocking = true; } else { if (vl_player.vl_class == PlayerClass.Duelist && ___m_leftItem == null) { if (Vector3.Dot(hit.m_dir, ((Component)__instance).transform.forward) > 0f) { __result = false; return false; } ItemData currentWeapon = __instance.GetCurrentWeapon(); if (currentWeapon == null) { __result = false; return false; } HitData val = new HitData(); val.m_damage = hit.m_damage; float level = ((IEnumerable)((Character)__instance).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == DisciplineSkillDef)).m_level; bool flag = currentWeapon.m_shared.m_timedBlockBonus > 1f && ___m_blockTimer != -1f && ___m_blockTimer < 0.25f; float skillFactor = ((Character)__instance).GetSkillFactor((SkillType)6); float num = currentWeapon.GetBlockPower(skillFactor); if (flag) { num *= currentWeapon.m_shared.m_timedBlockBonus; num = ((!((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Riposte"))) ? (num + 2f * level * VL_GlobalConfigs.c_duelistBonusParry) : (num + 10f * level * VL_GlobalConfigs.c_duelistBonusParry)); } float totalBlockableDamage = hit.GetTotalBlockableDamage(); float num2 = Mathf.Min(totalBlockableDamage, num); float num3 = Mathf.Clamp01(num2 / num); float num4 = __instance.m_blockStaminaDrain * num3 * 0.5f; ((Character)__instance).UseStamina(num4); bool num5 = ((Character)__instance).HaveStamina(0f); bool flag2 = num5 && num >= totalBlockableDamage; if (num5) { hit.m_statusEffectHash = StringExtensionMethods.GetStableHashCode(""); hit.BlockDamage(num2); DamageText.instance.ShowText((TextType)6, hit.m_point + Vector3.up * 0.5f, num2, false); } if (!num5 || !flag2) { ((Character)__instance).Stagger(hit.m_dir); } ((Character)__instance).RaiseSkill((SkillType)6, flag ? 2f : 1f); currentWeapon.m_shared.m_blockEffect.Create(hit.m_point, Quaternion.identity, (Transform)null, 1f, -1); if (Object.op_Implicit((Object)(object)attacker) && flag && flag2) { __instance.m_perfectBlockEffect.Create(hit.m_point, Quaternion.identity, (Transform)null, 1f, -1); if (attacker.m_staggerWhenBlocked) { attacker.Stagger(-hit.m_dir); } } if (flag2) { float num6 = Mathf.Clamp01(num3 * 0.5f); hit.m_pushForce *= num6; if (Object.op_Implicit((Object)(object)attacker) && flag) { HitData val2 = new HitData(); val2.m_pushForce = currentWeapon.GetDeflectionForce() * (1f - num6); val2.m_dir = ((Component)attacker).transform.position - ((Component)__instance).transform.position; val2.m_dir.y = 0f; ((Vector3)(ref val2.m_dir)).Normalize(); val2.m_point = attacker.GetEyePoint(); if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Riposte"))) { Vector3 val3 = ((Component)attacker).transform.position - ((Component)__instance).transform.position; if (((Vector3)(ref val3)).magnitude < 3f) { SE_Riposte sE_Riposte = ((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Riposte")) as SE_Riposte; val2.m_damage = val.m_damage; float num7 = Random.Range(0.85f, 1.15f) * sE_Riposte.damageMultiplier; ((DamageTypes)(ref val2.m_damage)).Modify(num7); ((Character)__instance).GetSEMan().RemoveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Riposte"), false); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(Player.m_localPlayer)).SetTrigger("atgeir_attack2"); ((Character)__instance).RaiseSkill(DisciplineSkill, VL_Utility.GetRiposteSkillGain * 2f); if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { StatusEffect statusEffect = ((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD")); statusEffect.m_ttl -= 5f; } if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { StatusEffect statusEffect2 = ((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD")); statusEffect2.m_ttl -= 5f; } } } attacker.Damage(val2); } } __result = true; return false; } Class_Valkyrie.isBlocking = false; } } return true; } } [HarmonyPatch(typeof(ItemData), "GetBaseBlockPower", new Type[] { typeof(int) })] public class BaseBlockPower_Bulwark_Patch { public static void Postfix(ItemData __instance, ref float __result) { if (Class_Valkyrie.isBlocking) { __result += 20f; } if (vl_player.vl_class == PlayerClass.Monk && __instance.m_shared != null && __instance.m_shared.m_name == "Unarmed") { __result += ((IEnumerable)((Character)Player.m_localPlayer).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == DisciplineSkillDef)).m_level * VL_GlobalConfigs.c_monkBonusBlock; } } } [HarmonyPatch(typeof(Character), "CheckDeath")] public class OnDeath_Patch { public static bool Prefix(Character __instance) { //IL_00f7: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) if (!__instance.IsDead() && __instance.GetHealth() <= 0f && vl_player != null) { Player val = (Player)(object)((__instance is Player) ? __instance : null); if ((Object)(object)val != (Object)null && vl_player.vl_class == PlayerClass.Priest && val.GetPlayerName() == vl_player.vl_name) { if (!__instance.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_DyingLight_CD"))) { StatusEffect val2 = (StatusEffect)(object)(SE_DyingLight_CD)(object)ScriptableObject.CreateInstance(typeof(SE_DyingLight_CD)); val2.m_ttl = 600f * VL_GlobalConfigs.c_priestBonusDyingLightCooldown; __instance.GetSEMan().AddStatusEffect(val2, false, 0, 0f); __instance.SetHealth(1f); return false; } } else if (vl_player.vl_class == PlayerClass.Shaman) { Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer != (Object)null && vl_player.vl_name == localPlayer.GetPlayerName() && Vector3.Distance(((Component)localPlayer).transform.position, ((Component)__instance).transform.position) <= 10f) { Object.Instantiate(ZNetScene.instance.GetPrefab("fx_VL_AbsorbSpirit"), ((Character)localPlayer).GetCenterPoint(), Quaternion.identity); ((Character)localPlayer).AddStamina(25f * VL_GlobalConfigs.c_shamanBonusSpiritGuide); } } } return true; } } [HarmonyPatch(typeof(HitData), "BlockDamage")] public static class BlockDamage_Patch { public static bool Prefix(HitData __instance, float damage, DamageTypes ___m_damage) { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) if (vl_player != null) { if (vl_player.vl_class == PlayerClass.Monk && Class_Monk.PlayerIsUnarmed) { if (__instance.GetTotalBlockableDamage() >= damage) { ((SE_Monk)(object)((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk"))).hitCount++; } } else if (vl_player.vl_class == PlayerClass.Valkyrie && Class_Valkyrie.PlayerUsingShield) { if (__instance.GetTotalBlockableDamage() >= damage) { ((SE_Valkyrie)(object)((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Valkyrie"))).hitCount++; } } else if (vl_player.vl_class == PlayerClass.Enchanter) { float totalBlockableDamage = __instance.GetTotalBlockableDamage(); float num = damage / totalBlockableDamage; if (num > 0f) { float num2 = ___m_damage.m_fire * num; float num3 = ___m_damage.m_frost * num; float num4 = ___m_damage.m_lightning * num; float num5 = num2 + num3 + num4; if (num5 > 0f) { ((Character)Player.m_localPlayer).AddStamina(num5 * VL_GlobalConfigs.c_enchanterBonusElementalBlock); ((Character)Player.m_localPlayer).RaiseSkill(AbjurationSkill, num); Object.Instantiate(ZNetScene.instance.GetPrefab("vfx_Potion_stamina_medium"), ((Component)Player.m_localPlayer).transform.position, Quaternion.identity); } } } } return true; } } [HarmonyPatch(typeof(Skills), "GetSkillDef")] public static class GetSkillDef_Patch { public static void Postfix(Skills __instance, SkillType type, List ___m_skills, ref SkillDef __result) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected I4, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(Localization), "AddWord", (Type[])null, (Type[])null); if (__result != null || legendsSkills == null) { return; } foreach (SkillDef legendsSkill in legendsSkills) { if (!___m_skills.Contains(legendsSkill)) { ___m_skills.Add(legendsSkill); methodInfo.Invoke(Localization.instance, new object[2] { "skill_" + ((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString(), ((SkillName)legendsSkill.m_skill/*cast due to .constrained prefix*/).ToString() }); } } __result = ((IEnumerable)___m_skills).FirstOrDefault((Func)((SkillDef x) => x.m_skill == type)); } } [HarmonyPatch(typeof(Hud), "UpdateStatusEffects")] public static class SkillIcon_Patch { private static void RebuildAbilityIcons(Hud hud) { if (abilitiesStatus != null) { foreach (RectTransform item in abilitiesStatus) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)((Component)item).gameObject); } } } abilitiesStatus = new List(); abilitiesStatus.Clear(); s_lastIconXOffset = icon_X_Offset.Value; s_lastIconYOffset = icon_Y_Offset.Value; s_lastIconAlignment = iconAlignment.Value; VL_Utility.InitiateAbilityStatus(hud); } public static void Postfix(Hud __instance) { //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance != (Object)null) || !ClassIsValid || !showAbilityIcons.Value) { return; } if (abilitiesStatus == null) { abilitiesStatus = new List(); abilitiesStatus.Clear(); } if (abilitiesStatus.Count != 3 || s_lastIconXOffset != icon_X_Offset.Value || s_lastIconYOffset != icon_Y_Offset.Value || s_lastIconAlignment != iconAlignment.Value) { RebuildAbilityIcons(__instance); } if (abilitiesStatus == null) { return; } for (int i = 0; i < abilitiesStatus.Count; i++) { RectTransform obj = abilitiesStatus[i]; Image component = ((Component)((Transform)obj).Find("Icon")).GetComponent(); string text = ""; switch (i) { case 0: component.sprite = Ability1_Sprite; if (((Character)Player.m_localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD"))) { ((Graphic)component).color = abilityCooldownColor; text = StatusEffect.GetTimeString(((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability1_CD")).GetRemaningTime(), false, false); break; } ((Graphic)component).color = Color.white; text = Ability1_Hotkey.Value; if (Ability1_Hotkey_Combo.Value != "") { text = text + " + " + Ability1_Hotkey_Combo.Value; } break; case 1: component.sprite = Ability2_Sprite; if (((Character)Player.m_localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD"))) { ((Graphic)component).color = abilityCooldownColor; text = StatusEffect.GetTimeString(((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability2_CD")).GetRemaningTime(), false, false); break; } ((Graphic)component).color = Color.white; text = Ability2_Hotkey.Value; if (Ability2_Hotkey_Combo.Value != "") { text = text + " + " + Ability2_Hotkey_Combo.Value; } break; default: component.sprite = Ability3_Sprite; if (((Character)Player.m_localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD"))) { ((Graphic)component).color = abilityCooldownColor; text = StatusEffect.GetTimeString(((Character)Player.m_localPlayer).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ability3_CD")).GetRemaningTime(), false, false); break; } ((Graphic)component).color = Color.white; text = Ability3_Hotkey.Value; if (Ability3_Hotkey_Combo.Value != "") { text = text + " + " + Ability3_Hotkey_Combo.Value; } break; } TMP_Text component2 = ((Component)((Transform)obj).Find("TimeText")).GetComponent(); if (!string.IsNullOrEmpty(text)) { ((Component)component2).gameObject.SetActive(true); component2.text = text; } else { ((Component)component2).gameObject.SetActive(false); } } } } [HarmonyPatch(typeof(Skills), "IsSkillValid")] public static class ValidSkill_Patch { public static bool Prefix(Skills __instance, SkillType type, ref bool __result) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (type == AlterationSkill || type == AbjurationSkill || type == ConjurationSkill || type == EvocationSkill || type == DisciplineSkill || type == IllusionSkill) { __result = true; return false; } return true; } } [HarmonyPatch(typeof(Player), "Update")] public static class AbilityInput_Prefix { public static bool Prefix(Player __instance) { if (ZInput.GetButtonDown("GP") || ZInput.GetButtonDown("JoyGP")) { shouldUseGuardianPower = true; } return true; } } [HarmonyPatch(typeof(Player), "UpdateDodge", null)] public class DodgePatch_Postfix { public static void Postfix(Player __instance, float ___m_queuedDodgeTimer) { if (___m_queuedDodgeTimer < -0.5f && ___m_queuedDodgeTimer > -0.55f && vl_player != null && vl_player.vl_name == __instance.GetPlayerName() && vl_player.vl_class == PlayerClass.Ranger) { SE_Ranger sE_Ranger = (SE_Ranger)(object)((Character)__instance).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ranger")); if ((Object)(object)sE_Ranger != (Object)null) { sE_Ranger.hitCount = 3f; } } } } [HarmonyPatch(typeof(Player), "RaiseSkill", null)] public static class VinesHit_SkillRaise_Prefix { public static bool Prefix(Player __instance, SkillType skill, ref float value) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (((Character)__instance).IsPlayer() && skill == ConjurationSkill) { if (value == 0.5f) { value = 0.1f; } else if (value == 1f) { value = 0.5f; } } return true; } } [HarmonyPatch(typeof(OfferingBowl), "UseItem", null)] public class OfferingForClass_Patch { public static bool Prefix(OfferingBowl __instance, Humanoid user, ItemData item, Transform ___m_itemSpawnPoint, EffectList ___m_fuelAddedEffects, ref bool __result) { //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) if (VL_GlobalConfigs.ConfigStrings["vl_svr_allowAltarClassChange"] != 0f) { user.GetInventory().CountItems(item.m_shared.m_name, -1, true); bool flag = false; if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_shamanItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_shamanItem"] != "" && vl_player.vl_class != PlayerClass.Shaman) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Shaman", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Shaman; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_rangerItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_rangerItem"] != "" && vl_player.vl_class != PlayerClass.Ranger) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Ranger", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Ranger; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_mageItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_mageItem"] != "" && vl_player.vl_class != PlayerClass.Mage) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Mage", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Mage; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_valkyrieItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_valkyrieItem"] != "" && vl_player.vl_class != PlayerClass.Valkyrie) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Valkyrie", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Valkyrie; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_druidItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_druidItem"] != "" && vl_player.vl_class != PlayerClass.Druid) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Druid", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Druid; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_berserkerItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_berserkerItem"] != "" && vl_player.vl_class != PlayerClass.Berserker) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Berserker", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Berserker; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_metavokerItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_metavokerItem"] != "" && vl_player.vl_class != PlayerClass.Metavoker) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Metavoker", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Metavoker; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_priestItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_priestItem"] != "" && vl_player.vl_class != PlayerClass.Priest) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Priest", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Priest; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_monkItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_monkItem"] != "" && vl_player.vl_class != PlayerClass.Monk) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Monk", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Monk; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_duelistItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_duelistItem"] != "" && vl_player.vl_class != PlayerClass.Duelist) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Duelist", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Duelist; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_enchanterItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_enchanterItem"] != "" && vl_player.vl_class != PlayerClass.Enchanter) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Enchanter", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Enchanter; flag = true; } else if (item.m_shared.m_name.Contains(VL_GlobalConfigs.ItemStrings["vl_svr_rogueItem"]) && VL_GlobalConfigs.ItemStrings["vl_svr_rogueItem"] != "" && vl_player.vl_class != PlayerClass.Rogue) { ((Character)user).Message((MessageType)2, "Acquired the powers of a Rogue", 0, (Sprite)null); vl_player.vl_class = PlayerClass.Rogue; flag = true; } if (flag) { user.GetInventory().RemoveItem(item.m_shared.m_name, 1, -1, true); ((Character)user).ShowRemovedMessage(item, 1); UpdateVLPlayer(Player.m_localPlayer); NameCooldowns(); if (Object.op_Implicit((Object)(object)___m_itemSpawnPoint) && ___m_fuelAddedEffects != null) { ___m_fuelAddedEffects.Create(___m_itemSpawnPoint.position, ((Component)__instance).transform.rotation, (Transform)null, 1f, -1); } Object.Instantiate(ZNetScene.instance.GetPrefab("fx_GP_Activation"), ((Character)user).GetCenterPoint(), Quaternion.identity); if (abilitiesStatus != null) { foreach (RectTransform item2 in abilitiesStatus) { if ((Object)(object)((Component)item2).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)item2).gameObject); } } abilitiesStatus.Clear(); } __result = true; return false; } } return true; } } [HarmonyPatch(typeof(ZNet), "OnDestroy")] public static class RemoveHud_Patch { public static bool Prefix() { if (abilitiesStatus != null) { foreach (RectTransform item in abilitiesStatus) { if ((Object)(object)((Component)item).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)item).gameObject); } } abilitiesStatus.Clear(); abilitiesStatus = null; } return true; } } [HarmonyPatch(typeof(Player), "OnSpawned", null)] public class SetLegendClass_Postfix { public static void Postfix(Player __instance) { SetVLPlayer(__instance); } } [HarmonyPatch(typeof(Player), "OnRespawn", null)] public class ResetLegendClass_Postfix { public static void Postfix(Player __instance) { SetVLPlayer(__instance); } } [HarmonyPatch(typeof(Player), "Update", null)] public class AbilityInput_Postfix { public static void Postfix(Player __instance, ref float ___m_maxAirAltitude, ref Rigidbody ___m_body, ref Animator ___m_animator, ref float ___m_lastGroundTouch, float ___m_waterLevel) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (VL_Utility.ReadyTime) { Player localPlayer = Player.m_localPlayer; _ = ((Component)__instance).transform.position; if ((Object)(object)localPlayer != (Object)null && playerEnabled && VL_Utility.TakeInput(localPlayer) && !((Character)localPlayer).InPlaceMode()) { switch (vl_player.vl_class) { case PlayerClass.Mage: Class_Mage.Process_Input(localPlayer, ___m_maxAirAltitude); break; case PlayerClass.Druid: Class_Druid.Process_Input(localPlayer, ___m_maxAirAltitude); break; case PlayerClass.Shaman: Class_Shaman.Process_Input(localPlayer, ref ___m_body, ref ___m_maxAirAltitude, ref ___m_lastGroundTouch, ___m_waterLevel); break; case PlayerClass.Ranger: Class_Ranger.Process_Input(localPlayer); if (!((Character)localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Ranger"))) { SE_Ranger sE_Ranger = (SE_Ranger)(object)ScriptableObject.CreateInstance(typeof(SE_Ranger)); ((StatusEffect)sE_Ranger).m_ttl = SE_Ranger.m_baseTTL; ((Character)localPlayer).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Ranger, true, 0, 0f); } break; case PlayerClass.Berserker: Class_Berserker.Process_Input(localPlayer, ref ___m_maxAirAltitude); break; case PlayerClass.Valkyrie: Class_Valkyrie.Process_Input(localPlayer); if (!((Character)localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Valkyrie"))) { SE_Valkyrie sE_Valkyrie = (SE_Valkyrie)(object)ScriptableObject.CreateInstance(typeof(SE_Valkyrie)); ((StatusEffect)sE_Valkyrie).m_ttl = SE_Valkyrie.m_baseTTL; ((Character)localPlayer).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Valkyrie, true, 0, 0f); } break; case PlayerClass.Metavoker: Class_Metavoker.Process_Input(localPlayer, ref ___m_maxAirAltitude, ref ___m_body); break; case PlayerClass.Priest: Class_Priest.Process_Input(localPlayer, ref ___m_maxAirAltitude); break; case PlayerClass.Monk: Class_Monk.Process_Input(localPlayer, ref ___m_body, ref ___m_maxAirAltitude, ref ___m_animator); if (!((Character)localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Monk"))) { SE_Monk sE_Monk = (SE_Monk)(object)ScriptableObject.CreateInstance(typeof(SE_Monk)); ((StatusEffect)sE_Monk).m_ttl = SE_Monk.m_baseTTL; ((Character)localPlayer).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Monk, true, 0, 0f); } break; case PlayerClass.Duelist: Class_Duelist.Process_Input(localPlayer); break; case PlayerClass.Enchanter: Class_Enchanter.Process_Input(localPlayer, ref ___m_maxAirAltitude); break; case PlayerClass.Rogue: Class_Rogue.Process_Input(localPlayer, ref ___m_body, ref ___m_maxAirAltitude); if (!((Character)localPlayer).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Rogue"))) { SE_Rogue sE_Rogue = (SE_Rogue)(object)ScriptableObject.CreateInstance(typeof(SE_Rogue)); ((StatusEffect)sE_Rogue).m_ttl = SE_Rogue.m_baseTTL; ((Character)localPlayer).GetSEMan().AddStatusEffect((StatusEffect)(object)sE_Rogue, true, 0, 0f); } break; } } if (isChargingDash) { VL_Utility.SetTimer(); dashCounter++; if (vl_player.vl_class == PlayerClass.Berserker && dashCounter >= 12) { isChargingDash = false; Class_Berserker.Execute_Dash(localPlayer, ref ___m_maxAirAltitude, ref ___m_body); } else if (vl_player.vl_class == PlayerClass.Valkyrie && dashCounter >= (int)Class_Valkyrie.QueuedAttack) { isChargingDash = false; Class_Valkyrie.Execute_Attack(localPlayer, ref ___m_body, ref ___m_maxAirAltitude); } else if (vl_player.vl_class == PlayerClass.Duelist && dashCounter >= 10) { isChargingDash = false; isChanneling = false; Class_Duelist.Execute_Slash(localPlayer); } else if (vl_player.vl_class == PlayerClass.Rogue && dashCounter >= 16) { isChargingDash = false; Class_Rogue.Execute_Throw(localPlayer); } else if (vl_player.vl_class == PlayerClass.Mage && dashCounter >= (int)Class_Mage.QueuedAttack) { isChargingDash = false; Class_Mage.Execute_Attack(localPlayer); } else if (vl_player.vl_class == PlayerClass.Monk && dashCounter >= (int)Class_Monk.QueuedAttack) { isChargingDash = false; Class_Monk.Execute_Attack(localPlayer, ref ___m_body, ref ___m_maxAirAltitude); } else if (vl_player.vl_class == PlayerClass.Enchanter && dashCounter >= (int)Class_Enchanter.QueuedAttack) { isChargingDash = false; Class_Enchanter.Execute_Attack(localPlayer, ref ___m_body, ref ___m_maxAirAltitude); } else if (vl_player.vl_class == PlayerClass.Metavoker && dashCounter >= (int)Class_Metavoker.QueuedAttack) { isChargingDash = false; Class_Metavoker.Execute_Attack(localPlayer, ref ___m_body, ref ___m_maxAirAltitude); } } } if (animationCountdown > 0) { animationCountdown--; } } } [HarmonyPatch(typeof(Player), "OnRespawn")] public static class PlayerUpdateTutorials_Patch { public static void Postfix(Player __instance) { PlayerMuninNotification_Patch.Postfix(__instance); } } [HarmonyPatch(typeof(Player), "OnSpawned")] public static class PlayerMuninNotification_Patch { public static void Postfix(Player __instance) { //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown TutorialText item = new TutorialText { m_label = "Valheim Legends", m_name = "Valheim_Legends", m_text = "The Allfather has granted you a spark of power as a reward for your past deeds - you need only sacrifice a minor token at a Eikthyr's altar to awaken your power.\n\nGo to the altar and activate the nearby glowing tablet - I will explain more there!\nFjolner is watching over you.", m_topic = "Become a Legend!" }; if (!Tutorial.instance.m_texts.Contains(item)) { Tutorial.instance.m_texts.Add(item); } __instance.ShowTutorial("Valheim_Legends", false); CompendiumUpdates(); } } [HarmonyPatch(typeof(RuneStone), "Interact")] public static class ClassOfferingTutorial_Patch { public static void Postfix() { Player.m_localPlayer.ShowTutorial("VL_Offerings", false); } } [HarmonyPatch(typeof(PlayerProfile), "LoadPlayerData")] public static class LoadSkillsPatch { public static void Postfix(PlayerProfile __instance, Player player) { //IL_005c: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) VL_SkillData vL_SkillData = __instance.LoadModData(); if (((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == DisciplineSkillDef)) == null) { Skill val = (Skill)AccessTools.Method(typeof(Skills), "GetSkill", (Type[])null, (Type[])null).Invoke(((Character)player).GetSkills(), new object[1] { DisciplineSkill }); val.m_level = vL_SkillData.level; val.m_accumulator = vL_SkillData.accumulator; } if (((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == AbjurationSkillDef)) == null) { Skill val2 = (Skill)AccessTools.Method(typeof(Skills), "GetSkill", (Type[])null, (Type[])null).Invoke(((Character)player).GetSkills(), new object[1] { AbjurationSkill }); val2.m_level = vL_SkillData.level; val2.m_accumulator = vL_SkillData.accumulator; } if (((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == AlterationSkillDef)) == null) { Skill val3 = (Skill)AccessTools.Method(typeof(Skills), "GetSkill", (Type[])null, (Type[])null).Invoke(((Character)player).GetSkills(), new object[1] { AlterationSkill }); val3.m_level = vL_SkillData.level; val3.m_accumulator = vL_SkillData.accumulator; } if (((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == ConjurationSkillDef)) == null) { Skill val4 = (Skill)AccessTools.Method(typeof(Skills), "GetSkill", (Type[])null, (Type[])null).Invoke(((Character)player).GetSkills(), new object[1] { ConjurationSkill }); val4.m_level = vL_SkillData.level; val4.m_accumulator = vL_SkillData.accumulator; } if (((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == EvocationSkillDef)) == null) { Skill val5 = (Skill)AccessTools.Method(typeof(Skills), "GetSkill", (Type[])null, (Type[])null).Invoke(((Character)player).GetSkills(), new object[1] { EvocationSkill }); val5.m_level = vL_SkillData.level; val5.m_accumulator = vL_SkillData.accumulator; } if (((IEnumerable)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func)((Skill x) => x.m_info == IllusionSkillDef)) == null) { Skill val6 = (Skill)AccessTools.Method(typeof(Skills), "GetSkill", (Type[])null, (Type[])null).Invoke(((Character)player).GetSkills(), new object[1] { IllusionSkill }); val6.m_level = vL_SkillData.level; val6.m_accumulator = vL_SkillData.accumulator; } } } [HarmonyPatch(typeof(ZNetScene), "Awake")] public static class ZNetScene_Awake_Patch { public static void Prefix(ZNetScene __instance) { if (!((Object)(object)__instance == (Object)null)) { __instance.m_prefabs.Add(VL_Deathsquit); __instance.m_prefabs.Add(VL_ShadowWolf); __instance.m_prefabs.Add(VL_DemonWolf); __instance.m_prefabs.Add(VL_Light); __instance.m_prefabs.Add(VL_PoisonBomb); __instance.m_prefabs.Add(VL_PoisonBombExplosion); __instance.m_prefabs.Add(VL_SanctifyHammer); __instance.m_prefabs.Add(VL_ThrowingKnife); __instance.m_prefabs.Add(VL_PsiBolt); __instance.m_prefabs.Add(VL_Charm); __instance.m_prefabs.Add(VL_FrostDagger); __instance.m_prefabs.Add(VL_ValkyrieSpear); __instance.m_prefabs.Add(VL_ShadowWolfAttack); __instance.m_prefabs.Add(fx_VL_Lightburst); __instance.m_prefabs.Add(fx_VL_ParticleLightburst); __instance.m_prefabs.Add(fx_VL_ParticleLightSuction); __instance.m_prefabs.Add(fx_VL_ReverseLightburst); __instance.m_prefabs.Add(fx_VL_BlinkStrike); __instance.m_prefabs.Add(fx_VL_QuickShot); __instance.m_prefabs.Add(fx_VL_HealPulse); __instance.m_prefabs.Add(fx_VL_Purge); __instance.m_prefabs.Add(fx_VL_Smokeburst); __instance.m_prefabs.Add(fx_VL_Shadowburst); __instance.m_prefabs.Add(fx_VL_Shockwave); __instance.m_prefabs.Add(fx_VL_FlyingKick); __instance.m_prefabs.Add(fx_VL_MeteorSlam); __instance.m_prefabs.Add(fx_VL_Weaken); __instance.m_prefabs.Add(fx_VL_WeakenStatus); __instance.m_prefabs.Add(fx_VL_Shock); __instance.m_prefabs.Add(fx_VL_ParticleTailField); __instance.m_prefabs.Add(fx_VL_ParticleFieldBurst); __instance.m_prefabs.Add(fx_VL_HeavyCrit); __instance.m_prefabs.Add(fx_VL_ChiPulse); __instance.m_prefabs.Add(fx_VL_Replica); __instance.m_prefabs.Add(fx_VL_ReplicaCreate); __instance.m_prefabs.Add(fx_VL_ForwardLightningShock); __instance.m_prefabs.Add(fx_VL_Flames); __instance.m_prefabs.Add(fx_VL_FlameBurst); __instance.m_prefabs.Add(fx_VL_AbsorbSpirit); __instance.m_prefabs.Add(fx_VL_ForceWall); __instance.m_prefabs.Add(fx_VL_ShieldRelease); } } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class ObjectDB_CopyOtherDB_Patch { public static void Postfix() { Add_VL_Assets(); } } [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class ObjectDB_Awake_Patch { public static void Postfix() { Add_VL_Assets(); } } public static Harmony _Harmony; public const string Version = "0.7.10"; public const float VersionF = 0.71f; public const string ModName = "Valheim Legends"; public static bool playerEnabled = true; public static List vl_playerList; public static VL_Player vl_player; public static Sprite RiposteIcon; public static Sprite RogueIcon; public static Sprite MonkIcon; public static Sprite RangerIcon; public static Sprite ValkyrieIcon; public static Sprite WeakenIcon; public static Sprite BiomeMeadowsIcon; public static Sprite BiomeBlackForestIcon; public static Sprite BiomeSwampIcon; public static Sprite BiomeMountainIcon; public static Sprite BiomePlainsIcon; public static Sprite BiomeOceanIcon; public static Sprite BiomeMistIcon; public static Sprite BiomeAshIcon; public static ConfigEntry modEnabled; public static ConfigEntry Ability1_Hotkey; public static ConfigEntry Ability1_Hotkey_Combo; public static ConfigEntry Ability2_Hotkey; public static ConfigEntry Ability2_Hotkey_Combo; public static ConfigEntry Ability3_Hotkey; public static ConfigEntry Ability3_Hotkey_Combo; public static ConfigEntry vl_svr_energyCostMultiplier; public static ConfigEntry vl_svr_cooldownMultiplier; public static ConfigEntry vl_svr_abilityDamageMultiplier; public static ConfigEntry vl_svr_skillGainMultiplier; public static ConfigEntry vl_svr_unarmedDamageMultiplier; public static ConfigEntry icon_X_Offset; public static ConfigEntry icon_Y_Offset; public static ConfigEntry showAbilityIcons; public static ConfigEntry iconAlignment; public static ConfigEntry chosenClass; public static ConfigEntry vl_svr_allowAltarClassChange; public static ConfigEntry vl_svr_enforceConfigClass; public static ConfigEntry vl_svr_aoeRequiresLoS; public static readonly Color abilityCooldownColor = new Color(1f, 0.3f, 0.3f, 0.5f); public static ConfigEntry vl_svr_berserkerDash; public static ConfigEntry vl_svr_berserkerBerserk; public static ConfigEntry vl_svr_berserkerExecute; public static ConfigEntry vl_svr_berserkerBonusDamage; public static ConfigEntry vl_svr_berserkerBonus2h; public static ConfigEntry vl_svr_berserkerItem; public static ConfigEntry vl_svr_druidVines; public static ConfigEntry vl_svr_druidRegen; public static ConfigEntry vl_svr_druidDefenders; public static ConfigEntry vl_svr_druidBonusSeeds; public static ConfigEntry vl_svr_druidItem; public static ConfigEntry vl_svr_duelistSeismicSlash; public static ConfigEntry vl_svr_duelistRiposte; public static ConfigEntry vl_svr_duelistHipShot; public static ConfigEntry vl_svr_duelistBonusParry; public static ConfigEntry vl_svr_duelistItem; public static ConfigEntry vl_svr_enchanterWeaken; public static ConfigEntry vl_svr_enchanterCharm; public static ConfigEntry vl_svr_enchanterBiome; public static ConfigEntry vl_svr_enchanterBiomeShock; public static ConfigEntry vl_svr_enchanterBonusElementalBlock; public static ConfigEntry vl_svr_enchanterBonusElementalTouch; public static ConfigEntry vl_svr_enchanterItem; public static ConfigEntry vl_svr_mageFireball; public static ConfigEntry vl_svr_mageFrostDagger; public static ConfigEntry vl_svr_mageFrostNova; public static ConfigEntry vl_svr_mageInferno; public static ConfigEntry vl_svr_mageMeteor; public static ConfigEntry vl_svr_mageItem; public static ConfigEntry vl_svr_metavokerLight; public static ConfigEntry vl_svr_metavokerReplica; public static ConfigEntry vl_svr_metavokerWarpDamage; public static ConfigEntry vl_svr_metavokerWarpDistance; public static ConfigEntry vl_svr_metavokerBonusSafeFallCost; public static ConfigEntry vl_svr_metavokerBonusForceWave; public static ConfigEntry vl_svr_metavokerItem; public static ConfigEntry vl_svr_monkChiPunch; public static ConfigEntry vl_svr_monkChiSlam; public static ConfigEntry vl_svr_monkChiBlast; public static ConfigEntry vl_svr_monkFlyingKick; public static ConfigEntry vl_svr_monkBonusBlock; public static ConfigEntry vl_svr_monkSurge; public static ConfigEntry vl_svr_monkChiDuration; public static ConfigEntry vl_svr_monkItem; public static ConfigEntry vl_svr_priestHeal; public static ConfigEntry vl_svr_priestPurgeHeal; public static ConfigEntry vl_svr_priestPurgeDamage; public static ConfigEntry vl_svr_priestSanctify; public static ConfigEntry vl_svr_priestBonusDyingLightCooldown; public static ConfigEntry vl_svr_priestItem; public static ConfigEntry vl_svr_rangerPowerShot; public static ConfigEntry vl_svr_rangerShadowWolf; public static ConfigEntry vl_svr_rangerShadowStalk; public static ConfigEntry vl_svr_rangerBonusPoisonResistance; public static ConfigEntry vl_svr_rangerBonusRunCost; public static ConfigEntry vl_svr_rangerItem; public static ConfigEntry vl_svr_rogueBackstab; public static ConfigEntry vl_svr_rogueFadeCooldown; public static ConfigEntry vl_svr_roguePoisonBomb; public static ConfigEntry vl_svr_rogueBonusThrowingDagger; public static ConfigEntry vl_svr_rogueTrickCharge; public static ConfigEntry vl_svr_rogueItem; public static ConfigEntry vl_svr_shamanSpiritShock; public static ConfigEntry vl_svr_shamanEnrage; public static ConfigEntry vl_svr_shamanShell; public static ConfigEntry vl_svr_shamanBonusSpiritGuide; public static ConfigEntry vl_svr_shamanBonusWaterGlideCost; public static ConfigEntry vl_svr_shamanItem; public static ConfigEntry vl_svr_valkyrieLeap; public static ConfigEntry vl_svr_valkyrieStaggerCooldown; public static ConfigEntry vl_svr_valkyrieBulwark; public static ConfigEntry vl_svr_valkyrieBonusChillWave; public static ConfigEntry vl_svr_valkyrieBonusIceLance; public static ConfigEntry vl_svr_valkyrieChargeDuration; public static ConfigEntry vl_svr_valkyrieItem; public static long ServerID; private static readonly Type patchType = typeof(ValheimLegends); public static Sprite Ability1_Sprite; public static Sprite Ability2_Sprite; public static Sprite Ability3_Sprite; public static Sprite DyingLight_Sprite; public static string Ability1_Name; public static string Ability2_Name; public static string Ability3_Name; public static string Ability1_Description; public static string Ability2_Description; public static string Ability3_Description; public static List abilitiesStatus = new List(); private static float s_lastIconXOffset = float.NaN; private static float s_lastIconYOffset = float.NaN; private static string s_lastIconAlignment = null; public static bool shouldUseGuardianPower = true; public static bool shouldValkyrieImpact = false; public static bool isChanneling = false; public static int channelingCancelDelay = 0; public static bool isChargingDash = false; public static int dashCounter = 0; public static int logCheck = 0; public static int animationCountdown = 0; public static readonly int DisciplineSkillID = 781; public static readonly int AbjurationSkillID = 791; public static readonly int AlterationSkillID = 792; public static readonly int ConjurationSkillID = 793; public static readonly int EvocationSkillID = 794; public static readonly int IllusionSkillID = 795; public static SkillType DisciplineSkill = (SkillType)DisciplineSkillID; public static SkillType AbjurationSkill = (SkillType)AbjurationSkillID; public static SkillType AlterationSkill = (SkillType)AlterationSkillID; public static SkillType ConjurationSkill = (SkillType)ConjurationSkillID; public static SkillType EvocationSkill = (SkillType)EvocationSkillID; public static SkillType IllusionSkill = (SkillType)IllusionSkillID; public static SkillDef DisciplineSkillDef; public static SkillDef AbjurationSkillDef; public static SkillDef AlterationSkillDef; public static SkillDef ConjurationSkillDef; public static SkillDef EvocationSkillDef; public static SkillDef IllusionSkillDef; public static List legendsSkills = new List(); private static int Script_WolfAttackMask = LayerMask.GetMask(new string[11] { "Default", "static_solid", "Default_small", "piece_nonsolid", "terrain", "vehicle", "piece", "viewblock", "character", "character_noenv", "character_trigger" }); private static GameObject VL_Deathsquit; private static GameObject VL_ShadowWolf; private static GameObject VL_DemonWolf; private static GameObject VL_Light; private static GameObject VL_SanctifyHammer; private static GameObject VL_PoisonBomb; private static GameObject VL_PoisonBombExplosion; private static GameObject VL_ThrowingKnife; private static GameObject VL_PsiBolt; private static GameObject VL_Charm; private static GameObject VL_FrostDagger; private static GameObject VL_ValkyrieSpear; private static GameObject VL_ShadowWolfAttack; private static GameObject fx_VL_Lightburst; private static GameObject fx_VL_ParticleLightburst; private static GameObject fx_VL_ParticleLightSuction; private static GameObject fx_VL_ReverseLightburst; private static GameObject fx_VL_BlinkStrike; private static GameObject fx_VL_QuickShot; private static GameObject fx_VL_Purge; private static GameObject fx_VL_Smokeburst; private static GameObject fx_VL_Shadowburst; private static GameObject fx_VL_Shockwave; private static GameObject fx_VL_FlyingKick; private static GameObject fx_VL_MeteorSlam; private static GameObject fx_VL_Weaken; private static GameObject fx_VL_WeakenStatus; private static GameObject fx_VL_Shock; private static GameObject fx_VL_ParticleTailField; private static GameObject fx_VL_ParticleFieldBurst; private static GameObject fx_VL_ChiPulse; private static GameObject fx_VL_HeavyCrit; private static GameObject fx_VL_HealPulse; private static GameObject fx_VL_Replica; private static GameObject fx_VL_ReplicaCreate; private static GameObject fx_VL_ForwardLightningShock; private static GameObject fx_VL_Flames; private static GameObject fx_VL_FlameBurst; private static GameObject fx_VL_AbsorbSpirit; private static GameObject fx_VL_ForceWall; private static GameObject fx_VL_ShieldRelease; public static AnimationClip anim_player_float; public static int GetPlayerClassNum { get { if (vl_player.vl_class == PlayerClass.Berserker) { return 1; } if (vl_player.vl_class == PlayerClass.Druid) { return 2; } if (vl_player.vl_class == PlayerClass.Metavoker) { return 3; } if (vl_player.vl_class == PlayerClass.Mage) { return 4; } if (vl_player.vl_class == PlayerClass.Priest) { return 5; } if (vl_player.vl_class == PlayerClass.Monk) { return 7; } if (vl_player.vl_class == PlayerClass.Ranger) { return 8; } if (vl_player.vl_class == PlayerClass.Duelist) { return 9; } if (vl_player.vl_class == PlayerClass.Enchanter) { return 10; } if (vl_player.vl_class == PlayerClass.Rogue) { return 11; } if (vl_player.vl_class == PlayerClass.Shaman) { return 16; } if (vl_player.vl_class == PlayerClass.Valkyrie) { return 32; } return 0; } } public static bool ClassIsValid { get { if (vl_player != null) { return vl_player.vl_class != PlayerClass.None; } return false; } } private static void RemoveSummonedWolf() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown foreach (Character allCharacter in Character.GetAllCharacters()) { if (!((Object)(object)allCharacter != (Object)null) || allCharacter.GetSEMan() == null) { continue; } if (allCharacter.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { if ((Object)(object)(allCharacter.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")) as SE_Companion).summoner == (Object)(object)Player.m_localPlayer) { MonsterAI component = ((Component)allCharacter).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetFollowTarget((GameObject)null); } allCharacter.m_faction = (Faction)5; HitData val = new HitData(); val.m_damage.m_slash = 9999f; allCharacter.Damage(val); } } else if (allCharacter.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Charm"))) { SE_Charm sE_Charm = (SE_Charm)(object)allCharacter.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Charm")); allCharacter.m_faction = sE_Charm.originalFaction; } } } private static bool IsValidTarget(IDestructible destr, ref bool hitCharacter, Character owner, bool m_dodgeable) { Character val = (Character)(object)((destr is Character) ? destr : null); if (Object.op_Implicit((Object)(object)val)) { if ((Object)(object)val == (Object)(object)owner) { return false; } if ((Object)(object)owner != (Object)null && !owner.IsPlayer() && !BaseAI.IsEnemy(owner, val)) { return false; } if (m_dodgeable && val.IsDodgeInvincible()) { return false; } hitCharacter = true; } return true; } private void Awake() { //IL_15f2: Unknown result type (might be due to invalid IL or missing references) //IL_1601: Unknown result type (might be due to invalid IL or missing references) //IL_1630: Unknown result type (might be due to invalid IL or missing references) //IL_163f: Unknown result type (might be due to invalid IL or missing references) //IL_1672: Unknown result type (might be due to invalid IL or missing references) //IL_1681: Unknown result type (might be due to invalid IL or missing references) //IL_16b5: Unknown result type (might be due to invalid IL or missing references) //IL_16c4: Unknown result type (might be due to invalid IL or missing references) //IL_16f8: Unknown result type (might be due to invalid IL or missing references) //IL_1707: Unknown result type (might be due to invalid IL or missing references) //IL_173b: Unknown result type (might be due to invalid IL or missing references) //IL_174a: Unknown result type (might be due to invalid IL or missing references) //IL_177e: Unknown result type (might be due to invalid IL or missing references) //IL_178d: Unknown result type (might be due to invalid IL or missing references) //IL_17c4: Unknown result type (might be due to invalid IL or missing references) //IL_17d3: Unknown result type (might be due to invalid IL or missing references) //IL_180a: Unknown result type (might be due to invalid IL or missing references) //IL_1819: Unknown result type (might be due to invalid IL or missing references) //IL_1850: Unknown result type (might be due to invalid IL or missing references) //IL_185f: Unknown result type (might be due to invalid IL or missing references) //IL_1896: Unknown result type (might be due to invalid IL or missing references) //IL_18a5: Unknown result type (might be due to invalid IL or missing references) //IL_18dc: Unknown result type (might be due to invalid IL or missing references) //IL_18eb: Unknown result type (might be due to invalid IL or missing references) //IL_1922: Unknown result type (might be due to invalid IL or missing references) //IL_1931: Unknown result type (might be due to invalid IL or missing references) //IL_1968: Unknown result type (might be due to invalid IL or missing references) //IL_1977: Unknown result type (might be due to invalid IL or missing references) //IL_19ae: Unknown result type (might be due to invalid IL or missing references) //IL_19bd: Unknown result type (might be due to invalid IL or missing references) //IL_19f4: Unknown result type (might be due to invalid IL or missing references) //IL_1a03: Unknown result type (might be due to invalid IL or missing references) //IL_1a3a: Unknown result type (might be due to invalid IL or missing references) //IL_1a49: Unknown result type (might be due to invalid IL or missing references) //IL_1a80: Unknown result type (might be due to invalid IL or missing references) //IL_1a8f: Unknown result type (might be due to invalid IL or missing references) //IL_1ac6: Unknown result type (might be due to invalid IL or missing references) //IL_1ad5: Unknown result type (might be due to invalid IL or missing references) //IL_1b0c: Unknown result type (might be due to invalid IL or missing references) //IL_1b1b: Unknown result type (might be due to invalid IL or missing references) //IL_1b52: Unknown result type (might be due to invalid IL or missing references) //IL_1b61: Unknown result type (might be due to invalid IL or missing references) //IL_1b98: Unknown result type (might be due to invalid IL or missing references) //IL_1ba7: Unknown result type (might be due to invalid IL or missing references) //IL_1bde: Unknown result type (might be due to invalid IL or missing references) //IL_1bed: Unknown result type (might be due to invalid IL or missing references) //IL_1c06: Unknown result type (might be due to invalid IL or missing references) //IL_1c0b: Unknown result type (might be due to invalid IL or missing references) //IL_1c11: Unknown result type (might be due to invalid IL or missing references) //IL_1c16: Unknown result type (might be due to invalid IL or missing references) //IL_1c1d: Unknown result type (might be due to invalid IL or missing references) //IL_1c28: Unknown result type (might be due to invalid IL or missing references) //IL_1c38: Expected O, but got Unknown //IL_1c38: Unknown result type (might be due to invalid IL or missing references) //IL_1c3d: Unknown result type (might be due to invalid IL or missing references) //IL_1c43: Unknown result type (might be due to invalid IL or missing references) //IL_1c48: Unknown result type (might be due to invalid IL or missing references) //IL_1c50: Unknown result type (might be due to invalid IL or missing references) //IL_1c5b: Unknown result type (might be due to invalid IL or missing references) //IL_1c6b: Expected O, but got Unknown //IL_1c6b: Unknown result type (might be due to invalid IL or missing references) //IL_1c70: Unknown result type (might be due to invalid IL or missing references) //IL_1c76: Unknown result type (might be due to invalid IL or missing references) //IL_1c7b: Unknown result type (might be due to invalid IL or missing references) //IL_1c82: Unknown result type (might be due to invalid IL or missing references) //IL_1c8d: Unknown result type (might be due to invalid IL or missing references) //IL_1c9d: Expected O, but got Unknown //IL_1c9d: Unknown result type (might be due to invalid IL or missing references) //IL_1ca2: Unknown result type (might be due to invalid IL or missing references) //IL_1ca8: Unknown result type (might be due to invalid IL or missing references) //IL_1cad: Unknown result type (might be due to invalid IL or missing references) //IL_1cb5: Unknown result type (might be due to invalid IL or missing references) //IL_1cc0: Unknown result type (might be due to invalid IL or missing references) //IL_1cd0: Expected O, but got Unknown //IL_1cd0: Unknown result type (might be due to invalid IL or missing references) //IL_1cd5: Unknown result type (might be due to invalid IL or missing references) //IL_1cdb: Unknown result type (might be due to invalid IL or missing references) //IL_1ce0: Unknown result type (might be due to invalid IL or missing references) //IL_1ce8: Unknown result type (might be due to invalid IL or missing references) //IL_1cf3: Unknown result type (might be due to invalid IL or missing references) //IL_1d03: Expected O, but got Unknown //IL_1d03: Unknown result type (might be due to invalid IL or missing references) //IL_1d08: Unknown result type (might be due to invalid IL or missing references) //IL_1d0e: Unknown result type (might be due to invalid IL or missing references) //IL_1d13: Unknown result type (might be due to invalid IL or missing references) //IL_1d1b: Unknown result type (might be due to invalid IL or missing references) //IL_1d26: Unknown result type (might be due to invalid IL or missing references) //IL_1d36: Expected O, but got Unknown chosenClass = ((BaseUnityPlugin)this).Config.Bind("General", "chosenClass", "None", "Assigns a class to the player if no class is assigned.\nThis will not overwrite an existing class selection.\nA value of None will not attempt to assign any class."); vl_svr_allowAltarClassChange = ((BaseUnityPlugin)this).Config.Bind("General", "vl_svr_allowAltarClassChange", true, "Allows class changing at the altar; if disabled, the only way to change class will be via console or the mod configs."); vl_svr_enforceConfigClass = ((BaseUnityPlugin)this).Config.Bind("General", "vl_svr_enforceConfigClass", false, "True - always sets the player class to this value when the player logs in. False - uses player profile to determine class\nDoes not apply if the chosen class is None."); vl_svr_aoeRequiresLoS = ((BaseUnityPlugin)this).Config.Bind("General", "vl_svr_aoeRequiresLoS", true, "True - all AoE attacks require Line of Sight to the impact point.\nFalse - uses default game behavior for AoE attacks."); showAbilityIcons = ((BaseUnityPlugin)this).Config.Bind("Display", "showAbilityIcons", true, "Displays Icons on Hud for each ability"); iconAlignment = ((BaseUnityPlugin)this).Config.Bind("Display", "iconAlignment", "vertical", "Aligns icons horizontally or vertically off the guardian power icon; options are horizontal or vertical"); icon_X_Offset = ((BaseUnityPlugin)this).Config.Bind("Display", "icon_X_Offset", 95f, "Offsets the icon bar horizontally. The icon bar is anchored to the Guardian power icon."); icon_Y_Offset = ((BaseUnityPlugin)this).Config.Bind("Display", "icon_Y_Offset", 8f, "Offsets the icon bar vertically. The icon bar is anchored to the Guardian power icon."); Ability1_Hotkey = ((BaseUnityPlugin)this).Config.Bind("Keybinds", "Ability1_Hotkey", "Z", "Ability 1 Hotkey\nUse mouse # to bind an ability to a mouse button\nThe # represents the mouse button; mouse 0 is left click, mouse 1 right click, etc\nSingle-letter keys use your keyboard layout (AZERTY/QWERTY)"); Ability1_Hotkey_Combo = ((BaseUnityPlugin)this).Config.Bind("Keybinds", "Ability1_Hotkey_Combo", "", "Ability 1 Combination Key - entering a value will trigger the ability only when both the Hotkey and Hotkey_Combo buttons are pressed\nAllows input from a combination of keys when a value is entered for the combo key\nIf only one key is used, leave the combo key blank\nExamples: space, Q, left shift, left ctrl, right alt, right cmd"); Ability2_Hotkey = ((BaseUnityPlugin)this).Config.Bind("Keybinds", "Ability2_Hotkey", "X", "Ability 2 Hotkey"); Ability2_Hotkey_Combo = ((BaseUnityPlugin)this).Config.Bind("Keybinds", "Ability2_Hotkey_Combo", "", "Ability 2 Combination Key"); Ability3_Hotkey = ((BaseUnityPlugin)this).Config.Bind("Keybinds", "Ability3_Hotkey", "C", "Ability 3 Hotkey"); Ability3_Hotkey_Combo = ((BaseUnityPlugin)this).Config.Bind("Keybinds", "Ability3_Hotkey_Combo", "", "Ability 3 Combination Key"); vl_svr_energyCostMultiplier = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "vl_svr_energyCostMultiplier", 100f, "Ability modifiers are always enforced by the server host\nThis value multiplied on overall ability use energy cost"); vl_svr_cooldownMultiplier = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "vl_svr_cooldownMultiplier", 100f, "This value multiplied on overall cooldown time of abilities"); vl_svr_abilityDamageMultiplier = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "vl_svr_abilityDamageMultiplier", 100f, "This value multiplied on overall ability power"); vl_svr_skillGainMultiplier = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "vl_svr_skillGainMultiplier", 100f, "This value modifies the amount of skill experience gained after using an ability"); vl_svr_unarmedDamageMultiplier = ((BaseUnityPlugin)this).Config.Bind("Modifiers", "vl_svr_unarmedDamageMultiplier", 100f, "This value modifies unarmed damage increased by unarmed skill\nOnly use unarmed damage modifiers from a single mod"); vl_svr_berserkerDash = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_berserkerDash", 100f, "Modifies the damage dealt by Dash"); vl_svr_berserkerBerserk = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_berserkerBerserk", 100f, "Modifies the damage bonus from Berserk"); vl_svr_berserkerExecute = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_berserkerExecute", 100f, "Modifies the damage bonus from Execute"); vl_svr_berserkerBonusDamage = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_berserkerBonusDamage", 100f, "Modifies the damage Bonus gained from missing health"); vl_svr_berserkerBonus2h = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_berserkerBonus2h", 100f, "Decreases the stamina cost when using 2h weapons"); vl_svr_berserkerItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_berserkerItem", "item_bonefragments", "Sacrifice this item at Eikthyr's altar to become a berserker"); vl_svr_druidVines = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_druidVines", 100f, "Modifies the damage of Vines"); vl_svr_druidRegen = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_druidRegen", 100f, "Modifies the amount healed by Regenerate"); vl_svr_druidDefenders = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_druidDefenders", 100f, "Modifies the damage of summoned Defenders"); vl_svr_druidBonusSeeds = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_druidBonusSeeds", 100f, "Modifies the stamina regeneration from consuming seeds"); vl_svr_druidItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_druidItem", "item_dandelion", "Sacrifice this item at Eikthyr's altar to become a druid"); vl_svr_duelistSeismicSlash = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_duelistSeismicSlash", 100f, "Modifies the damage dealt by Seismic Slash"); vl_svr_duelistRiposte = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_duelistRiposte", 100f, "Modifies the damage dealt by Riposte"); vl_svr_duelistHipShot = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_duelistHipShot", 100f, "Modifies the damage dealt by Hip Shot"); vl_svr_duelistBonusParry = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_duelistBonusParry", 100f, "Modifies the parry bonus"); vl_svr_duelistItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_duelistItem", "item_thistle", "Sacrifice this item at Eikthyr's altar to become a duelist"); vl_svr_enchanterWeaken = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterWeaken", 100f, "Modifies the power of Weaken"); vl_svr_enchanterCharm = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterCharm", 100f, "Modifies the duration of Charm"); vl_svr_enchanterBiome = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterBiome", 100f, "Modifies the duration of Biome buffs"); vl_svr_enchanterBiomeShock = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterBiomeShock", 100f, "Modifies the damage dealt by Biome Shock"); vl_svr_enchanterBonusElementalBlock = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterBonusElementalBlock", 100f, "Modifies the amount of stamina gained when blocking elemental damage"); vl_svr_enchanterBonusElementalTouch = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterBonusElementalTouch", 100f, "Modifies the damage of elemental attacks caused by elemental touch"); vl_svr_enchanterItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_enchanterItem", "item_resin", "Sacrifice this item at Eikthyr's altar to become an enchanter"); vl_svr_mageFireball = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_mageFireball", 100f, "Modifies the damage and speed of Fireball"); vl_svr_mageFrostDagger = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_mageFrostDagger", 100f, "Modifies the damage of Frost Daggers"); vl_svr_mageFrostNova = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_mageFrostNova", 100f, "Modifies the damage of Frost Nova"); vl_svr_mageInferno = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_mageInferno", 100f, "Modifies the damage of Inferno"); vl_svr_mageMeteor = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_mageMeteor", 100f, "Modifies the damage of Meteors"); vl_svr_mageItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_mageItem", "item_coal", "Sacrifice this item at Eikthyr's altar to become a mage"); vl_svr_metavokerLight = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerLight", 100f, "Modifies the damage and force of Light"); vl_svr_metavokerReplica = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerReplica", 100f, "Modifies the damage dealt by Replicas"); vl_svr_metavokerWarpDamage = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerWarpDamage", 100f, "Modifies the damage dealt by excess Warp energy"); vl_svr_metavokerWarpDistance = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerWarpDistance", 100f, "Modifies the distance travelled when warping\n**WARNING: excessive warp distance can cause unpredictable results"); vl_svr_metavokerBonusSafeFallCost = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerBonusSafeFallCost", 100f, "Modifies the stamina cost of safe fall"); vl_svr_metavokerBonusForceWave = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerBonusForceWave", 100f, "Modifies the force and damage of Force Wall"); vl_svr_metavokerItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_metavokerItem", "item_raspberries", "Sacrifice this item at Eikthyr's altar to become a metavoker"); vl_svr_monkChiPunch = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkChiPunch", 100f, "Modifies the power of Chi Punch"); vl_svr_monkChiSlam = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkChiSlam", 100f, "Modifies the power of Chi Slam"); vl_svr_monkChiBlast = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkChiBlast", 100f, "Modifies the power of Chi Blast"); vl_svr_monkFlyingKick = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkFlyingKick", 100f, "Modifies the power of Flying Kick"); vl_svr_monkBonusBlock = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkBonusBlock", 100f, "Modifies the block bonus while unarmed"); vl_svr_monkSurge = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkSurge", 100f, "Modifies the health and stamina restored while Chi surging"); vl_svr_monkChiDuration = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkChiDuration", 100f, "Modifies how quickly chi decreases\nLower is faster"); vl_svr_monkItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_monkItem", "item_wood", "Sacrifice this item at Eikthyr's altar to become a monk"); vl_svr_priestHeal = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_priestHeal", 100f, "Modifies the power of Heal"); vl_svr_priestPurgeHeal = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_priestPurgeHeal", 100f, "Modifies the healing amount of Purge"); vl_svr_priestPurgeDamage = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_priestPurgeDamage", 100f, "Modifies the damage amount of Purge"); vl_svr_priestSanctify = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_priestSanctify", 100f, "Modifies the power of Sanctify"); vl_svr_priestBonusDyingLightCooldown = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_priestBonusDyingLightCooldown", 100f, "Modifies the cooldown of Dying Light"); vl_svr_priestItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_priestItem", "item_stone", "Sacrifice this item at Eikthyr's altar to become a priest"); vl_svr_rangerPowerShot = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rangerPowerShot", 100f, "Modifies the damage bonus of Power Shot"); vl_svr_rangerShadowWolf = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rangerShadowWolf", 100f, "Modifies the damage of Shadow Wolves"); vl_svr_rangerShadowStalk = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rangerShadowStalk", 100f, "Modifies the movement speed from Shadow Stalk"); vl_svr_rangerBonusPoisonResistance = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rangerBonusPoisonResistance", 100f, "Modifies the bonus from Poison Resitance"); vl_svr_rangerBonusRunCost = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rangerBonusRunCost", 100f, "Modifies the bonus stamina reduction while running"); vl_svr_rangerItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rangerItem", "item_boar_meat", "Sacrifice this item at Eikthyr's altar to become a ranger"); vl_svr_rogueBackstab = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rogueBackstab", 100f, "Modifies the damage of Backstab"); vl_svr_rogueFadeCooldown = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rogueFadeCooldown", 100f, "Modifies the cooldown of Fade"); vl_svr_roguePoisonBomb = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_roguePoisonBomb", 100f, "Modifies the damage dealt by Poison Bomb"); vl_svr_rogueBonusThrowingDagger = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rogueBonusThrowingDagger", 100f, "Modifies the damage dealt by Throwing knives"); vl_svr_rogueTrickCharge = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rogueTrickCharge", 100f, "Modifies how quickly trick points increase"); vl_svr_rogueItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_rogueItem", "item_honey", "Sacrifice this item at Eikthyr's altar to become a rogue"); vl_svr_shamanSpiritShock = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_shamanSpiritShock", 100f, "Modifies the power of Spirit Shock"); vl_svr_shamanEnrage = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_shamanEnrage", 100f, "Modifies the stamina regeneration from Enrage"); vl_svr_shamanShell = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_shamanShell", 100f, "Modifies the elemental protection applied by Shell"); vl_svr_shamanBonusSpiritGuide = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_shamanBonusSpiritGuide", 100f, "Modifies the amount of stamina gained from Spirit Guide"); vl_svr_shamanBonusWaterGlideCost = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_shamanBonusWaterGlideCost", 100f, "Modifies the stamina cost to Water Glide"); vl_svr_shamanItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_shamanItem", "item_greydwarfeye", "Sacrifice this item at Eikthyr's altar to become a shaman"); vl_svr_valkyrieLeap = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieLeap", 100f, "Modifies the damage of Leap"); vl_svr_valkyrieStaggerCooldown = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieStaggerCooldown", 100f, "Modifies the cooldown of Stagger"); vl_svr_valkyrieBulwark = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieBulwark", 100f, "Modifies the damage reduction of Bulwark"); vl_svr_valkyrieBonusChillWave = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieBonusChillWave", 100f, "Modifies the damage from Chill Wave"); vl_svr_valkyrieBonusIceLance = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieBonusIceLance", 100f, "Modifies the damage from Ice Lance"); vl_svr_valkyrieChargeDuration = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieChargeDuration", 100f, "Modifies how quickly ice charges decrease"); vl_svr_valkyrieItem = ((BaseUnityPlugin)this).Config.Bind("Class Modifiers", "vl_svr_valkyrieItem", "item_flint", "Sacrifice this item at Eikthyr's altar to become a valkyrie"); VL_GlobalConfigs.ConfigStrings = new Dictionary(); VL_GlobalConfigs.ConfigStrings.Clear(); VL_GlobalConfigs.ItemStrings = new Dictionary(); VL_GlobalConfigs.ItemStrings.Clear(); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_energyCostMultiplier", vl_svr_energyCostMultiplier.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_cooldownMultiplier", vl_svr_cooldownMultiplier.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_abilityDamageMultiplier", vl_svr_abilityDamageMultiplier.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_skillGainMultiplier", vl_svr_skillGainMultiplier.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_unarmedDamageMultiplier", vl_svr_unarmedDamageMultiplier.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_berserkerDash", vl_svr_berserkerDash.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_berserkerBerserk", vl_svr_berserkerBerserk.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_berserkerExecute", vl_svr_berserkerExecute.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_berserkerBonusDamage", vl_svr_berserkerBonusDamage.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_berserkerBonus2h", vl_svr_berserkerBonus2h.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_berserkerItem", vl_svr_berserkerItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_druidVines", vl_svr_druidVines.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_druidRegen", vl_svr_druidRegen.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_druidDefenders", vl_svr_druidDefenders.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_druidBonusSeeds", vl_svr_druidBonusSeeds.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_druidItem", vl_svr_druidItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_duelistSeismicSlash", vl_svr_duelistSeismicSlash.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_duelistRiposte", vl_svr_duelistRiposte.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_duelistHipShot", vl_svr_duelistHipShot.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_duelistBonusParry", vl_svr_duelistBonusParry.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_duelistItem", vl_svr_duelistItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enchanterWeaken", vl_svr_enchanterWeaken.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enchanterCharm", vl_svr_enchanterCharm.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enchanterBiome", vl_svr_enchanterBiome.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enchanterBiomeShock", vl_svr_enchanterBiomeShock.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enchanterBonusElementalBlock", vl_svr_enchanterBonusElementalBlock.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enchanterBonusElementalTouch", vl_svr_enchanterBonusElementalTouch.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_enchanterItem", vl_svr_enchanterItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_mageFireball", vl_svr_mageFireball.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_mageFrostDagger", vl_svr_mageFrostDagger.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_mageFrostNova", vl_svr_mageFrostNova.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_mageInferno", vl_svr_mageInferno.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_mageMeteor", vl_svr_mageMeteor.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_mageItem", vl_svr_mageItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_meteavokerLight", vl_svr_metavokerLight.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_metavokerReplica", vl_svr_metavokerReplica.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_metavokerWarpDamage", vl_svr_metavokerWarpDamage.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_metavokerWarpDistance", vl_svr_metavokerWarpDistance.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_metavokerBonusSafeFallCost", vl_svr_metavokerBonusSafeFallCost.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_metavokerBonusForceWave", vl_svr_metavokerBonusForceWave.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_metavokerItem", vl_svr_metavokerItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkChiPunch", vl_svr_monkChiPunch.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkChiSlam", vl_svr_monkChiSlam.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkChiBlast", vl_svr_monkChiBlast.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkFlyingKick", vl_svr_monkFlyingKick.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkBonusBlock", vl_svr_monkBonusBlock.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkSurge", vl_svr_monkSurge.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_monkChiDuration", vl_svr_monkChiDuration.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_monkItem", vl_svr_monkItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_priestHeal", vl_svr_priestHeal.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_priestPurgeHeal", vl_svr_priestPurgeHeal.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_priestPurgeDamage", vl_svr_priestPurgeDamage.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_priestSanctify", vl_svr_priestSanctify.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_priestBonusDyingLightCooldown", vl_svr_priestBonusDyingLightCooldown.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_priestItem", vl_svr_priestItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rangerPowerShot", vl_svr_rangerPowerShot.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rangerShadowWolf", vl_svr_rangerShadowWolf.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rangerShadowStalk", vl_svr_rangerShadowStalk.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rangerBonusPoisonResistance", vl_svr_rangerBonusPoisonResistance.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rangerBonusRunCost", vl_svr_rangerBonusRunCost.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_rangerItem", vl_svr_rangerItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rogueBackstab", vl_svr_rogueBackstab.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rogueFadeCooldown", vl_svr_rogueFadeCooldown.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_roguePoisonBomb", vl_svr_roguePoisonBomb.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rogueBonusThrowingDagger", vl_svr_rogueBonusThrowingDagger.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_rogueTrickCharge", vl_svr_rogueTrickCharge.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_rogueItem", vl_svr_rogueItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_shamanSpiritShock", vl_svr_shamanSpiritShock.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_shamanEnrage", vl_svr_shamanEnrage.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_shamanShell", vl_svr_shamanShell.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_shamanBonusSpiritGuide", vl_svr_shamanBonusSpiritGuide.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_shamanBonusWaterGlideCost", vl_svr_shamanBonusWaterGlideCost.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_shamanItem", vl_svr_shamanItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_valkyrieLeap", vl_svr_valkyrieLeap.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_valkyrieStaggerCooldown", vl_svr_valkyrieStaggerCooldown.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_valkyrieBulwark", vl_svr_valkyrieBulwark.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_valkyrieBonusChillWave", vl_svr_valkyrieBonusChillWave.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_valkyrieBonusIceLance", vl_svr_valkyrieBonusIceLance.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_valkyrieChargeDuration", vl_svr_valkyrieChargeDuration.Value); VL_GlobalConfigs.ItemStrings.Add("vl_svr_valkyrieItem", vl_svr_valkyrieItem.Value); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_enforceConfigClass", vl_svr_enforceConfigClass.Value ? 1f : 0f); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_aoeRequiresLoS", vl_svr_aoeRequiresLoS.Value ? 1f : 0f); VL_GlobalConfigs.ConfigStrings.Add("vl_svr_allowAltarClassChange", vl_svr_allowAltarClassChange.Value ? 1f : 0f); VL_Utility.ModID = "valheim.torann.valheimlegends"; VL_Utility.Folder = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); ZLog.Log((object)("Valheim Legends attempting to find VLAssets in the directory with " + ((BaseUnityPlugin)this).Info.Location)); Texture2D val = VL_Utility.LoadTextureFromAssets("abjuration_skill.png"); Sprite icon = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); Texture2D val2 = VL_Utility.LoadTextureFromAssets("conjuration_skill.png"); Sprite icon2 = Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), new Vector2(0.5f, 0.5f)); Texture2D val3 = VL_Utility.LoadTextureFromAssets("alteration_skill.png"); Sprite icon3 = Sprite.Create(val3, new Rect(0f, 0f, (float)((Texture)val3).width, (float)((Texture)val3).height), new Vector2(0.5f, 0.5f)); Texture2D val4 = VL_Utility.LoadTextureFromAssets("discipline_skill.png"); Sprite icon4 = Sprite.Create(val4, new Rect(0f, 0f, (float)((Texture)val4).width, (float)((Texture)val4).height), new Vector2(0.5f, 0.5f)); Texture2D val5 = VL_Utility.LoadTextureFromAssets("evocation_skill.png"); Sprite icon5 = Sprite.Create(val5, new Rect(0f, 0f, (float)((Texture)val5).width, (float)((Texture)val5).height), new Vector2(0.5f, 0.5f)); Texture2D val6 = VL_Utility.LoadTextureFromAssets("illusion_skill.png"); Sprite icon6 = Sprite.Create(val6, new Rect(0f, 0f, (float)((Texture)val6).width, (float)((Texture)val6).height), new Vector2(0.5f, 0.5f)); Texture2D val7 = VL_Utility.LoadTextureFromAssets("movement_icon.png"); Ability3_Sprite = Sprite.Create(val7, new Rect(0f, 0f, (float)((Texture)val7).width, (float)((Texture)val7).height), new Vector2(0.5f, 0.5f)); Texture2D val8 = VL_Utility.LoadTextureFromAssets("strength_icon.png"); Ability2_Sprite = Sprite.Create(val8, new Rect(0f, 0f, (float)((Texture)val8).width, (float)((Texture)val8).height), new Vector2(0.5f, 0.5f)); Texture2D val9 = VL_Utility.LoadTextureFromAssets("protection_icon.png"); Ability1_Sprite = Sprite.Create(val9, new Rect(0f, 0f, (float)((Texture)val9).width, (float)((Texture)val9).height), new Vector2(0.5f, 0.5f)); Texture2D val10 = VL_Utility.LoadTextureFromAssets("riposte_icon.png"); RiposteIcon = Sprite.Create(val10, new Rect(0f, 0f, (float)((Texture)val10).width, (float)((Texture)val10).height), new Vector2(0.5f, 0.5f)); Texture2D val11 = VL_Utility.LoadTextureFromAssets("rogue_icon.png"); RogueIcon = Sprite.Create(val11, new Rect(0f, 0f, (float)((Texture)val11).width, (float)((Texture)val11).height), new Vector2(0.5f, 0.5f)); Texture2D val12 = VL_Utility.LoadTextureFromAssets("monk_icon.png"); MonkIcon = Sprite.Create(val12, new Rect(0f, 0f, (float)((Texture)val12).width, (float)((Texture)val12).height), new Vector2(0.5f, 0.5f)); Texture2D val13 = VL_Utility.LoadTextureFromAssets("weaken_icon.png"); WeakenIcon = Sprite.Create(val13, new Rect(0f, 0f, (float)((Texture)val13).width, (float)((Texture)val13).height), new Vector2(0.5f, 0.5f)); Texture2D val14 = VL_Utility.LoadTextureFromAssets("ranger_icon.png"); RangerIcon = Sprite.Create(val14, new Rect(0f, 0f, (float)((Texture)val14).width, (float)((Texture)val14).height), new Vector2(0.5f, 0.5f)); Texture2D val15 = VL_Utility.LoadTextureFromAssets("valkyrie_icon.png"); ValkyrieIcon = Sprite.Create(val15, new Rect(0f, 0f, (float)((Texture)val15).width, (float)((Texture)val15).height), new Vector2(0.5f, 0.5f)); Texture2D val16 = VL_Utility.LoadTextureFromAssets("biome_meadows_icon.png"); BiomeMeadowsIcon = Sprite.Create(val16, new Rect(0f, 0f, (float)((Texture)val16).width, (float)((Texture)val16).height), new Vector2(0.5f, 0.5f)); Texture2D val17 = VL_Utility.LoadTextureFromAssets("biome_blackforest_icon.png"); BiomeBlackForestIcon = Sprite.Create(val17, new Rect(0f, 0f, (float)((Texture)val17).width, (float)((Texture)val17).height), new Vector2(0.5f, 0.5f)); Texture2D val18 = VL_Utility.LoadTextureFromAssets("biome_swamp_icon.png"); BiomeSwampIcon = Sprite.Create(val18, new Rect(0f, 0f, (float)((Texture)val18).width, (float)((Texture)val18).height), new Vector2(0.5f, 0.5f)); Texture2D val19 = VL_Utility.LoadTextureFromAssets("biome_mountain_icon.png"); BiomeMountainIcon = Sprite.Create(val19, new Rect(0f, 0f, (float)((Texture)val19).width, (float)((Texture)val19).height), new Vector2(0.5f, 0.5f)); Texture2D val20 = VL_Utility.LoadTextureFromAssets("biome_plains_icon.png"); BiomePlainsIcon = Sprite.Create(val20, new Rect(0f, 0f, (float)((Texture)val20).width, (float)((Texture)val20).height), new Vector2(0.5f, 0.5f)); Texture2D val21 = VL_Utility.LoadTextureFromAssets("biome_ocean_icon.png"); BiomeOceanIcon = Sprite.Create(val21, new Rect(0f, 0f, (float)((Texture)val21).width, (float)((Texture)val21).height), new Vector2(0.5f, 0.5f)); Texture2D val22 = VL_Utility.LoadTextureFromAssets("biome_mist_icon.png"); BiomeMistIcon = Sprite.Create(val22, new Rect(0f, 0f, (float)((Texture)val22).width, (float)((Texture)val22).height), new Vector2(0.5f, 0.5f)); Texture2D val23 = VL_Utility.LoadTextureFromAssets("biome_ash_icon.png"); BiomeAshIcon = Sprite.Create(val23, new Rect(0f, 0f, (float)((Texture)val23).width, (float)((Texture)val23).height), new Vector2(0.5f, 0.5f)); LoadModAssets_Awake(); VL_Utility.SetTimer(); AbjurationSkillDef = new SkillDef { m_skill = (SkillType)AbjurationSkillID, m_icon = icon, m_description = "Skill in creating protective spells and wards", m_increseStep = 1f }; AlterationSkillDef = new SkillDef { m_skill = (SkillType)AlterationSkillID, m_icon = icon3, m_description = "Skill in temporarily enhancing or modifying attributes", m_increseStep = 1f }; ConjurationSkillDef = new SkillDef { m_skill = (SkillType)ConjurationSkillID, m_icon = icon2, m_description = "Skill in temporarily manifesting reality by molding objects and energy", m_increseStep = 1f }; DisciplineSkillDef = new SkillDef { m_skill = (SkillType)DisciplineSkillID, m_icon = icon4, m_description = "Ability to perform or resist phenomenal feats through strength of body and mind", m_increseStep = 1f }; EvocationSkillDef = new SkillDef { m_skill = (SkillType)EvocationSkillID, m_icon = icon5, m_description = "Skill in creating and manipulating energy", m_increseStep = 1f }; IllusionSkillDef = new SkillDef { m_skill = (SkillType)IllusionSkillID, m_icon = icon6, m_description = "Skill in creating convincing illusions", m_increseStep = 1f }; legendsSkills.Add(DisciplineSkillDef); legendsSkills.Add(AbjurationSkillDef); legendsSkills.Add(AlterationSkillDef); legendsSkills.Add(ConjurationSkillDef); legendsSkills.Add(EvocationSkillDef); legendsSkills.Add(IllusionSkillDef); _Harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "valheim.torann.valheimlegends"); } private void OnDestroy() { if (_Harmony != null) { _Harmony.UnpatchSelf(); } } public static void SetVLPlayer(Player p) { vl_player = new VL_Player(); foreach (VL_Player vl_player in vl_playerList) { if (!(p.GetPlayerName() == vl_player.vl_name)) { continue; } ValheimLegends.vl_player.vl_name = vl_player.vl_name; ValheimLegends.vl_player.vl_class = vl_player.vl_class; if ((ValheimLegends.vl_player.vl_class == PlayerClass.None && chosenClass.Value.ToLower() != "none") || (chosenClass.Value.ToLower() != "none" && VL_GlobalConfigs.ConfigStrings["vl_svr_enforceConfigClass"] != 0f)) { switch (chosenClass.Value.ToLower()) { case "berserker": ValheimLegends.vl_player.vl_class = PlayerClass.Berserker; break; case "druid": ValheimLegends.vl_player.vl_class = PlayerClass.Druid; break; case "mage": ValheimLegends.vl_player.vl_class = PlayerClass.Mage; break; case "ranger": ValheimLegends.vl_player.vl_class = PlayerClass.Ranger; break; case "shaman": ValheimLegends.vl_player.vl_class = PlayerClass.Shaman; break; case "valkyrie": ValheimLegends.vl_player.vl_class = PlayerClass.Valkyrie; break; case "metavoker": ValheimLegends.vl_player.vl_class = PlayerClass.Metavoker; break; case "priest": ValheimLegends.vl_player.vl_class = PlayerClass.Priest; break; case "monk": ValheimLegends.vl_player.vl_class = PlayerClass.Monk; break; case "duelist": ValheimLegends.vl_player.vl_class = PlayerClass.Duelist; break; case "enchanter": ValheimLegends.vl_player.vl_class = PlayerClass.Enchanter; break; case "rogue": ValheimLegends.vl_player.vl_class = PlayerClass.Rogue; break; } } NameCooldowns(); } } public static void UpdateVLPlayer(Player p) { foreach (VL_Player vl_player in vl_playerList) { if (p.GetPlayerName() == vl_player.vl_name) { vl_player.vl_class = ValheimLegends.vl_player.vl_class; SaveVLPlayer_Patch.Postfix(Game.instance.GetPlayerProfile(), Game.instance.GetPlayerProfile().GetFilename(), Game.instance.GetPlayerProfile().GetName()); } } } public static void CompendiumUpdates() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Expected O, but got Unknown //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Expected O, but got Unknown //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Expected O, but got Unknown //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Expected O, but got Unknown //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_0734: Expected O, but got Unknown //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Expected O, but got Unknown //IL_082b: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0846: Unknown result type (might be due to invalid IL or missing references) //IL_0865: Unknown result type (might be due to invalid IL or missing references) //IL_0872: Expected O, but got Unknown //IL_08ca: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Unknown result type (might be due to invalid IL or missing references) //IL_0904: Unknown result type (might be due to invalid IL or missing references) //IL_0911: Expected O, but got Unknown //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_096e: Unknown result type (might be due to invalid IL or missing references) //IL_0979: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Unknown result type (might be due to invalid IL or missing references) //IL_09a3: Unknown result type (might be due to invalid IL or missing references) //IL_09b0: Expected O, but got Unknown int num = -1; Tutorial.instance.m_texts.ForEach(delegate(TutorialText tutorial) { Debug.Log((object)("Found tutorial:\t" + tutorial.m_name + "\n" + tutorial.m_text)); }); num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Offerings"); TutorialText val = new TutorialText(); val.m_label = "Legends Offerings"; val.m_name = "VL_Offerings"; val.m_text = "You can inherit legendary powers by placing token on the altar:\nBerserker - " + VL_GlobalConfigs.c_berserkerItem.ToString() + "\nDruid - " + VL_GlobalConfigs.c_druidItem.ToString() + "\nDuelist - " + VL_GlobalConfigs.c_duelistItem.ToString() + "\nEnchanter - " + VL_GlobalConfigs.c_enchanterItem.ToString() + "\nMage - " + VL_GlobalConfigs.c_mageItem.ToString() + "\nMetavoker - " + VL_GlobalConfigs.c_metavokerItem.ToString() + "\nMonk - " + VL_GlobalConfigs.c_monkItem.ToString() + "\nPriest - " + VL_GlobalConfigs.c_priestItem.ToString() + "\nRanger - " + VL_GlobalConfigs.c_rangerItem.ToString() + "\nRogue - " + VL_GlobalConfigs.c_rogueItem.ToString() + "\nShaman - " + VL_GlobalConfigs.c_shamanItem.ToString() + "\nValkyrie - " + VL_GlobalConfigs.c_valkyrieItem.ToString(); val.m_topic = "Token Offering"; TutorialText item = val; if (num == -1) { Tutorial.instance.m_texts.Add(item); } TutorialText val2 = new TutorialText { m_label = "Legend: Mage", m_name = "VL_Mage", m_text = "The story of a mage centers around one key element - raw power. A mage focuses on harnessing raw, destructive energy.\n\nSkills: Evocation\nSacrifice: " + VL_GlobalConfigs.c_mageItem.ToString() + "\n\nFireball: creates a ball of fire above the caster that arcs towards the casters target.\nDamage:\n Fire - 10->40 + 2*Evocation\n Blunt - 1/2 Fire\n AoE - 3m + 1%*Evocation\nCooldown: 12s\nEnergy: 50 + 0.5*Evocation\n*Afflicts targets with burning\n\nFrost Nova: point blank area of effect frost damage that slows victims for a short period.\nDamage:\n Ice - 10 + 0.5*Evocation -> 20 + Evocation\n AoE - 10m + 1%*Evocation\nCooldown: 20s\nEnergy: 40\n*Slows movement of affected targets by 60% for 4s\n**Removes burning effect from caster\n\nMeteor: channels energy to call down a meteor storm on the targeted area.\nDamage (per meteor):\n Fire - 30 + 0.5*Evocation -> 50 + Evocation\n Blunt - 1/2 Fire\n AoE - 8m + 0.5%*Evocation\nCooldown: 180s\nEnergy: 60 initial + 30 per second channeled\n*Afflicts targets with burning\n**Press and hold the ability button to channel the spell to create multiple meteors\n***Jump or dodge to cancel ability\n\nBonus skills:\n - Inferno - alternate attack to Frost Nova; press the button assigned to Frost Nova while holding block to create a high powered fire blast around the caster\n - Ice Daggers - alternate attack to Fireball; press the button assigned to Fireball while holding block to throw a short range dagger made of razor sharp ice", m_topic = "Legend Mage" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Mage"); if (num == -1) { Tutorial.instance.m_texts.Add(val2); } else { Tutorial.instance.m_texts[num] = val2; } val = new TutorialText(); val.m_label = "Legend: Berserker"; val.m_name = "VL_Berserker"; val.m_text = "Berserkers harness their rage into physical carnage and will sacrifice their own health to fuel their rage.\n\nSkills: Discipline and Alteration\nSacrifice: " + VL_GlobalConfigs.c_berserkerItem.ToString() + "\n\nExecute: empower the next several physical attacks to deal extra damage.\n Damage: +" + ((Class_Berserker.execute_damagebonus - 1f) * 100f).ToString("#####") + "% + " + (Class_Berserker.execute_damagebonus_scaling * 100f).ToString("0.0") + "%*Discipline\n Stagger: +" + ((Class_Berserker.execute_staggerbonus - 1f) * 100f).ToString("#####") + "% + " + (Class_Berserker.execute_staggerbonus_scaling * 100f).ToString("0.0") + "%*Discipline\nCharges: " + Class_Berserker.execute_charges_base.ToString("#####") + " + " + Class_Berserker.execute_charges_scaling.ToString("0.##") + "*Discipline\nCooldown: 60s\nEnergy: 60\n\nBerserk: sacrifices health to increase movement speed, attack power, remove stamina regeneration delay and gain renewed energy through combat.\nDamage:\n Bonus +20% + 0.5%*Alteration\nMovement Speed - +20% + 0.5%*Alteration\nCooldown: 60s\nEnergy: 0\n*Absorbs 15%+0.2%*Alteration of total incflicted damage as stamina\n\nDash: dash forward in the blink of an eye, cutting through enemies in your way.\nDamage:\n 80% + 0.5%*Discipline of equipped weapon damage\nCooldown: 10s\nEnergy: 70\n*10m dash distance\n\nBonus skills:\n - 2H Specialist - 30% reduction in stamina use when swinging 2H weapons\n - Blood Rage - gain 4% bonus damage for every 10% of missing health"; val.m_topic = "Legend Berserker"; TutorialText item2 = val; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Berserker"); if (num == -1) { Tutorial.instance.m_texts.Add(item2); } TutorialText val3 = new TutorialText { m_label = "Legend: Druid", m_name = "VL_Druid", m_text = "Druid's are the embodiment of nature's resilience, cunning, and fury and act as a conduit of its will.\n\nSkills: Conjuration and Alteration\nSacrifice: " + VL_GlobalConfigs.c_duelistItem.ToString() + "\n\nRegeneration: applies a heal over time to the caster and all nearby allies.\nHealing:\n Self - 0.5 + 0.4*Alteration\n Other - 2 + 0.25*Average Skill Level\nDuration: Heals every 2s for 20s\nCooldown: 60s\nEnergy: 60\n\nNature's Defense: calls upon nature to defend an area.\nSummon:\n Duration - 24s + 0.3s*Conjuration\n 3x Root defenders\n 2x + 0.05*Conjuration Drusquitos\nCooldown: 120s\nEnergy: 80\n*Defender's health and attack power increase with Conjuration\n**Each Root defender restores stamina to the caster as long as the caster remains near the point Nature's Defense was activated\n\nVines: create vines that grow at an alarming speed.\nDamage:\n Piercing - 10 + 0.6*Conjuration -> 15 + 1.2*Conjuration per vine\nCooldown: 20s\nEnergy: 30 initial + 9 every .5s\n*Vines are a channeled ability, press and hold the ability button to continuously project vines\n\nBonus skills:\n - Natures Restoration - consume ancient seeds, pine cones, fir cones, beech seeds or birch seeds to quickly restore stamina; seeds may be consumed similar to any food item", m_topic = "Legend Druid" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Druid"); if (num == -1) { Tutorial.instance.m_texts.Add(val3); } else { Tutorial.instance.m_texts[num] = val3; } TutorialText val4 = new TutorialText { m_label = "Legend: Metavoker", m_name = "VL_Metavoker", m_text = "Metavoker's manipulate energy in a manner that affects light, space, and potential\n\nSkills: Illusion and Evocation\nSacrifice: " + VL_GlobalConfigs.c_metavokerItem.ToString() + "\nLight: creates a light that follows the caster and illuminates a large area\nDamage:\n Lightning - 2 + 0.25*Illusion -> 5 + 0.5*Illusion\n Force - 100 + Illusion\nDuration: 5m (or until directed)\nCooldown: 20s\nEnergy: 50\n*Use the ability once to summon the mage light for illumination\n**Use the ability with a mage light active to direct the light as a projectile\n\nReplica: bends light and energy to create reinforced illusions of every nearby enemy.\nSummon:\n Duration - 8s + 0.2s*Illusion\nCooldown: 30s\nEnergy: 70\n*Replica's health and attack power increase with Illusion\n\nWarp: collects the energy of the caster and projects it to a target location; any excess energy is released at the exit point.\nDamage:\n Lightning - excess distance * (0.033*Evocation -> 0.05*Evocation)\nCooldown: 6s\nEnergy: 40 initial + 60 every 1s\n*Tap ability button to instantly warp towards the target\n**Press and hold the ability button to collect energy to warp longer distances or warp with excess energy\n\nBonus skills:\n - Safe Fall - press and hold jump to slow your descent; this ability requires stamina to maintain\n - Force Wave - pressing attack while holding block will create a powerful wave of energy that knocks enemies back; shares a cooldown with Replica\n", m_topic = "Legend Metavoker" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Metavoker"); if (num == -1) { Tutorial.instance.m_texts.Add(val4); } else { Tutorial.instance.m_texts[num] = val4; } TutorialText val5 = new TutorialText { m_label = "Legend: Duelist", m_name = "VL_Duelist", m_text = "Duelist's specialize in offensive combat techniques that exploit openings in an opponent's defense.\n\nSkills: Discipline\nSacrifice: " + VL_GlobalConfigs.c_duelistItem.ToString() + "\n\nHip Shot: fires a high velocity projectile from a concealed, mechanical contraption.\nDamage:\n Pierce - 5->30 + Discipline\nCooldown: 10s\nEnergy: 25\n\nRiposte: turns the energy of an attack into a devastating counter-attack\nDamage:\n returns 50%+1%*Discipline of the damage upon the attacker and quickly launches an attack maneuver that deals damage based on the equipped weapon\nCooldown: 6s\nEnergy: 30\n*Riposte must be timed well to be effective. Block amount and parry force is increased 10x while riposte is active and the player executes a perfect block.\n**Riposte can only be used with a weapon equipped and without a shield.\n\nSeismic Slash: a combat technique that compresses energy and releases it in a tight arc as a razor thin burst.\nDamage:\n 60%+0.06%*Discipline of weapon damage\nForce: 25+0.1*Discipline\nCooldown: 30s\nEnergy: 60\n*Deals damage to all targets in a 25 degree cone in front of the caster\n\nBonus skills:\n - Weapon Master - gain a bonus to block and parry based on Discipline while wielding only a weapon\n - Energy Conversion - redirect the energy from a parried attack to reduce the cooldown of Hip Shot and S. Slash\n", m_topic = "Legend Duelist" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Duelist"); if (num == -1) { Tutorial.instance.m_texts.Add(val5); } else { Tutorial.instance.m_texts[num] = val5; } TutorialText val6 = new TutorialText { m_label = "Legend: Rogue", m_name = "VL_Rogue", m_text = "Rogue's are infamous for their dirty fighting and ruthless cunning.\n\nSkills: Discipline and Alteration\nSacrifice: " + VL_GlobalConfigs.c_rogueItem.ToString() + "\n\nPoison Bomb: throw a vial of highly caustic poison that affects an area for a short time.\nDamage:\n Poison DoT - 10 + alteration\nCooldown: 30s\nEnergy: 50\n*Duration and hit frequency increase with Alteration\n\nFade: returns the rogue to a previous point and adds a supply to the bag of tricks\nCooldown: 15s\nEnergy: 10\n*Set the fade point by using the ability. While fade is on cooldown, use the ability again to instantly return to the fade.\n\nBackstab: instantly move behind the target and strike a critical blow\nDamage:\n 70% + 0.5%*Discipline of weapon damage\nForce: 10 + 0.5*Discipline\nCooldown: 20s\nEnergy: 60\n\nBonus skills:\n - Bag of Tricks - prepare class charges every 20s to use bonus skills\n - Stealthy - gain a passive bonus to move speed while crouched\n - Dagger Mastery - gain a passive 25% bonus damage while using daggers (offhand shield or torches are not allowed)\n - Throwing Knives - quickly throw a small dagger using a rogue charge; this skill is activated by pressing attack while holding block\n - Double Jump - leap to extraordinary heights by stepping on seemingly invisible footholds; activate this skill by pressing jump while in the air\n*Double Jump may only be activated once, after leaving the ground\n\n", m_topic = "Legend Rogue" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Rogue"); if (num == -1) { Tutorial.instance.m_texts.Add(val6); } else { Tutorial.instance.m_texts[num] = val6; } TutorialText val7 = new TutorialText { m_label = "Legend: Priest", m_name = "VL_Priest", m_text = "Priest's command a balanced set of offensive and healing abilities that makes them a formidable ally, or foe.\n\nSkills: Alteration and Evocation\nSacrifice: " + VL_GlobalConfigs.c_priestItem.ToString() + "\n\nSanctify: calls down the fiery hammer of Ragnarök to purify a target area.\nDamage:\n Blunt - (10 + 0.5*Evocation)->(20 + 0.75*Evocation)\n Fire - (10 + 0.5*Evocation)->(20 + 0.75*Evocation)\n Spirit - (10 + 0.5*Evocation)->(20 + 0.75*Evocation)\nAoE: 8m + 0.04m*Evocation\nCooldown: 45s\nEnergy: 70\n\nPurge: release a burst of power around the caster that burns enemies and heals allies\nDamage:\n Fire - (4 + 0.4*Evocation)->(8 + 0.8*Evocation)\n Spirit - (4 + 0.4*Evocation)->(8 + 0.8*Evocation)\nAoE: 20m + 0.2m*Evocation\nHealing: 0.5 + 0.5*Alteration in a 20m + 0.2m*Alteration around the caster\nCooldown: 15s\nEnergy: 50\n\nHeal: a channeled ability that increases heal rate the longer its channeled.\nHealing:\n Initial - 10 + Alteration\n Continuous - 2x (pulse count + 0.3*Alteration)\nCooldown: 30s\nEnergy: 40 (initial), 22.5 per pulse\n*Press and hold the ability button to provide continuous healing waves\n**Each healing pulse occurs every .5s\n***Initial pulse removes 1x negative status effect (poison, burning, smoked, wet, frost)\n\nBonus skills:\n - Dying Light - any hit that would kill the priest reduces HP to 1 instead; can only trigger once every 10m", m_topic = "Legend Priest" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Priest"); if (num == -1) { Tutorial.instance.m_texts.Add(val7); } else { Tutorial.instance.m_texts[num] = val7; } TutorialText val8 = new TutorialText { m_label = "Legend: Enchanter", m_name = "VL_Enchanter", m_text = "Enchanters use a variety of indirect abilities to shape the situation in their favor.\n\nSkills: Alteration and Abjuration\nSacrifice: " + VL_GlobalConfigs.c_enchanterItem.ToString() + "\n\nWeaken: weakens all enemies in a target area.\nAoE: 5m + 0.01m*Alteration\nDebuff:\n Movement Speed -20%+0.1%*Alteration\n Attack Power -15%+0.15%*Alteration\nCooldown: 30s\nEnergy: 40\n*10% of the damage dealt to a weakened enemy is returned as stamina to the attacker\n\nCharm: turn enemies into allies for a short time\nDuration: 30s\nCooldown: 60s\nEnergy: 50\n*Charm does not work on boss enemies\n\nZone(Biome) Buff: renders a unique, long lasting boon to all nearby allies that differs in each biome.\nCooldown: 180s\nEnergy: 40 (initial) + 60 per second channeled\n*Press and hold the ability button to increase the duration and power of the boon\n**Ally buffs are dependent on their average skill level; the caster's buff is based on their abjuration skill and channeled charge amount\n***The enchanter may 'burn' an active zone buff by pressing the ability button while a zone buff is active; this creates a burst of electric energy from the casters hands that deals damage based on the time remaining on the zone buff\n\nThe benefits of each biome are:\n Meadows - 1 + 0.1 Health every 5s\n\n Black Forest - carry capacity increased by 50 + Abjuration; always under cover\n\n Swamp - poison resistance increased 20% + 0.2%*Abjuration; the player emits a small amount of light\n\n Mountain - frost resistance increased 20% + 0.2%*Abjuration; stamina regeneration 5 + 0.075*Abjuration every 5s\n\n Plains - fire resistance increased 20% + 0.2%*Abjuration; run speed increased 10% + 0.1%*Abjuration\n\n Ocean - lightning resistance increased 20% + 0.2%*Abjuration; swim speed increased 50% + 1%*Abjuration\n\n Mistland - spirit and frost resistance increased 20% + 0.2%*Abjuration; each attack deals 20 + 0.3*Abjuration as additional frost damage\n\n Ashland - fire and poison resistance increase 20% + 0.2%*Abjuration; each attack deals 26 + 0.4*Abjuration as additional fire damage\n\nBonus skills:\n - Elemental Touch - 30% chance for any damage dealt by the enchanter to deal additional elemental (Lightning/Fire/Frost) damage; damage is based on alteration skill\n - Elemental Absorption - blocked elemental damage is absorbed by the enchanter as stamina", m_topic = "Legend Enchanter" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Enchanter"); if (num == -1) { Tutorial.instance.m_texts.Add(val8); } else { Tutorial.instance.m_texts[num] = val8; } TutorialText val9 = new TutorialText { m_label = "Legend: Monk", m_name = "VL_Monk", m_text = "Monks are masters of unarmed combat, turning their body into a living weapon.\n\nSkills: Discipline\nSacrifice: " + VL_GlobalConfigs.c_monkItem.ToString() + "\n\nChi strike: attack with a blow so powerful it creates a shockwave.\nDamage:\n Blunt - 12 + 0.5*Discipline -> 24 + Discipline\nCooldown: 1s\nEnergy: 3 chi\n*Uses chi instead of stamina; build chi through unarmed combat\n**Activate while on the ground to create a powerful frontal attack; use from sufficient height to propel the monk to the ground, creating a powerful AoE attack\n\nFlying Kick: launches into a flying whirlwind kick.\nDamage:\n Blunt - 80% + 0.5% of unarmed damage per hit\nCooldown: 6s\nEnergy: 50\n*Can strike multiple times - attack past or above targets to land multiple hits\n**Attack directly at the target for an assured strike that will rebound the monk into the air (hint: combo with Chi Strike)\n\nChi Bolt: projects condensed energy that detonates on impact.\nDamage:\n Blunt - (10 + Discipline) -> (40 + 2*Discipline)\n Spirit - (10 -> 20) + Discipline\nAoE - 3m\nCooldown: 1s\nEnergy: 5 chi\n\nBonus Skills:\n - Chi - each unarmed attack that hits and each fully blocked attack generates a charge of chi\n - Living Weapon - unarmed attacks deal 25% more damage\n - Strong Body - unarmed block amount is increased by 1 for each level in Discipline and monks can fall from over double the height before taking damage\n\n", m_topic = "Legend Monk" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Monk"); if (num == -1) { Tutorial.instance.m_texts.Add(val9); } else { Tutorial.instance.m_texts[num] = val9; } TutorialText val10 = new TutorialText { m_label = "Legend: Shaman", m_name = "VL_Shaman", m_text = "Shaman's are known and respected for their ability to inspire their allies to greatness.\n\nSkills: Abjuration, Alteration and Evocation\nSacrifice: " + VL_GlobalConfigs.c_shamanItem.ToString() + "\n\nEnrage: incite allies into a frenzied rage that increases movement and endurance.\nAugment:\n Speed - 120% + 0.2%*Alteration\n Stamina Regeneration - 5 + 0.1*Alteration per second\nAoE: 30m\nDuration: 16s + 0.2s*Alteration\nCooldown: 60s\nEnergy: 60\n*Skill bonus is calculated as the average of all skills for allies, and Alteration skill for the caster\n\nShell: surround allies in a protection shell that resists elemental attacks and augments attacks with spirit damage.\nDamage:\n Spirit - 10 + 0.5 * Abjuration added to each attack\nBuff: reduces all elemental damage by 40% + 0.6%*Abjuration\nAoE: 30m\nDuration: 25s + 0.3*Abjuration\nCooldown: 60s\nEnergy: 80\n\nSpirit Shock: generate a powerful blast that shocks all nearby enemies\nDamage:\n Lightning - 6 + 0.4*Evocation -> 12 + 0.6*Evocation\n Spirit - 6 + 0.4*Evocation -> 12 + 0.6*Evocation\nAoE: 11m + 0.05m*Evocation\nCooldown: 30s\nEnergy: 80\n\nBonus skills:\n - Water Glide - press and hold jump to quickly glide across water; rapidly consumes stamina\n - Spirit Guide - gain 25 stamina any time a creature dies nearby", m_topic = "Legend Shaman" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Shaman"); if (num == -1) { Tutorial.instance.m_texts.Add(val10); } else { Tutorial.instance.m_texts[num] = val10; } TutorialText val11 = new TutorialText { m_label = "Legend: Valkyrie", m_name = "VL_Valkyrie", m_text = "Valkyrie's are a versatile class focused on defense and movement.\nSacrifice: " + VL_GlobalConfigs.c_valkyrieItem.ToString() + "\n\nSkills: Discipline and Abjuration\n\nBulwark: manifest a powerful shield that reduces all damage to the valkyrie.\nAugment: damage reduced by 25% + 0.5%*Abjuration\nDuration: 12s + 0.2s*Alteration\nCooldown: 60s\nEnergy: 60\n\nStagger: send forth a shock wave that staggers all nearby enemies.\nAoE: 6m\nCooldown: 20s\nEnergy: 40\n\nLeap: jump high into the air to come crashing down on your enemies.\nDamage:\n Blunt - 2*Discipline -> 3*Discipline + velocity bonus\nAoE: 6m + 0.05m*Discipline\nCooldown: 15s\nEnergy: 50\n*Velocity bonus is calculated based on the max height reached above ground\n**Leap multiplies existing velocity; triggering leap while running and jumping will produce the longest jumps\n\nBonus skills:\n - Aegis - successful blocks store energy charges that can be released all at once as a icy wave that extends from the Valkyrie or used to throw a spear that encases a struck enemy in ice", m_topic = "Legend Valkyrie" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Valkyrie"); if (num == -1) { Tutorial.instance.m_texts.Add(val11); } else { Tutorial.instance.m_texts[num] = val11; } TutorialText val12 = new TutorialText { m_label = "Legend: Ranger", m_name = "VL_Ranger", m_text = "The Ranger fearless warriors with peerless survival techniques\n\nSkills: Discipline and Conjuration\nSacrifice: " + VL_GlobalConfigs.c_rangerItem.ToString() + "\n\nShadow Stalk: fade into the shadows gaining a burst of speed and augmenting stealth.\nAugment:\n All movement speed increased by 50% + 1%*Discipline for 3s + 0.03s*Discipline\n Stealth movement speed increased by 50% + 1%*Discipline\nDuration: 20s + 0.9s*Discipline\nCooldown: 45s\nEnergy: 40\n*Shadow stalk causes enemies to lose track of the ranger\n\nShadow Wolf: call a trained shadow wolf to fight by your side.\nDamage:\n Slash - 70 * (0.05 + 0.01*Conjuration)\nHealth: 25 + 9*Conjuration\nHealth Regeneration: 1 + 0.1*Conjuration every 5s\nCooldown: 10m\nEnergy: 75\n*Shadow wolves will vanish when the player logs out or after the duration expires\n**Feeding the shadow wolf will restore its health by 250hp\n\nPower Shot: charge the next few projectiles with great velocity and damage.\nDamage:\n Bonus - 40% + 1.5%*Discipline\nVelocity doubled\nCharge Count: 3 + 0.05*Discipline\nCooldown: 60s\nEnergy: 60\n*Bonus damage applies to all projectiles created by the player (not just arrows)\n**Using Power Shot while the buff is still active will refresh the number of charges\n\nBonus skills:\n - Woodland Stride - passive skill that reduces stamina used while running by 25%\n - Poison resistance - passive skill that reduces poison damage by 25%\n - Quick Dodge - move 2x faster for 2s following a dodge roll", m_topic = "Legend Ranger" }; num = Tutorial.instance.m_texts.FindIndex((TutorialText text) => text.m_name == "VL_Ranger"); if (num == -1) { Tutorial.instance.m_texts.Add(val12); } else { Tutorial.instance.m_texts[num] = val12; } } public static void NameCooldowns() { if (vl_player.vl_class == PlayerClass.Mage) { ZLog.Log((object)"Valheim Legend: Mage"); Ability1_Name = "Fireball"; Ability2_Name = "F. Nova"; Ability3_Name = "Meteor"; Player.m_localPlayer.ShowTutorial("VL_Mage", false); } else if (vl_player.vl_class == PlayerClass.Druid) { ZLog.Log((object)"Valheim Legend: Druid"); Ability1_Name = "Regen"; Ability2_Name = "Living Def."; Ability3_Name = "Vines"; Player.m_localPlayer.ShowTutorial("VL_Druid", false); } else if (vl_player.vl_class == PlayerClass.Shaman) { ZLog.Log((object)"Valheim Legend: Shaman"); Ability1_Name = "Enrage"; Ability2_Name = "Shell"; Ability3_Name = "S. Shock"; Player.m_localPlayer.ShowTutorial("VL_Shaman", false); } else if (vl_player.vl_class == PlayerClass.Ranger) { ZLog.Log((object)"Valheim Legend: Ranger"); Ability1_Name = "Shadow"; Ability2_Name = "Wolf"; Ability3_Name = "P. Shot"; Player.m_localPlayer.ShowTutorial("VL_Ranger", false); } else if (vl_player.vl_class == PlayerClass.Berserker) { ZLog.Log((object)"Valheim Legend: Berserker"); Ability1_Name = "Execute"; Ability2_Name = "Berserk"; Ability3_Name = "Dash"; Player.m_localPlayer.ShowTutorial("VL_Berserker", false); } else if (vl_player.vl_class == PlayerClass.Valkyrie) { ZLog.Log((object)"Valheim Legend: Valkyrie"); Ability1_Name = "Bulwark"; Ability2_Name = "Stagger"; Ability3_Name = "Leap"; Player.m_localPlayer.ShowTutorial("VL_Valkyrie", false); } else if (vl_player.vl_class == PlayerClass.Metavoker) { ZLog.Log((object)"Valheim Legend: Metavoker"); Ability1_Name = "Light"; Ability2_Name = "Replica"; Ability3_Name = "Warp"; Player.m_localPlayer.ShowTutorial("VL_Metavoker", false); } else if (vl_player.vl_class == PlayerClass.Duelist) { ZLog.Log((object)"Valheim Legend: Duelist"); Ability1_Name = "Hip Shot"; Ability2_Name = "Riposte"; Ability3_Name = "S. Slash"; Player.m_localPlayer.ShowTutorial("VL_Duelist", false); } else if (vl_player.vl_class == PlayerClass.Priest) { ZLog.Log((object)"Valheim Legend: Priest"); Ability1_Name = "Sanctify"; Ability2_Name = "Purge"; Ability3_Name = "Heal"; Player.m_localPlayer.ShowTutorial("VL_Priest", false); } else if (vl_player.vl_class == PlayerClass.Rogue) { ZLog.Log((object)"Valheim Legend: Rogue"); Ability1_Name = "P. Bomb"; Ability2_Name = "Fade"; Ability3_Name = "Backstab"; Player.m_localPlayer.ShowTutorial("VL_Rogue", false); } else if (vl_player.vl_class == PlayerClass.Monk) { ZLog.Log((object)"Valheim Legend: Monk"); Ability1_Name = "Ch'i Strike"; Ability2_Name = "F. Kick"; Ability3_Name = "Ch'i Blast"; Player.m_localPlayer.ShowTutorial("VL_Monk", false); } else if (vl_player.vl_class == PlayerClass.Enchanter) { ZLog.Log((object)"Valheim Legend: Enchanter"); Ability1_Name = "Weaken"; Ability2_Name = "Charm"; Ability3_Name = "Z. Charge"; Player.m_localPlayer.ShowTutorial("VL_Enchanter", false); } else { ZLog.Log((object)"Valheim Legend: --None--"); } } private static void LoadModAssets_Awake() { AssetBundle assetBundleFromResources = GetAssetBundleFromResources("vl_assetbundle"); VL_Deathsquit = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_Deathsquit.prefab"); VL_ShadowWolf = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_ShadowWolf.prefab"); VL_DemonWolf = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_DemonWolf.prefab"); VL_Light = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_Light.prefab"); VL_SanctifyHammer = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_SanctifyHammer.prefab"); VL_PoisonBomb = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_PoisonBomb.prefab"); VL_PoisonBombExplosion = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_PoisonBombExplosion.prefab"); VL_ThrowingKnife = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_ThrowingKnife.prefab"); VL_PsiBolt = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_PsiBolt.prefab"); VL_Charm = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_Charm.prefab"); VL_FrostDagger = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_FrostDagger.prefab"); VL_ValkyrieSpear = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_ValkyrieSpear.prefab"); VL_ShadowWolfAttack = assetBundleFromResources.LoadAsset("Assets/CustomAssets/VL_ShadowWolfAttack.prefab"); fx_VL_Lightburst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Lightburst.prefab"); fx_VL_ParticleLightburst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ParticleLightburst.prefab"); fx_VL_ParticleLightSuction = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ParticleLightSuction.prefab"); fx_VL_ReverseLightburst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ReverseLightburst.prefab"); fx_VL_BlinkStrike = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_BlinkStrike.prefab"); fx_VL_QuickShot = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_QuickShot.prefab"); fx_VL_HealPulse = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_HealPulse.prefab"); fx_VL_Purge = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Purge.prefab"); fx_VL_Smokeburst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Smokeburst.prefab"); fx_VL_Shadowburst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Shadowburst.prefab"); fx_VL_Shockwave = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Shockwave.prefab"); fx_VL_FlyingKick = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_FlyingKick.prefab"); fx_VL_MeteorSlam = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_MeteorSlam.prefab"); fx_VL_Weaken = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Weaken.prefab"); fx_VL_WeakenStatus = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_WeakenStatus.prefab"); fx_VL_Shock = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Shock.prefab"); fx_VL_ParticleTailField = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ParticleTailField.prefab"); fx_VL_ParticleFieldBurst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ParticleFieldBurst.prefab"); fx_VL_HeavyCrit = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_HeavyCrit.prefab"); fx_VL_ChiPulse = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ChiPulse.prefab"); fx_VL_Replica = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Replica.prefab"); fx_VL_ReplicaCreate = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ReplicaCreate.prefab"); fx_VL_ForwardLightningShock = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ForwardLightningShock.prefab"); fx_VL_Flames = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_Flames.prefab"); fx_VL_FlameBurst = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_FlameBurst.prefab"); fx_VL_AbsorbSpirit = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_AbsorbSpirit.prefab"); fx_VL_ForceWall = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ForceWall.prefab"); fx_VL_ShieldRelease = assetBundleFromResources.LoadAsset("Assets/CustomAssets/fx_VL_ShieldRelease.prefab"); anim_player_float = assetBundleFromResources.LoadAsset("Assets/CustomAssets/anim_float.anim"); } public static AssetBundle GetAssetBundleFromResources(string fileName) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string name = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(fileName)); Stream manifestResourceStream = executingAssembly.GetManifestResourceStream(name); using (manifestResourceStream) { return AssetBundle.LoadFromStream(manifestResourceStream); } } private static void Add_VL_Assets() { if (!((Object)(object)ObjectDB.instance == (Object)null) && ObjectDB.instance.m_items.Count != 0 && (Object)(object)VL_Deathsquit.GetComponent() != (Object)null) { if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_Deathsquit).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_Deathsquit); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_Deathsquit).name)] = VL_Deathsquit; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_ShadowWolf).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_ShadowWolf); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_ShadowWolf).name)] = VL_ShadowWolf; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_DemonWolf).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_DemonWolf); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_DemonWolf).name)] = VL_DemonWolf; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_Light).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_Light); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_Light).name)] = VL_Light; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_PoisonBomb).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_PoisonBomb); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_PoisonBomb).name)] = VL_PoisonBomb; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_PoisonBombExplosion).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_PoisonBombExplosion); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_PoisonBombExplosion).name)] = VL_PoisonBombExplosion; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_ThrowingKnife).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_ThrowingKnife); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_ThrowingKnife).name)] = VL_ThrowingKnife; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_PsiBolt).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_PsiBolt); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_PsiBolt).name)] = VL_PsiBolt; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_Charm).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_Charm); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_Charm).name)] = VL_Charm; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_FrostDagger).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_FrostDagger); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_FrostDagger).name)] = VL_FrostDagger; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_ValkyrieSpear).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_ValkyrieSpear); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_ValkyrieSpear).name)] = VL_ValkyrieSpear; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_ShadowWolfAttack).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_ShadowWolfAttack); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_ShadowWolfAttack).name)] = VL_ShadowWolfAttack; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)VL_SanctifyHammer).name)) == (Object)null) { ObjectDB.instance.m_items.Add(VL_SanctifyHammer); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)VL_SanctifyHammer).name)] = VL_SanctifyHammer; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Lightburst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Lightburst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Lightburst).name)] = fx_VL_Lightburst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleLightburst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ParticleLightburst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleLightburst).name)] = fx_VL_ParticleLightburst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleLightSuction).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ParticleLightSuction); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleLightSuction).name)] = fx_VL_ParticleLightSuction; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ReverseLightburst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ReverseLightburst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ReverseLightburst).name)] = fx_VL_ReverseLightburst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_BlinkStrike).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_BlinkStrike); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_BlinkStrike).name)] = fx_VL_BlinkStrike; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_QuickShot).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_QuickShot); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_QuickShot).name)] = fx_VL_QuickShot; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_HealPulse).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_HealPulse); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_HealPulse).name)] = fx_VL_HealPulse; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Purge).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Purge); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Purge).name)] = fx_VL_Purge; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Smokeburst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Smokeburst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Smokeburst).name)] = fx_VL_Smokeburst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Shadowburst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Shadowburst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Shadowburst).name)] = fx_VL_Shadowburst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Shockwave).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Shockwave); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Shockwave).name)] = fx_VL_Shockwave; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_FlyingKick).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_FlyingKick); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_FlyingKick).name)] = fx_VL_FlyingKick; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_MeteorSlam).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_MeteorSlam); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_MeteorSlam).name)] = fx_VL_MeteorSlam; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Weaken).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Weaken); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Weaken).name)] = fx_VL_Weaken; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_WeakenStatus).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_WeakenStatus); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_WeakenStatus).name)] = fx_VL_WeakenStatus; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Shock).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Shock); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Shock).name)] = fx_VL_Shock; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleTailField).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ParticleTailField); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleTailField).name)] = fx_VL_ParticleTailField; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleFieldBurst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ParticleFieldBurst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ParticleFieldBurst).name)] = fx_VL_ParticleFieldBurst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_HeavyCrit).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_HeavyCrit); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_HeavyCrit).name)] = fx_VL_HeavyCrit; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ChiPulse).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ChiPulse); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ChiPulse).name)] = fx_VL_ChiPulse; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Replica).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Replica); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Replica).name)] = fx_VL_Replica; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ReplicaCreate).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ReplicaCreate); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ReplicaCreate).name)] = fx_VL_ReplicaCreate; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ForwardLightningShock).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ForwardLightningShock); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ForwardLightningShock).name)] = fx_VL_ForwardLightningShock; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Flames).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_Flames); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_Flames).name)] = fx_VL_Flames; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_FlameBurst).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_FlameBurst); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_FlameBurst).name)] = fx_VL_FlameBurst; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_AbsorbSpirit).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_AbsorbSpirit); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_AbsorbSpirit).name)] = fx_VL_AbsorbSpirit; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ForceWall).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ForceWall); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ForceWall).name)] = fx_VL_ForceWall; } if ((Object)(object)ObjectDB.instance.GetItemPrefab(StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ShieldRelease).name)) == (Object)null) { ObjectDB.instance.m_items.Add(fx_VL_ShieldRelease); ((Dictionary)typeof(ObjectDB).GetField("m_itemByHash", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ObjectDB.instance))[StringExtensionMethods.GetStableHashCode(((Object)fx_VL_ShieldRelease).name)] = fx_VL_ShieldRelease; } } } } public class VL_ConfigSync { public static string ConfigPath = Path.GetDirectoryName(Paths.BepInExConfigPath) + Path.DirectorySeparatorChar + "ValheimLegends.cfg"; public static void RPC_VL_ConfigSync(long sender, ZPackage configPkg) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown if (ZNet.instance.IsServer()) { ZPackage val = new ZPackage(); string[] array = File.ReadAllLines(ConfigPath); List list = new List(); for (int i = 0; i < array.Length; i++) { if (array[i].Trim().StartsWith("vl_svr_")) { list.Add(array[i]); } } list.Add("vl_svr_version = 0.7.10"); val.Write(list.Count); foreach (string item in list) { val.Write(item); } ZRoutedRpc.instance.InvokeRoutedRPC(sender, "VL_ConfigSync", new object[1] { val }); ZLog.Log((object)("Valheim Legends server configurations synced to peer #" + sender)); } else { if (configPkg == null || configPkg.Size() <= 0 || sender != ValheimLegends.ServerID) { return; } int num = configPkg.ReadInt(); if (num == 0) { ZLog.LogWarning((object)"Got zero line config file from server. Cannot load."); return; } char[] trimChars = new char[2] { ' ', '=' }; bool flag = false; for (int j = 0; j < num; j++) { string text = configPkg.ReadString(); string text2 = text.Substring(0, text.IndexOf('=') + 1); text2 = text2.Trim(trimChars); if (text2 == "vl_svr_version") { string text3 = text.Substring(text.IndexOf('=') + 1); text3 = text3.Trim(trimChars); if (text3 != "0.7.10") { char[] trimChars2 = new char[3] { '.', ',', '0' }; text3.Trim(trimChars2); VL_GlobalConfigs.ConfigStrings[text2].ToString().Trim(trimChars2); ZLog.Log((object)("VL CLIENT -------------- version failure: server had version [" + text3 + "] and client had version [0.7.10]")); flag = true; } } else if (VL_GlobalConfigs.ConfigStrings.ContainsKey(text2)) { string text4 = text.Substring(text.IndexOf('=') + 1); text4 = text4.Trim(trimChars); switch (text2) { case "vl_svr_enforceConfigClass": text4 = ((text4.ToLower().ToString() == "true") ? "1" : "0"); break; case "vl_svr_aoeRequiresLoS": text4 = ((text4.ToLower().ToString() == "true") ? "1" : "0"); break; case "vl_svr_allowAltarClassChange": text4 = ((text4.ToLower().ToString() == "true") ? "1" : "0"); break; } float num2 = 1f; try { num2 = float.Parse(text4); } catch { text4 = text4.Replace(",", "."); } try { num2 = float.Parse(text4); } catch { text4 = text4.Replace(".", ","); } try { num2 = float.Parse(text4); } catch { ZLog.Log((object)"Valheim Legends: unable to sync modifiers - setting to default"); num2 = 1f; } VL_GlobalConfigs.ConfigStrings[text2] = num2; } else if (VL_GlobalConfigs.ItemStrings.ContainsKey(text2)) { string text5 = text.Substring(text.IndexOf('=') + 1); text5 = text5.Trim(trimChars); if (text5 != "") { VL_GlobalConfigs.ItemStrings[text2] = text5; } } } if (flag) { ZLog.LogWarning((object)"Valheim Legends version mismatch; disabling."); ValheimLegends.playerEnabled = false; } else { ZLog.Log((object)"Valheim Legends configurations synced to server."); } } } } public static class VL_Console { public static bool CheatRaiseSkill(Skills skill_instance, string name, float value, Player player) { //IL_0049: 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_00cf: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) foreach (SkillDef legendsSkill in ValheimLegends.legendsSkills) { if (((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString() == "781" && name.ToLower() == "discipline") { ((Character)player).RaiseSkill(legendsSkill.m_skill, value); return true; } if (((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString() == "791" && name.ToLower() == "abjuration") { ((Character)player).RaiseSkill(legendsSkill.m_skill, value); return true; } if (((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString() == "792" && name.ToLower() == "alteration") { ((Character)player).RaiseSkill(legendsSkill.m_skill, value); return true; } if (((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString() == "793" && name.ToLower() == "conjuration") { ((Character)player).RaiseSkill(legendsSkill.m_skill, value); return true; } if (((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString() == "794" && name.ToLower() == "evocation") { ((Character)player).RaiseSkill(legendsSkill.m_skill, value); return true; } if (((object)Unsafe.As(ref legendsSkill.m_skill)/*cast due to .constrained prefix*/).ToString() == "795" && name.ToLower() == "illusion") { ((Character)player).RaiseSkill(legendsSkill.m_skill, value); return true; } } return false; } public static void CheatChangeClass(string className) { bool flag = false; if (className.ToLower() == "berserker") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Berserker; flag = true; } else if (className.ToLower() == "druid") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Druid; flag = true; } else if (className.ToLower() == "mage") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Mage; flag = true; } else if (className.ToLower() == "priest") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Priest; flag = true; } else if (className.ToLower() == "monk") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Monk; flag = true; } else if (className.ToLower() == "duelist") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Duelist; flag = true; } else if (className.ToLower() == "enchanter") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Enchanter; flag = true; } else if (className.ToLower() == "rogue") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Rogue; flag = true; } else if (className.ToLower() == "ranger") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Ranger; flag = true; } else if (className.ToLower() == "shaman") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Shaman; flag = true; } else if (className.ToLower() == "valkyrie") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Valkyrie; flag = true; } else if (className.ToLower() == "metavoker") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.Metavoker; flag = true; } else if (className.ToLower() == "none") { ValheimLegends.vl_player.vl_class = ValheimLegends.PlayerClass.None; flag = true; } if (!flag) { return; } Console.instance.Print("Class changed to " + className); ValheimLegends.UpdateVLPlayer(Player.m_localPlayer); ValheimLegends.NameCooldowns(); if (ValheimLegends.abilitiesStatus == null) { return; } foreach (RectTransform item in ValheimLegends.abilitiesStatus) { if ((Object)(object)((Component)item).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)item).gameObject); } } ValheimLegends.abilitiesStatus.Clear(); } } public class VL_GlobalConfigs { public static Dictionary ConfigStrings; public static Dictionary ItemStrings; public static float g_CooldownModifer { get { try { return ConfigStrings["vl_svr_cooldownMultiplier"] / 100f; } catch { return 1f; } } } public static float g_DamageModifer { get { try { return ConfigStrings["vl_svr_abilityDamageMultiplier"] / 100f; } catch { return 1f; } } } public static float g_EnergyCostModifer { get { try { return ConfigStrings["vl_svr_energyCostMultiplier"] / 100f; } catch { return 1f; } } } public static float g_SkillGainModifer { get { try { return ConfigStrings["vl_svr_skillGainMultiplier"] / 100f; } catch { return 1f; } } } public static float g_UnarmedDamage { get { try { return ConfigStrings["vl_svr_unarmedDamageMultiplier"] / 100f; } catch { return 1f; } } } public static float c_berserkerDash { get { try { return ConfigStrings["vl_svr_berserkerDash.Value"] / 100f; } catch { return 1f; } } } public static float c_berserkerBerserk { get { try { return ConfigStrings["vl_svr_berserkerBerserk"] / 100f; } catch { return 1f; } } } public static float c_berserkerExecute { get { try { return ConfigStrings["vl_svr_berserkerExecute"] / 100f; } catch { return 1f; } } } public static float c_berserkerBonusDamage { get { try { return ConfigStrings["vl_svr_berserkerBonusDamage"] / 100f; } catch { return 1f; } } } public static float c_berserkerBonus2h { get { try { return ConfigStrings["vl_svr_berserkerBonus2h"] / 100f; } catch { return 1f; } } } public static string c_berserkerItem { get { try { return ItemStrings["vl_svr_berserkerItem"]; } catch { return "item_bonefragments"; } } } public static float c_druidVines { get { try { return ConfigStrings["vl_svr_druidVines"] / 100f; } catch { return 1f; } } } public static float c_druidRegen { get { try { return ConfigStrings["vl_svr_druidRegen"] / 100f; } catch { return 1f; } } } public static float c_druidDefenders { get { try { return ConfigStrings["vl_svr_druidDefenders"] / 100f; } catch { return 1f; } } } public static float c_druidBonusSeeds { get { try { return ConfigStrings["vl_svr_druidBonusSeeds"] / 100f; } catch { return 1f; } } } public static string c_druidItem { get { try { return ItemStrings["vl_svr_druidItem"]; } catch { return "item_dandelion"; } } } public static float c_duelistSeismicSlash { get { try { return ConfigStrings["vl_svr_duelistSeismicSlash"] / 100f; } catch { return 1f; } } } public static float c_duelistRiposte { get { try { return ConfigStrings["vl_svr_duelistRiposte"] / 100f; } catch { return 1f; } } } public static float c_duelistHipShot { get { try { return ConfigStrings["vl_svr_duelistHipShot"] / 100f; } catch { return 1f; } } } public static float c_duelistBonusParry { get { try { return ConfigStrings["vl_svr_duelistBonusParry"] / 100f; } catch { return 1f; } } } public static string c_duelistItem { get { try { return ItemStrings["vl_svr_duelistItem"]; } catch { return "item_thistle"; } } } public static float c_enchanterWeaken { get { try { return ConfigStrings["vl_svr_enchanterWeaken"] / 100f; } catch { return 1f; } } } public static float c_enchanterCharm { get { try { return ConfigStrings["vl_svr_enchanterCharm"] / 100f; } catch { return 1f; } } } public static float c_enchanterBiome { get { try { return ConfigStrings["vl_svr_enchanterBiome"] / 100f; } catch { return 1f; } } } public static float c_enchanterBiomeShock { get { try { return ConfigStrings["vl_svr_enchanterBiomeShock"] / 100f; } catch { return 1f; } } } public static float c_enchanterBonusElementalBlock { get { try { return ConfigStrings["vl_svr_enchanterBonusElementalBlock"] / 100f; } catch { return 1f; } } } public static float c_enchanterBonusElementalTouch { get { try { return ConfigStrings["vl_svr_enchanterbonusElementalTouch"] / 100f; } catch { return 1f; } } } public static string c_enchanterItem { get { try { return ItemStrings["vl_svr_enchanterItem"]; } catch { return "item_resin"; } } } public static float c_mageFireball { get { try { return ConfigStrings["vl_svr_mageFireball"] / 100f; } catch { return 1f; } } } public static float c_mageFrostDagger { get { try { return ConfigStrings["vl_svr_mageFrostDagger"] / 100f; } catch { return 1f; } } } public static float c_mageFrostNova { get { try { return ConfigStrings["vl_svr_mageFrostNova"] / 100f; } catch { return 1f; } } } public static float c_mageInferno { get { try { return ConfigStrings["vl_svr_mageInferno"] / 100f; } catch { return 1f; } } } public static float c_mageMeteor { get { try { return ConfigStrings["vl_svr_mageMeteor"] / 100f; } catch { return 1f; } } } public static string c_mageItem { get { try { return ItemStrings["vl_svr_mageItem"]; } catch { return "item_coal"; } } } public static float c_meteavokerLight { get { try { return ConfigStrings["vl_svr_metavokerLight"] / 100f; } catch { return 1f; } } } public static float c_metavokerReplica { get { try { return ConfigStrings["vl_svr_metavokerReplica"] / 100f; } catch { return 1f; } } } public static float c_metavokerWarpDamage { get { try { return ConfigStrings["vl_svr_metavokerWarpDamage"] / 100f; } catch { return 1f; } } } public static float c_metavokerWarpDistance { get { try { return ConfigStrings["vl_svr_metavokerWarpDistance"] / 100f; } catch { return 1f; } } } public static float c_metavokerBonusSafeFallCost { get { try { return ConfigStrings["vl_svr_metavokerBonusSafeFallCost"] / 100f; } catch { return 1f; } } } public static float c_metavokerBonusForceWave { get { try { return ConfigStrings["vl_svr_metavokerBonusForceWave"] / 100f; } catch { return 1f; } } } public static string c_metavokerItem { get { try { return ItemStrings["vl_svr_metavokerItem"]; } catch { return "item_raspberries"; } } } public static float c_monkChiPunch { get { try { return ConfigStrings["vl_svr_monkChiPunch"] / 100f; } catch { return 1f; } } } public static float c_monkChiSlam { get { try { return ConfigStrings["vl_svr_monkChiSlam"] / 100f; } catch { return 1f; } } } public static float c_monkChiBlast { get { try { return ConfigStrings["vl_svr_monkChiBlast"] / 100f; } catch { return 1f; } } } public static float c_monkFlyingKick { get { try { return ConfigStrings["vl_svr_monkFlyingKick"] / 100f; } catch { return 1f; } } } public static float c_monkBonusBlock { get { try { return ConfigStrings["vl_svr_monkBonusBlock"] / 100f; } catch { return 1f; } } } public static float c_monkSurge { get { try { return ConfigStrings["vl_svr_monkSurge"] / 100f; } catch { return 1f; } } } public static float c_monkChiDuration { get { try { return ConfigStrings["vl_svr_monkChiDuration"] / 100f; } catch { return 1f; } } } public static string c_monkItem { get { try { return ItemStrings["vl_svr_monkItem"]; } catch { return "item_wood"; } } } public static float c_priestHeal { get { try { return ConfigStrings["vl_svr_priestHeal"] / 100f; } catch { return 1f; } } } public static float c_priestPurgeHeal { get { try { return ConfigStrings["vl_svr_priestPurgeHeal"] / 100f; } catch { return 1f; } } } public static float c_priestPurgeDamage { get { try { return ConfigStrings["vl_svr_priestPurgeDamage"] / 100f; } catch { return 1f; } } } public static float c_priestSanctify { get { try { return ConfigStrings["vl_svr_priestSanctify"] / 100f; } catch { return 1f; } } } public static float c_priestBonusDyingLightCooldown { get { try { return ConfigStrings["vl_svr_priestBonusDyingLightCooldown"] / 100f; } catch { return 1f; } } } public static string c_priestItem { get { try { return ItemStrings["vl_svr_priestItem"]; } catch { return "item_stone"; } } } public static float c_rangerPowerShot { get { try { return ConfigStrings["vl_svr_rangerPowerShot"] / 100f; } catch { return 1f; } } } public static float c_rangerShadowWolf { get { try { return ConfigStrings["vl_svr_rangerShadowWolf"] / 100f; } catch { return 1f; } } } public static float c_rangerShadowStalk { get { try { return ConfigStrings["vl_svr_rangerShadowStalk"] / 100f; } catch { return 1f; } } } public static float c_rangerBonusPoisonResistance { get { try { return ConfigStrings["vl_svr_rangerBonusPoisonResistance"] / 100f; } catch { return 1f; } } } public static float c_rangerBonusRunCost { get { try { return ConfigStrings["vl_svr_rangerBonusRunCost"] / 100f; } catch { return 1f; } } } public static string c_rangerItem { get { try { return ItemStrings["vl_svr_rangerItem"]; } catch { return "item_boar_meat"; } } } public static float c_rogueBackstab { get { try { return ConfigStrings["vl_svr_rogueBackstab"] / 100f; } catch { return 1f; } } } public static float c_rogueFadeCooldown { get { try { return ConfigStrings["vl_svr_rogueFadeCooldown"] / 100f; } catch { return 1f; } } } public static float c_roguePoisonBomb { get { try { return ConfigStrings["vl_svr_roguePoisonBomb"] / 100f; } catch { return 1f; } } } public static float c_rogueBonusThrowingDagger { get { try { return ConfigStrings["vl_svr_rogueBonusThrowingDagger"] / 100f; } catch { return 1f; } } } public static float c_rogueTrickCharge { get { try { return ConfigStrings["vl_svr_rogueTrickCharge"] / 100f; } catch { return 1f; } } } public static string c_rogueItem { get { try { return ItemStrings["vl_svr_rogueItem"]; } catch { return "item_honey"; } } } public static float c_shamanSpiritShock { get { try { return ConfigStrings["vl_svr_shamanSpiritShock"] / 100f; } catch { return 1f; } } } public static float c_shamanEnrage { get { try { return ConfigStrings["vl_svr_shamanEnrage"] / 100f; } catch { return 1f; } } } public static float c_shamanShell { get { try { return ConfigStrings["vl_svr_shamanShell"] / 100f; } catch { return 1f; } } } public static float c_shamanBonusSpiritGuide { get { try { return ConfigStrings["vl_svr_shamanBonusSpiritGuide"] / 100f; } catch { return 1f; } } } public static float c_shamanBonusWaterGlideCost { get { try { return ConfigStrings["vl_svr_shamanBonusWaterGlideCost"] / 100f; } catch { return 1f; } } } public static string c_shamanItem { get { try { return ItemStrings["vl_svr_shamanItem"]; } catch { return "item_greydwarfeye"; } } } public static float c_valkyrieLeap { get { try { return ConfigStrings["vl_svr_valkyrieLeap"] / 100f; } catch { return 1f; } } } public static float c_valkyrieStaggerCooldown { get { try { return ConfigStrings["vl_svr_valkyrieStaggerCooldown"] / 100f; } catch { return 1f; } } } public static float c_valkyrieBulwark { get { try { return ConfigStrings["vl_svr_valkyrieBulwark"] / 100f; } catch { return 1f; } } } public static float c_valkyrieBonusChillWave { get { try { return ConfigStrings["vl_svr_valkyrieBonusChillWave"] / 100f; } catch { return 1f; } } } public static float c_valkyrieBonusIceLance { get { try { return ConfigStrings["vl_svr_valkyrieBonusIceLance"] / 100f; } catch { return 1f; } } } public static float c_valkyrieChargeDuration { get { try { return ConfigStrings["vl_svr_valkyrieChargeDuration"] / 100f; } catch { return 1f; } } } public static string c_valkyrieItem { get { try { return ItemStrings["vl_svr_valkyrieItem"]; } catch { return "item_flint"; } } } } public class VL_SkillData { public int level; public float accumulator; public int max_level = 100; } public static class VL_Utility { public static string ModID; public static string Folder; private static int m_interactMask = LayerMask.GetMask(new string[10] { "item", "piece", "piece_nonsolid", "Default", "static_solid", "Default_small", "character", "character_net", "terrain", "vehicle" }); private static int m_LOSMask = LayerMask.GetMask(new string[7] { "piece", "piece_nonsolid", "Default", "static_solid", "Default_small", "terrain", "vehicle" }); private static float vl_timer; private static readonly MethodInfo m_monsterSetTarget = AccessTools.Method(typeof(MonsterAI), "SetTarget", new Type[1] { typeof(Character) }, (Type[])null); private const float CompanionTargetRange = 30f; private const float CompanionRetreatHealth = 0.15f; public static float GetZoneChargeCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetZoneChargeCooldownTime => 180f * VL_GlobalConfigs.g_CooldownModifer; public static float GetZoneChargeCostPerUpdate => 1f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetZoneChargeSkillGain => 2f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetWeakenCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetWeakenCooldownTime => 30f * VL_GlobalConfigs.g_CooldownModifer; public static float GetWeakenSkillGain => 0.5f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetCharmCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetCharmCooldownTime => 60f * VL_GlobalConfigs.g_CooldownModifer; public static float GetCharmSkillGain => 0.85f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetMeteorPunchCost => 3f; public static float GetMeteorPunchCooldownTime => 1f * VL_GlobalConfigs.g_CooldownModifer; public static float GetMeteorPunchSkillGain => 0.15f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetPsiBoltCost => 5f; public static float GetPsiBoltCooldownTime => 1f * VL_GlobalConfigs.g_CooldownModifer; public static float GetPsiBoltSkillGain => 0.05f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetFlyingKickCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetFlyingKickCooldownTime => 6f * VL_GlobalConfigs.g_CooldownModifer; public static float GetFlyingKickSkillGain => 0.3f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetPoisonBombCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetPoisonBombCooldownTime => 30f * VL_GlobalConfigs.g_CooldownModifer; public static float GetPoisonBombSkillGain => 0.6f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetBackstabCost => 60f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetBackstabCooldownTime => 20f * VL_GlobalConfigs.g_CooldownModifer; public static float GetBackstabSkillGain => 0.55f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetFadeCost => 10f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetFadeCooldownTime => 15f * VL_GlobalConfigs.g_CooldownModifer; public static float GetFadeSkillGain => 0.2f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetSanctifyCost => 70f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetSanctifyCooldownTime => 45f * VL_GlobalConfigs.g_CooldownModifer; public static float GetSanctifySkillGain => 0.8f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetHealCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetHealCostPerUpdate => 0.75f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetHealCooldownTime => 30f * VL_GlobalConfigs.g_CooldownModifer; public static float GetHealSkillGain => 0.4f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetPurgeCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetPurgeCooldownTime => 15f * VL_GlobalConfigs.g_CooldownModifer; public static float GetPurgeSkillGain => 0.4f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetQuickShotCost => 25f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetQuickShotCooldownTime => 10f * VL_GlobalConfigs.g_CooldownModifer; public static float GetQuickShotSkillGain => 0.25f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetRiposteCost => 30f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetRiposteCooldownTime => 6f * VL_GlobalConfigs.g_CooldownModifer; public static float GetRiposteSkillGain => 0.15f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetBlinkStrikeCost => 60f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetBlinkStrikeCooldownTime => 30f * VL_GlobalConfigs.g_CooldownModifer; public static float GetBlinkStrikeSkillGain => 0.6f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetLightCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetLightCooldownTime => 20f * VL_GlobalConfigs.g_CooldownModifer; public static float GetLightSkillGain => 0.75f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetWarpCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetWarpCostPerUpdate => 1f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetWarpCooldownTime => 6f * VL_GlobalConfigs.g_CooldownModifer; public static float GetWarpSkillGain => 0.5f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetReplicaCost => 70f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetReplicaCooldownTime => 30f * VL_GlobalConfigs.g_CooldownModifer; public static float GetReplicaSkillGain => 0.75f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetForceWaveCost => 30f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetForceWaveSkillGain => 0.4f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetForceWaveCooldown => 20f * VL_GlobalConfigs.g_CooldownModifer; public static float GetFireballCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetFireballCooldownTime => 12f * VL_GlobalConfigs.g_CooldownModifer; public static float GetFireballSkillGain => 0.9f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetMeteorCost => 60f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetMeteorCostPerUpdate => 0.5f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetMeteorCooldownTime => 180f * VL_GlobalConfigs.g_CooldownModifer; public static float GetMeteorSkillGain => 1.6f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetFrostNovaCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetFrostNovaCooldownTime => 20f * VL_GlobalConfigs.g_CooldownModifer; public static float GetFrostNovaSkillGain => 0.75f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetBulwarkCost => 60f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetBulwarkCooldownTime => 60f * VL_GlobalConfigs.g_CooldownModifer; public static float GetBulwarkSkillGain => 1.2f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetLeapCost => 50f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetLeapCooldownTime => 15f * VL_GlobalConfigs.g_CooldownModifer; public static float GetLeapSkillGain => 0.4f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetStaggerCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetStaggerCooldownTime => 20f * VL_GlobalConfigs.g_CooldownModifer; public static float GetStaggerSkillGain => 0.6f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetHarpoonPullCost => 1f; public static float GetHarpoonPullSkillGain => 0.25f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetHarpoonPullCooldown => 10f * VL_GlobalConfigs.g_CooldownModifer; public static float GetShieldReleaseSkillGain => 0.25f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetVineHookCost => 40f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetRegenerationCost => 60f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetRegenerationCooldownTime => 60f * VL_GlobalConfigs.g_CooldownModifer; public static float GetRegenerationSkillGain => 1f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetRootCost => 30f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetRootCostPerUpdate => 0.3f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetRootCooldownTime => 20f * VL_GlobalConfigs.g_CooldownModifer; public static float GetRootSkillGain => 0.15f * VL_GlobalConfigs.g_SkillGainModifer; public static float GetDefenderCost => 80f * VL_GlobalConfigs.g_EnergyCostModifer; public static float GetDefenderCooldownTime => 120f * VL_GlobalConfigs.g_CooldownModifer; public static float GetDefenderSkillGain => 1.9f * VL_GlobalConfigs.g_SkillGainModifer; public static bool ReadyTime => Time.time > 0.01f + vl_timer; public static bool Ability1_Input_Down { get { if (ValheimLegends.Ability1_Hotkey.Value == "") { return false; } if (ValheimLegends.Ability1_Hotkey_Combo.Value == "") { return GetHotkeyDown(ValheimLegends.Ability1_Hotkey.Value); } if (HotkeyComboDown(ValheimLegends.Ability1_Hotkey.Value, ValheimLegends.Ability1_Hotkey_Combo.Value)) { return true; } return false; } } public static bool Ability2_Input_Down { get { if (ValheimLegends.Ability2_Hotkey.Value == "") { return false; } if (ValheimLegends.Ability2_Hotkey_Combo.Value == "") { return GetHotkeyDown(ValheimLegends.Ability2_Hotkey.Value); } if (HotkeyComboDown(ValheimLegends.Ability2_Hotkey.Value, ValheimLegends.Ability2_Hotkey_Combo.Value)) { return true; } return false; } } public static bool Ability3_Input_Down { get { if (ValheimLegends.Ability3_Hotkey.Value == "") { return false; } if (ValheimLegends.Ability3_Hotkey_Combo.Value == "") { return GetHotkeyDown(ValheimLegends.Ability3_Hotkey.Value); } if (HotkeyComboDown(ValheimLegends.Ability3_Hotkey.Value, ValheimLegends.Ability3_Hotkey_Combo.Value)) { return true; } return false; } } public static bool Ability3_Input_Pressed { get { if (ValheimLegends.Ability3_Hotkey.Value == "") { return false; } if (ValheimLegends.Ability3_Hotkey_Combo.Value == "") { return GetHotkeyHeld(ValheimLegends.Ability3_Hotkey.Value); } if (HotkeyComboHeld(ValheimLegends.Ability3_Hotkey.Value, ValheimLegends.Ability3_Hotkey_Combo.Value)) { return true; } return false; } } public static bool Ability3_Input_Up { get { if (ValheimLegends.Ability3_Hotkey.Value == "") { return false; } if (ValheimLegends.Ability3_Hotkey_Combo.Value == "") { return GetHotkeyUp(ValheimLegends.Ability3_Hotkey.Value); } if (HotkeyComboUp(ValheimLegends.Ability3_Hotkey.Value, ValheimLegends.Ability3_Hotkey_Combo.Value)) { return true; } return false; } } public static string GetModDataPath(this PlayerProfile profile) { return Path.Combine(Utils.GetSaveDataPath((FileSource)1), "ModData", ModID, "char_" + profile.GetFilename()); } public static TData LoadModData(this PlayerProfile profile) where TData : new() { if (!File.Exists(profile.GetModDataPath())) { return new TData(); } return JsonUtility.FromJson(File.ReadAllText(profile.GetModDataPath())); } public static void SaveModData(this PlayerProfile profile, TData data) { Directory.CreateDirectory(Path.GetDirectoryName(profile.GetModDataPath())); File.WriteAllText(profile.GetModDataPath(), JsonUtility.ToJson((object)data)); } public static Texture2D LoadTextureFromAssets(string path) { //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_0024: Expected O, but got Unknown //IL_0026: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004a: Expected O, but got Unknown try { byte[] array = File.ReadAllBytes(Path.Combine(Folder, "VLAssets", path)); Texture2D val = new Texture2D(1, 1); ImageConversion.LoadImage(val, array); return val; } catch { byte[] array2 = File.ReadAllBytes(Path.Combine(Folder, path)); Texture2D val2 = new Texture2D(1, 1); ImageConversion.LoadImage(val2, array2); return val2; } } public static bool TakeInput(Player p) { bool result = (!Object.op_Implicit((Object)(object)Chat.instance) || !Chat.instance.HasFocus()) && !Console.IsVisible() && !TextInput.IsVisible() && !StoreGui.IsVisible() && !InventoryGui.IsVisible() && !Menu.IsVisible() && (!Object.op_Implicit((Object)(object)TextViewer.instance) || !TextViewer.instance.IsVisible()) && !Minimap.IsOpen() && !GameCamera.InFreeFly(); if (((Character)p).IsDead() || ((Character)p).InCutscene() || ((Character)p).IsTeleporting()) { result = false; } return result; } public static void InitiateAbilityStatus(Hud hud) { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) if (ValheimLegends.ClassIsValid) { float num = (float)Screen.width / 1920f; float num2 = (float)Screen.height / 1080f; float num3 = 80f * num; float num4 = 0f; float num5 = 88f * num2 + ValheimLegends.icon_Y_Offset.Value; float num6 = 209f * num + ValheimLegends.icon_X_Offset.Value; if (ValheimLegends.iconAlignment.Value.ToLower() == "vertical") { num3 = 0f; num4 = 72f * num2; } ValheimLegends.abilitiesStatus = new List(); ValheimLegends.abilitiesStatus.Clear(); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num6 + num3, num5 + num4, 0f); Quaternion val2 = default(Quaternion); ((Quaternion)(ref val2))..ctor(0f, 0f, 0f, 1f); Transform statusEffectListRoot = (Transform)(object)hud.m_statusEffectListRoot; RectTransform val3 = Object.Instantiate(hud.m_statusEffectTemplate, val, val2, statusEffectListRoot); ((Component)val3).gameObject.SetActive(true); ((Component)val3).GetComponentInChildren().text = Localization.instance.Localize(ValheimLegends.Ability1_Name.ToString()); ValheimLegends.abilitiesStatus.Add(val3); val.x += num3; val.y += num4; RectTransform val4 = Object.Instantiate(hud.m_statusEffectTemplate, val, val2, statusEffectListRoot); ((Component)val4).gameObject.SetActive(true); ((Component)val4).GetComponentInChildren().text = Localization.instance.Localize(ValheimLegends.Ability2_Name.ToString()); ValheimLegends.abilitiesStatus.Add(val4); val.x += num3; val.y += num4; RectTransform val5 = Object.Instantiate(hud.m_statusEffectTemplate, val, val2, statusEffectListRoot); ((Component)val5).gameObject.SetActive(true); ((Component)val5).GetComponentInChildren().text = Localization.instance.Localize(ValheimLegends.Ability3_Name.ToString()); ValheimLegends.abilitiesStatus.Add(val5); } } public static void RotatePlayerToTarget(Player p) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Vector3 lookDir = ((Character)p).GetLookDir(); lookDir.y = 0f; ((Component)p).transform.rotation = Quaternion.LookRotation(lookDir); } public static bool LOS_IsValid(Character hit_char, Vector3 splash_center, Vector3 splash_alternate = default(Vector3)) { //IL_001a: 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_0023: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) bool flag = false; if (VL_GlobalConfigs.ConfigStrings["vl_svr_aoeRequiresLoS"] == 0f) { return true; } if (splash_alternate == default(Vector3)) { splash_alternate = splash_center + new Vector3(0f, 0.2f, 0f); } if ((Object)(object)hit_char != (Object)null) { RaycastHit hit = default(RaycastHit); Vector3 val = hit_char.GetCenterPoint() - splash_center; Bounds bounds; if (Physics.Raycast(splash_center, val, ref hit)) { if (CollidedWithTarget(hit_char, (Collider)(object)hit_char.GetCollider(), hit)) { flag = true; } else { for (int i = 0; i < 8; i++) { bounds = ((Collider)hit_char.GetCollider()).bounds; Vector3 size = ((Bounds)(ref bounds)).size; Vector3 val2 = hit_char.GetCenterPoint() + new Vector3(size.x * ((float)Random.Range(-i, i) / 6f), size.y * ((float)Random.Range(-i, i) / 4f), size.z * ((float)Random.Range(-i, i) / 6f)) - splash_center; if (Physics.Raycast(splash_center, val2, ref hit) && CollidedWithTarget(hit_char, (Collider)(object)hit_char.GetCollider(), hit)) { flag = true; break; } } } } if (!flag && splash_alternate != default(Vector3) && splash_alternate != splash_center) { Vector3 val3 = hit_char.GetCenterPoint() - splash_alternate; if (Physics.Raycast(splash_alternate, val3, ref hit)) { if (CollidedWithTarget(hit_char, (Collider)(object)hit_char.GetCollider(), hit)) { flag = true; } else { for (int j = 0; j < 8; j++) { bounds = ((Collider)hit_char.GetCollider()).bounds; Vector3 size2 = ((Bounds)(ref bounds)).size; Vector3 val4 = hit_char.GetCenterPoint() + new Vector3(size2.x * ((float)Random.Range(-j, j) / 6f), size2.y * ((float)Random.Range(-j, j) / 4f), size2.z * ((float)Random.Range(-j, j) / 6f)) - splash_alternate; if (Physics.Raycast(splash_alternate, val4, ref hit) && CollidedWithTarget(hit_char, (Collider)(object)hit_char.GetCollider(), hit)) { flag = true; break; } } } } } } return flag; } private static bool CollidedWithTarget(Character chr, Collider col, RaycastHit hit) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown if ((Object)(object)((RaycastHit)(ref hit)).collider == (Object)(object)chr.GetCollider()) { return true; } Character val = null; ((Component)((RaycastHit)(ref hit)).collider).gameObject.TryGetComponent(ref val); bool flag = (Object)(object)val != (Object)null; List list = new List(); list.Clear(); ((Component)((RaycastHit)(ref hit)).collider).gameObject.GetComponents(list); if ((Object)(object)val == (Object)null) { val = (Character)((Component)((RaycastHit)(ref hit)).collider).GetComponentInParent(typeof(Character)); flag = (Object)(object)val != (Object)null; if ((Object)(object)val == (Object)null) { val = ((Component)((RaycastHit)(ref hit)).collider).GetComponentInChildren(); flag = (Object)(object)val != (Object)null; } } if (flag && (Object)(object)val == (Object)(object)chr) { return true; } return false; } public static void FindCrosshairObject(Player p, Vector3 originEyePoint, float maxDistance, out GameObject hover, out Character hoverCreature) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) hover = null; hoverCreature = null; RaycastHit[] array = Physics.RaycastAll(((Component)GameCamera.instance).transform.position, ((Component)GameCamera.instance).transform.forward, 50f, m_interactMask); Array.Sort(array, (RaycastHit x, RaycastHit y) => ((RaycastHit)(ref x)).distance.CompareTo(((RaycastHit)(ref y)).distance)); RaycastHit[] array2 = array; int num = 0; RaycastHit val; while (true) { if (num >= array2.Length) { return; } val = array2[num]; if (!Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider.attachedRigidbody) || !((Object)(object)((Component)((RaycastHit)(ref val)).collider.attachedRigidbody).gameObject == (Object)(object)((Component)p).gameObject)) { break; } num++; } if ((Object)(object)hoverCreature == (Object)null) { Character val2 = (Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider.attachedRigidbody) ? ((Component)((RaycastHit)(ref val)).collider.attachedRigidbody).GetComponent() : ((Component)((RaycastHit)(ref val)).collider).GetComponent()); if ((Object)(object)val2 != (Object)null) { hoverCreature = val2; } } if (Vector3.Distance(originEyePoint, ((RaycastHit)(ref val)).point) < maxDistance) { if (((Component)((RaycastHit)(ref val)).collider).GetComponent() != null) { hover = ((Component)((RaycastHit)(ref val)).collider).gameObject; } else if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider.attachedRigidbody)) { hover = ((Component)((RaycastHit)(ref val)).collider.attachedRigidbody).gameObject; } else { hover = ((Component)((RaycastHit)(ref val)).collider).gameObject; } } } public static float GetEnrageCost(Player p) { return 60f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetEnrageCooldown(Player p) { return 60f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetEnrageSkillGain(Player p) { return 1.2f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetSpiritBombCost(Player p) { return 80f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetSpiritBombCooldown(Player p) { return 30f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetSpiritBombSkillGain(Player p) { return 0.9f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetShellCost(Player p) { return 80f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetShellCooldown(Player p) { return 120f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetShellSkillGain(Player p) { return 1.6f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetDashCost(Player p) { return 70f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetDashCooldown(Player p) { return 10f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetDashSkillGain(Player p) { return 0.45f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetBerserkCost(Player p) { return 0f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetBerserkCooldown(Player p) { return 60f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetBerserkSkillGain(Player p) { return 1.2f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetExecuteCost(Player p) { return 60f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetExecuteCooldown(Player p) { return 60f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetExecuteSkillGain(Player p) { return 1.2f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetPowerShotCost(Player p) { return 60f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetPowerShotCooldown(Player p) { return 60f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetPowerShotSkillGain(Player p) { return 0.9f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetShadowStalkCost(Player p) { return 40f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetShadowStalkCooldown(Player p) { return 45f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetShadowStalkSkillGain(Player p) { return 1.4f * VL_GlobalConfigs.g_SkillGainModifer; } public static float GetSummonWolfCost(Player p) { return 75f * VL_GlobalConfigs.g_EnergyCostModifer; } public static float GetSummonWolfCooldown(Player p) { return 600f * VL_GlobalConfigs.g_CooldownModifer; } public static float GetSummonWolfSkillGain(Player p) { return 3.5f * VL_GlobalConfigs.g_SkillGainModifer; } public static void SetTimer() { vl_timer = Time.time; } private static bool IsMouseHotkey(string hotkey) { return hotkey.StartsWith("mouse ", StringComparison.OrdinalIgnoreCase); } private static bool IsLayoutCharHotkey(string hotkey) { return hotkey.Length == 1; } private static bool InputStringContainsChar(char expected) { if (string.IsNullOrEmpty(Input.inputString)) { return false; } char c = char.ToLowerInvariant(expected); string inputString = Input.inputString; for (int i = 0; i < inputString.Length; i++) { if (char.ToLowerInvariant(inputString[i]) == c) { return true; } } return false; } public static bool GetHotkeyDown(string hotkey) { if (string.IsNullOrWhiteSpace(hotkey)) { return false; } hotkey = hotkey.Trim(); if (IsMouseHotkey(hotkey)) { return Input.GetButtonDown(hotkey.ToLower()); } if (IsLayoutCharHotkey(hotkey)) { return InputStringContainsChar(hotkey[0]); } if (!Input.GetKeyDown(hotkey.ToLower())) { return Input.GetButtonDown(hotkey.ToLower()); } return true; } public static bool GetHotkeyHeld(string hotkey) { if (string.IsNullOrWhiteSpace(hotkey)) { return false; } hotkey = hotkey.Trim(); if (IsMouseHotkey(hotkey)) { return Input.GetButton(hotkey.ToLower()); } if (IsLayoutCharHotkey(hotkey)) { if (!InputStringContainsChar(hotkey[0])) { return Input.GetKey(hotkey.ToLower()); } return true; } if (!Input.GetKey(hotkey.ToLower())) { return Input.GetButton(hotkey.ToLower()); } return true; } public static bool GetHotkeyUp(string hotkey) { if (string.IsNullOrWhiteSpace(hotkey)) { return false; } hotkey = hotkey.Trim(); if (IsMouseHotkey(hotkey)) { return Input.GetButtonUp(hotkey.ToLower()); } if (IsLayoutCharHotkey(hotkey)) { return Input.GetKeyUp(hotkey.ToLower()); } if (!Input.GetKeyUp(hotkey.ToLower())) { return Input.GetButtonUp(hotkey.ToLower()); } return true; } private static bool HotkeyComboDown(string hotkey, string combo) { if (!GetHotkeyDown(hotkey) || !GetHotkeyHeld(combo)) { if (GetHotkeyHeld(hotkey)) { return GetHotkeyDown(combo); } return false; } return true; } private static bool HotkeyComboHeld(string hotkey, string combo) { if (GetHotkeyHeld(hotkey)) { return GetHotkeyHeld(combo); } return false; } private static bool HotkeyComboUp(string hotkey, string combo) { if (!GetHotkeyUp(hotkey)) { return GetHotkeyUp(combo); } return true; } public static bool CompanionShouldHoldGround(Character companion) { if ((Object)(object)companion != (Object)null) { return companion.GetHealthPercentage() > 0.15f; } return false; } public static bool IsCompanionAttackTarget(Character companion, Character target, Player summoner) { if ((Object)(object)companion == (Object)null || (Object)(object)target == (Object)null || (Object)(object)target == (Object)(object)companion) { return false; } if (target.IsDead() || target.IsPlayer()) { return false; } if (BaseAI.IsEnemy(target, companion)) { return true; } return IsExtraCompanionTarget(target, summoner); } public static bool IsExtraCompanionTarget(Character target, Player summoner) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Invalid comparison between Unknown and I4 if ((Object)(object)target == (Object)null) { return false; } if ((int)target.m_faction == 12) { return true; } if ((Object)(object)summoner != (Object)null && BaseAI.IsEnemy(target, (Character)(object)summoner)) { return true; } return false; } public static void SetMonsterTarget(MonsterAI ai, Character target) { if (!((Object)(object)ai == (Object)null) && !((Object)(object)target == (Object)null) && !(m_monsterSetTarget == null)) { m_monsterSetTarget.Invoke(ai, new object[1] { target }); } } public static void NotifyCompanionSummonerAttack(Player summoner, Character victim) { if ((Object)(object)summoner == (Object)null || (Object)(object)victim == (Object)null) { return; } foreach (Character allCharacter in Character.GetAllCharacters()) { if (!((Object)(object)allCharacter == (Object)null) && allCharacter.GetSEMan() != null && allCharacter.GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion"))) { SE_Companion sE_Companion = allCharacter.GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Companion")) as SE_Companion; if ((Object)(object)sE_Companion != (Object)null && (Object)(object)sE_Companion.summoner == (Object)(object)summoner) { sE_Companion.priorityTarget = victim; UpdateCompanionTarget(sE_Companion); } } } } public static void UpdateCompanionTarget(SE_Companion se) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)se == (Object)null || (Object)(object)((StatusEffect)se).m_character == (Object)null || (Object)(object)se.summoner == (Object)null) { return; } BaseAI baseAI = ((StatusEffect)se).m_character.GetBaseAI(); MonsterAI val = (MonsterAI)(object)((baseAI is MonsterAI) ? baseAI : null); if ((Object)(object)val == (Object)null) { return; } Vector3 position = ((Component)se.summoner).transform.position; Character val2 = null; if ((Object)(object)se.priorityTarget != (Object)null && !se.priorityTarget.IsDead()) { if (Vector3.Distance(((Component)se.priorityTarget).transform.position, position) <= 30f && IsCompanionAttackTarget(((StatusEffect)se).m_character, se.priorityTarget, se.summoner)) { val2 = se.priorityTarget; } else { se.priorityTarget = null; } } if ((Object)(object)val2 == (Object)null) { float num = 30f; foreach (Character allCharacter in Character.GetAllCharacters()) { if (!((Object)(object)allCharacter == (Object)null) && !((Object)(object)allCharacter == (Object)(object)((StatusEffect)se).m_character) && !allCharacter.IsDead() && IsCompanionAttackTarget(((StatusEffect)se).m_character, allCharacter, se.summoner)) { float num2 = Vector3.Distance(((Component)allCharacter).transform.position, position); if (num2 < num) { num = num2; val2 = allCharacter; } } } } if ((Object)(object)val2 != (Object)null) { SetMonsterTarget(val, val2); } } } }