Decompiled source of Valheim Legends v0.5.0
plugins/ValheimLegends.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
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 TMPro; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ValheimLegends")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ValheimLegends")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("f0baf009-4135-4368-9987-850698809493")] [assembly: AssemblyFileVersion("0.4.9.3")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.4.9.3")] [module: UnverifiableCode] namespace ValheimLegends; public class AnimationClipOverrides : List<KeyValuePair<AnimationClip, AnimationClip>> { public AnimationClip this[string name] { get { return Find((KeyValuePair<AnimationClip, AnimationClip> x) => ((Object)x.Key).name == name).Value; } set { int num = FindIndex((KeyValuePair<AnimationClip, AnimationClip> x) => ((Object)x.Key).name == name); if (num != -1) { base[num] = new KeyValuePair<AnimationClip, AnimationClip>(base[num].Key, value); } } } public AnimationClipOverrides(int capacity) : base(capacity) { } } 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 void Execute_Slash(Player player) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0092: 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) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_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_0115: 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_011e: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0173: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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) Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("fx_VL_BlinkStrike"), ((Character)player).GetCenterPoint() + ((Character)player).GetLookDir() * 3f, Quaternion.LookRotation(((Character)player).GetLookDir())); float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; float num = 0.6f + level * 0.006f * VL_GlobalConfigs.g_DamageModifer * VL_GlobalConfigs.c_duelistSeismicSlash; Vector3 val = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 6f; List<Character> list = new List<Character>(); 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)) { Vector3 val2 = ((Component)item).transform.position - ((Component)player).transform.position; HitData val3 = new HitData(); val3.m_damage = ((Humanoid)player).GetCurrentWeapon().GetDamage(); val3.ApplyModifier(Random.Range(0.8f, 1.2f) * num); val3.m_pushForce = 25f + 0.1f * level; val3.m_point = item.GetEyePoint(); val3.m_dir = ((Component)player).transform.position - ((Component)item).transform.position; val3.m_skill = ValheimLegends.DisciplineSkill; item.Damage(val3); } } } public static void Process_Input(Player player) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_021f: 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_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_0283: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_040d: 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_0427: 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_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0441: 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_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: 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_046c: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0496: 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_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0562: 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_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_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: 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) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Expected O, but got Unknown //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_060c: 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_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_0622: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) Random random = new Random(); if (VL_Utility.Ability3_Input_Down) { if (!((Character)player).GetSEMan().HaveStatusEffect("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, false); ((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("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, false); float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; GO_CastFX = Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_perfectblock"), ((Component)player).transform.position, Quaternion.identity); GO_CastFX = Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("fx_backstab"), ((Character)player).GetCenterPoint(), Quaternion.identity); SE_Riposte sE_Riposte = (SE_Riposte)(object)ScriptableObject.CreateInstance(typeof(SE_Riposte)); ((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("SE_VL_Ability1_CD")) { if (player.GetStamina() >= VL_Utility.GetQuickShotCost) { float level2 = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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, false); ((ZSyncAnimation)typeof(Player).GetField("m_zanim", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(player)).SetTrigger("interact"); GO_CastFX = Object.Instantiate<GameObject>(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<GameObject>(ZNetScene.instance.GetPrefab("fx_VL_QuickShot"), val4, Quaternion.LookRotation(((Character)player).GetLookDir())); GameObject prefab = ZNetScene.instance.GetPrefab("Greydwarf_throw_projectile"); GO_QuickShot = Object.Instantiate<GameObject>(prefab, val4, Quaternion.identity); P_QuickShot = GO_QuickShot.GetComponent<Projectile>(); ((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_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) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0082: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00a9: 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) //IL_0122: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_015b: 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_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0282: 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_0291: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_02de: 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_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: 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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_01e1: 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_0210: 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_033d: Unknown result type (might be due to invalid IL or missing references) //IL_033f: 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_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: 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_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: 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_03d7: 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_03f6: Unknown result type (might be due to invalid IL or missing references) if (QueuedAttack == EnchanterAttackType.Charm) { float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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 prefab = ZNetScene.instance.GetPrefab("VL_Charm"); GameObject val2 = Object.Instantiate<GameObject>(prefab, val, Quaternion.identity); Projectile component = val2.GetComponent<Projectile>(); ((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<GameObject>(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<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((Skill x) => x.m_info == ValheimLegends.AlterationSkillDef)).m_level; Vector3 val8 = ((Character)player).GetEyePoint() + ((Character)player).GetLookDir() * 4f; List<Character> list = new List<Character>(); 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_026f: 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_0308: 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_035d: 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_0182: 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_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Invalid comparison between Unknown and I4 //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Invalid comparison between Unknown and I4 //IL_0f18: Unknown result type (might be due to invalid IL or missing references) //IL_0f30: 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_06c2: Invalid comparison between Unknown and I4 //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Invalid comparison between Unknown and I4 //IL_109b: Unknown result type (might be due to invalid IL or missing references) //IL_10ad: Unknown result type (might be due to invalid IL or missing references) //IL_10b9: Unknown result type (might be due to invalid IL or missing references) //IL_10be: Unknown result type (might be due to invalid IL or missing references) //IL_10c1: Unknown result type (might be due to invalid IL or missing references) //IL_10c7: Unknown result type (might be due to invalid IL or missing references) //IL_0955: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Invalid comparison between Unknown and I4 //IL_10f6: Unknown result type (might be due to invalid IL or missing references) //IL_10f9: Unknown result type (might be due to invalid IL or missing references) //IL_1103: Unknown result type (might be due to invalid IL or missing references) //IL_1108: Unknown result type (might be due to invalid IL or missing references) //IL_0a83: Unknown result type (might be due to invalid IL or missing references) //IL_0a8d: Invalid comparison between Unknown and I4 //IL_110d: Unknown result type (might be due to invalid IL or missing references) //IL_111e: Unknown result type (might be due to invalid IL or missing references) //IL_1120: 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_0bb4: Unknown result type (might be due to invalid IL or missing references) //IL_0bbe: Invalid comparison between Unknown and I4 //IL_0e3f: Unknown result type (might be due to invalid IL or missing references) //IL_0ce5: Unknown result type (might be due to invalid IL or missing references) //IL_0cec: Invalid comparison between Unknown and I4 //IL_054a: 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_1146: Unknown result type (might be due to invalid IL or missing references) //IL_1151: Unknown result type (might be due to invalid IL or missing references) //IL_1165: Unknown result type (might be due to invalid IL or missing references) //IL_116a: Unknown result type (might be due to invalid IL or missing references) //IL_116f: 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_068b: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: 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_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Unknown result type (might be due to invalid IL or missing references) //IL_0a4d: Unknown result type (might be due to invalid IL or missing references) //IL_0a52: Unknown result type (might be due to invalid IL or missing references) //IL_122a: Unknown result type (might be due to invalid IL or missing references) //IL_122f: 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_12c5: Unknown result type (might be due to invalid IL or missing references) //IL_0b7e: Unknown result type (might be due to invalid IL or missing references) //IL_0b83: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Unknown result type (might be due to invalid IL or missing references) //IL_0cb4: Unknown result type (might be due to invalid IL or missing references) //IL_0ddd: Unknown result type (might be due to invalid IL or missing references) //IL_0de2: 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("SE_VL_Ability3_CD") && !zonechargeCharging) { if (player.GetStamina() >= VL_Utility.GetZoneChargeCost) { float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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, false); Object.Instantiate<GameObject>(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, false); if (zonechargeChargeAmount >= zonechargeChargeAmountMax) { zonechargeCount += 2f; zonechargeChargeAmount = 0; Object.Instantiate<GameObject>(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<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((Skill x) => x.m_info == ValheimLegends.AbjurationSkillDef)).m_level; Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("fx_VL_ParticleFieldBurst"), ((Component)player).transform.position, Quaternion.identity); List<Character> list = new List<Character>(); 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<GameObject>(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<GameObject>(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<GameObject>(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<GameObject>(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<GameObject>(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<GameObject>(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<GameObject>(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<GameObject>(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("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, false); 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("SE_VL_Ability1_CD")) { if (player.GetStamina() >= VL_Utility.GetWeakenCost) { ValheimLegends.shouldUseGuardianPower = false; float level3 = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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, 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<GameObject>(ZNetScene.instance.GetPrefab("fx_VL_Weaken"), val6, Quaternion.identity); for (int i = 0; i < 4; i++) { Object.Instantiate<GameObject>(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; List<Character> allCharacters = Character.GetAllCharacters(); foreach (Character item9 in allCharacters) { if (!BaseAI.IsEnemy((Character)(object)player, item9)) { continue; } Vector3 val7 = ((Component)item9).transform.position - val6; if (((Vector3)(ref val7)).magnitude <= 5f + 0.01f * level3) { if (item9.IsPlayer()) { item9.GetSEMan().AddStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)sE_Weaken).name), true, 0, 0f); } else { item9.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_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 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<ItemData>(); 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_02a8: 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_02b8: 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_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: 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_02e2: 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_02f1: 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_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_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0355: 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_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0376: 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_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_0396: 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_0047: 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_0067: 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_0081: 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_0095: 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_00a8: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: 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_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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_03df: 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_03e8: Expected O, but got Unknown //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_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: 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_0450: 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_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0484: 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_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: 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_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_0215: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0257: 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) if (!throwDagger) { float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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 prefab = ZNetScene.instance.GetPrefab("VL_PoisonBomb"); GameObject val2 = Object.Instantiate<GameObject>(prefab, val, Quaternion.identity); GameObject prefab2 = ZNetScene.instance.GetPrefab("VL_PoisonBombExplosion"); Aoe componentInChildren = prefab2.gameObject.GetComponentInChildren<Aoe>(); 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<Projectile>(); ((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 = prefab2; 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<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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 prefab3 = ZNetScene.instance.GetPrefab("VL_ThrowingKnife"); GameObject val8 = Object.Instantiate<GameObject>(prefab3, val7, Quaternion.identity); Projectile component2 = val8.GetComponent<Projectile>(); ((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_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_009d: 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_00b7: 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_00fe: 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_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_020a: 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_01aa: 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_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08cd: Unknown result type (might be due to invalid IL or missing references) //IL_08d2: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: 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_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_090a: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_093c: 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_07f5: Unknown result type (might be due to invalid IL or missing references) //IL_0815: 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_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_083c: 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_02d0: Expected O, but got Unknown //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0406: 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_041d: 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_043f: 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_0455: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: 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_04e2: 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_0514: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_046f: 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_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: 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_0617: 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_0636: Unknown result type (might be due to invalid IL or missing references) //IL_0641: 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_0650: 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) //IL_066e: 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_056f: 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_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Expected O, but got Unknown //IL_058a: 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_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: 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_05ec: 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_05f8: 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); Vector3 position = ((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<Character>(ref val2); bool flag = (Object)(object)val2 != (Object)null; List<Component> list = new List<Component>(); list.Clear(); ((Component)((RaycastHit)(ref val)).collider).gameObject.GetComponents<Component>(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<Character>(); flag = (Object)(object)val2 != (Object)null; } } if (flag && !val2.IsPlayer()) { if (!((Character)player).GetSEMan().HaveStatusEffect("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, false); float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((Skill x) => x.m_info == ValheimLegends.DisciplineSkillDef)).m_level; Object.Instantiate<GameObject>(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; if (true) { bounds = ((RaycastHit)(ref val)).collider.bounds; float x2 = ((Bounds)(ref bounds)).size.x; bounds = ((RaycastHit)(ref val)).collider.bounds; num = (x2 + ((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<GameObject>(ZNetScene.instance.GetPrefab("fx_VL_Smokeburst"), backstabPoint, Quaternion.identity); Object.Instantiate<GameObject>(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("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, false); float level2 = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((Skill x) => x.m_info == ValheimLegends.EvocationSkillDef)).m_level; GameObject prefab = ZNetScene.instance.GetPrefab("vfx_odin_despawn"); Object.Instantiate<GameObject>(prefab, ((Character)player).GetCenterPoint(), Quaternion.identity); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_wraith_death"), ((Component)player).transform.position, Quaternion.identity); fadePoint = ((Component)player).transform.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("SE_VL_Ability2_CD")) { Vector3 val6 = fadePoint - ((Component)player).transform.position; if (((Vector3)(ref val6)).magnitude < 100f) { GameObject prefab2 = ZNetScene.instance.GetPrefab("vfx_odin_despawn"); Object.Instantiate<GameObject>(prefab2, ((Character)player).GetCenterPoint(), Quaternion.identity); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_wraith_death"), ((Component)player).transform.position, Quaternion.identity); playerBody.position = fadePoint; if (canGainTrick) { SE_Rogue sE_Rogue3 = (SE_Rogue)(object)((Character)player).GetSEMan().GetStatusEffect(StringExtensionMethods.GetStableHashCode("SE_VL_Rogue")); sE_Rogue3.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("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, false); ((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_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<int> kicklist; public static bool PlayerIsUnarmed { get { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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<ItemData>(); SharedData shared = ((Humanoid)localPlayer).GetCurrentWeapon().m_shared; if (shared != null && (shared.m_name.ToLower() == "unarmed" || (int)shared.m_attachOverride == 12) && value == null) { return true; } } return false; } } public static void Impact_Effect(Player player, float altitude) { //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_0067: 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_007c: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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<Character> allCharacters = Character.GetAllCharacters(); ValheimLegends.shouldValkyrieImpact = false; foreach (Character item in allCharacters) { float level = ((IEnumerable<Skill>)((Character)player).GetSkills().GetSkillList()).FirstOrDefault((Func<Skill, bool>)((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<GameObject>(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_0013: 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_0023: 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_0033: 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_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_0061: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_038a: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_00f9: 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_04cd: 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_012e: 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_013b: 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_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: 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_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0419: 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_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_0145: 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_0153: 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_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_055f: 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_056f: 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_057e: Unknown result type (might be due to invalid IL or missing references) //IL_0589: 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_059d: 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) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_0606: 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_060d: Unknown result type (might be due to invalid IL or missing references) //IL_061f: 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_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0683: 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_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Expected O, but got Unknown //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_0741: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_074f: 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_077e: Unknown result type (might be due to invalid IL or missing references) //IL_066a: Unknown result type (might be due to invalid IL or missing references) //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_0853: Unknown result type (might be due to invalid IL or missing references) //IL_0858: 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_0874: 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_087f: Unknown result type (might be due to invalid IL or missing references) //IL_0887: 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_0894: Unknown result type (might be due to invalid IL or missing references) //IL_0899: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c6: Unknown result type (might be due to invalid IL or missing references) //IL_08d0: Unknown result type (might be due to invalid IL or missing references) //IL_08d5: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: 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_01e5: Expected O, but got Unknown //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_0c30: Unknown result type (might be due to invalid IL or missing references) //IL_0c37: Unknown result type (might be due to invalid IL or missing references) //IL_090f: Unknown result type (might be due to invalid IL or missing references) //IL_091a: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092b: Unknown result type (might be due to invalid IL or missing references) //IL_093e: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_0953: 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_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_0a02: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Unknown result type (might be due to invalid IL or missing references) //IL_0a0e: Unknown result type (might be due to invalid IL or missing references) //IL_0a13: Unknown result type (might be due to invalid IL or missing references) //IL_0a21: 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_0a2f: 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_0997: Unknown result type (might be due to invalid IL or missing references) //IL_099e: 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_098a: Unknown result type (might be due to invalid IL or missing references) //IL_0a5d: 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_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_0c8a: Unknown result type (might be due to invalid IL or missing references) //IL_0c91: Unknown result type (might be due to invalid IL or missing references) //IL_0c9c: 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_0a74: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: 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_0a87: Unknown result type (might be due to invalid IL or missing references) //IL_0cd1: Unknown result type (might be due to invalid IL or missing references) //IL_0cd6: Unknown result type (might be due to invalid IL or missing references) //IL_0ce0: Unknown result type (might be due to invalid IL or missing references) //IL_0ce5: 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_02af: 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_02b9: 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_02c2: Expected O, but got Unknown //IL_0311: 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_031d: 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_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_0d7d: Unknown result type (might be due to invalid IL or missing references) //IL_0cea: Unknown result type (might be due to invalid IL or missing references) //IL_0cee: Unknown result type (might be due to invalid IL or missing references) //IL_0cf4: Unknown result type (might be due to invalid IL or missing references) //IL_0cc4: Unknown result type (might be due to invalid IL or missing references) //IL_0ab9: Unknown result type (might be due to invalid IL or missing references) //IL_0ac0: Unknown result type (might be due to invalid IL or missing references) //IL_0ac7: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Unknown result type (might be due to invalid IL or missing references) //IL_0aa4: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: Unknown result type (might be due to invalid IL or missing references) //IL_0ab0: Unknown result type (might be due to invalid IL or missing references) //IL_0f41: Unknown result type (might be due to invalid IL or missing references) //IL_0f49: Unknown result type (might be due to invalid IL or missing references) //IL_0f53: Unknown result type (might be due to invalid IL or missing references) //IL_0f58: Unknown result type (might be due to invalid IL or missing references) //IL_0f63: Unknown result type (might be due to invalid IL or missing references) //IL_0f68: 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_0da9: 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_0fa8: 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_0fcd: Unknown result type (might be due to invalid IL or missing references) //IL_0fe1: Unknown result type (might be due to invalid IL or missing references) //IL_0fe6: Unknown result type (might be due to invalid I