Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Wanderer v0.8.9
plugins/UnforgivenMod.dll
Decompiled 5 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.AI.Walker; using EntityStates.Merc.Weapon; using HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using ThreeEyedGames; using UnforgivenMod.Modules; using UnforgivenMod.Modules.Achievements; using UnforgivenMod.Modules.BaseStates; using UnforgivenMod.Modules.Characters; using UnforgivenMod.Unforgiven; using UnforgivenMod.Unforgiven.Components; using UnforgivenMod.Unforgiven.Content; using UnforgivenMod.Unforgiven.SkillStates; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; 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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UnforgivenMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+7f163acb0c3b2f4522deede78223bebe98edc239")] [assembly: AssemblyProduct("UnforgivenMod")] [assembly: AssemblyTitle("UnforgivenMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] internal enum UnforgivenCameraParams { DEFAULT, LAST_BREATH, AIM_SNIPER, EMOTE } namespace UnforgivenMod { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void ErrorAssetBundle(string assetName, string bundleName) { Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.kenko.Unforgiven", "Unforgiven", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class UnforgivenPlugin : BaseUnityPlugin { public const string MODUID = "com.kenko.Unforgiven"; public const string MODNAME = "Unforgiven"; public const string MODVERSION = "1.0.0"; public const string DEVELOPER_PREFIX = "KENKO"; public static UnforgivenPlugin instance; private static bool? _emotesInstalled; public static bool emotesInstalled { get { if (!_emotesInstalled.HasValue) { _emotesInstalled = Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"); } return _emotesInstalled.Value; } } public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); private void Awake() { instance = this; NetworkingAPI.RegisterMessageType<SyncWindExplosion>(); NetworkingAPI.RegisterMessageType<SyncStacks>(); NetworkingAPI.RegisterMessageType<SyncIcon>(); Log.Init(((BaseUnityPlugin)this).Logger); Language.Init(); new UnforgivenSurvivor().Initialize(); new ContentPacks().Initialize(); } } } namespace UnforgivenMod.Unforgiven { public class UnforgivenSurvivor : SurvivorBase<UnforgivenSurvivor> { public static class EmoteAPICompat { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Emotes() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown GameObject val = UnforgivenAssets.mainAssetBundle.LoadAsset<GameObject>("unforgiven_emoteskeleton"); CustomEmotesAPI.ImportArmature(characterPrefab, val, 0, true); CustomEmotesAPI.animChanged += new AnimationChanged(CustomEmotesAPI_animChanged); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void CustomEmotesAPI_animChanged(string newAnimation, BoneMapper mapper) { if (newAnimation != "none") { if (((Object)((Component)mapper).transform).name == "unforgiven_emoteskeleton") { ((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("KatanaModel")).gameObject.SetActive(false); } } else if (((Object)((Component)mapper).transform).name == "unforgiven_emoteskeleton") { ((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("KatanaModel")).gameObject.SetActive(true); } } } public const string UNFORGIVEN_PREFIX = "KENKO_UNFORGIVEN_"; internal static GameObject characterPrefab; public static SkillDef firstBreath; public override string assetBundleName => "unforgiven"; public override string bodyName => "UnforgivenBody"; public override string masterName => "UnforgivenMonsterMaster"; public override string modelPrefabName => "mdlUnforgiven"; public override string displayPrefabName => "UnforgivenDisplay"; public override string survivorTokenPrefix => "KENKO_UNFORGIVEN_"; public override BodyInfo bodyInfo => new BodyInfo { bodyName = bodyName, bodyNameToken = "KENKO_UNFORGIVEN_NAME", subtitleNameToken = "KENKO_UNFORGIVEN_SUBTITLE", characterPortrait = assetBundle.LoadAsset<Texture>("texUnforgivenIcon"), bodyColor = UnforgivenAssets.unforgivenColor, sortPosition = 7.9f, crosshair = CharacterAssets.LoadCrosshair("Standard"), podPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod"), damage = UnforgivenConfig.damage.Value, damageGrowth = UnforgivenConfig.damageGrowth.Value * UnforgivenConfig.damage.Value, attackSpeed = UnforgivenConfig.attackSpeed.Value, attackSpeedGrowth = UnforgivenConfig.attackSpeedGrowth.Value, crit = UnforgivenConfig.crit.Value, critGrowth = UnforgivenConfig.critGrowth.Value, maxHealth = UnforgivenConfig.maxHealth.Value, healthGrowth = UnforgivenConfig.healthGrowth.Value * UnforgivenConfig.maxHealth.Value, healthRegen = UnforgivenConfig.healthRegen.Value, regenGrowth = UnforgivenConfig.regenGrowth.Value * UnforgivenConfig.healthRegen.Value, shield = UnforgivenConfig.shield.Value, shieldGrowth = UnforgivenConfig.shieldGrowth.Value * UnforgivenConfig.shield.Value, armor = UnforgivenConfig.armor.Value, armorGrowth = UnforgivenConfig.armorGrowth.Value * UnforgivenConfig.armor.Value, moveSpeed = UnforgivenConfig.moveSpeed.Value, moveSpeedGrowth = UnforgivenConfig.moveSpeedGrowth.Value * UnforgivenConfig.moveSpeed.Value, jumpPower = UnforgivenConfig.jumpPower.Value, jumpPowerGrowth = UnforgivenConfig.jumpPowerGrowth.Value * UnforgivenConfig.jumpPower.Value, acceleration = UnforgivenConfig.acceleration.Value, jumpCount = UnforgivenConfig.jumpCount.Value, autoCalculateLevelStats = UnforgivenConfig.autoCalculateLevelStats.Value }; public override CustomRendererInfo[] customRendererInfos => new CustomRendererInfo[5] { new CustomRendererInfo { childName = "Model" }, new CustomRendererInfo { childName = "KatanaModel" }, new CustomRendererInfo { childName = "SheathModel" }, new CustomRendererInfo { childName = "EmpoweredSword" }, new CustomRendererInfo { childName = "ArmModel" } }; public override UnlockableDef characterUnlockableDef => UnforgivenUnlockables.characterUnlockableDef; public override ItemDisplaysBase itemDisplays => new UnforgivenItemDisplays(); public override AssetBundle assetBundle { get; protected set; } public override GameObject bodyPrefab { get; protected set; } public override CharacterBody prefabCharacterBody { get; protected set; } public override GameObject characterModelObject { get; protected set; } public override CharacterModel prefabCharacterModel { get; protected set; } public override GameObject displayPrefab { get; protected set; } public override void Initialize() { base.Initialize(); } public override void InitializeCharacter() { UnforgivenConfig.Init(); UnforgivenUnlockables.Init(); base.InitializeCharacter(); CameraParams.InitializeParams(); DamageTypes.Init(); UnforgivenStates.Init(); UnforgivenTokens.Init(); UnforgivenBuffs.Init(assetBundle); UnforgivenAssets.Init(assetBundle); InitializeEntityStateMachines(); InitializeSkills(); InitializeSkins(); InitializeCharacterMaster(); AdditionalBodySetup(); characterPrefab = bodyPrefab; AddHooks(); } private void AdditionalBodySetup() { //IL_006b: 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_0086: Expected O, but got Unknown //IL_0086: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00ae: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_005e: Expected O, but got Unknown AddHitboxes(); bodyPrefab.AddComponent<UnforgivenController>(); bodyPrefab.AddComponent<UnforgivenTracker>(); if (!UnforgivenConfig.noShieldVisual.Value) { TempVisualEffectAPI.AddTemporaryVisualEffect(UnforgivenAssets.shieldEffect, new EffectRadius(tempAddShieldRadius), new EffectCondition(tempAddShield), ""); } TempVisualEffectAPI.AddTemporaryVisualEffect(UnforgivenAssets.dashCdEffect, new EffectRadius(dashCdRadius), new EffectCondition(dashCooldown), ""); TempVisualEffectAPI.AddTemporaryVisualEffect(UnforgivenAssets.nadoUpEffect, new EffectRadius(nadoUpRadius), new EffectCondition(tempNadoUp), ""); AkBank component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercBody.prefab").WaitForCompletion().GetComponent<AkBank>(); AkBank val = bodyPrefab.AddComponent<AkBank>(); ((AkTriggerHandler)val).triggerList = ((AkTriggerHandler)component).triggerList; val.data = component.data; ((AkTriggerHandler)val).useOtherObject = false; val.decodeBank = false; val.overrideLoadSetting = false; val.loadAsynchronous = false; val.saveDecodedBank = false; val.unloadTriggerList = component.unloadTriggerList; static float dashCdRadius(CharacterBody body) { return body.radius * 1.25f; } static bool dashCooldown(CharacterBody body) { return body.HasBuff(UnforgivenBuffs.dashCooldownBuff); } static float nadoUpRadius(CharacterBody body) { return body.radius * 5f; } static bool tempAddShield(CharacterBody body) { return body.HasBuff(UnforgivenBuffs.hasShieldBuff); } static float tempAddShieldRadius(CharacterBody body) { return body.radius * 0.9f; } static bool tempNadoUp(CharacterBody body) { return body.HasBuff(UnforgivenBuffs.stabMaxStacksBuff); } } public void AddHitboxes() { Prefabs.SetupHitBoxGroup(characterModelObject, "MeleeHitbox", "MeleeHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "SteelTempestHitbox", "SteelTempestHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "SteelTempestSpinHitbox", "SteelTempestSpinHitbox"); } public override void InitializeEntityStateMachines() { Prefabs.ClearEntityStateMachines(bodyPrefab); Prefabs.AddMainEntityStateMachine(bodyPrefab, "Body", typeof(MainState), typeof(SpawnTeleporterState)); Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon"); Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon2"); Prefabs.AddEntityStateMachine(bodyPrefab, "Dash"); Prefabs.AddEntityStateMachine(bodyPrefab, "Dash2"); } public override void InitializeSkills() { bodyPrefab.AddComponent<UnforgivenPassive>(); Skills.CreateSkillFamilies(bodyPrefab); AddPassiveSkills(); AddPrimarySkills(); AddSecondarySkills(); AddUtilitySkills(); AddSpecialSkills(); if (UnforgivenPlugin.scepterInstalled) { InitializeScepter(); } } private void AddPassiveSkills() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) UnforgivenPassive component = bodyPrefab.GetComponent<UnforgivenPassive>(); SkillLocator component2 = bodyPrefab.GetComponent<SkillLocator>(); component2.passiveSkill.enabled = false; component.unforgivenPassive = Skills.CreateSkillDef(new SkillDefInfo { skillName = "KENKO_UNFORGIVEN_PASSIVE_NAME", skillNameToken = "KENKO_UNFORGIVEN_PASSIVE_NAME", skillDescriptionToken = "KENKO_UNFORGIVEN_PASSIVE_DESCRIPTION", skillIcon = assetBundle.LoadAsset<Sprite>("texPassiveIcon"), keywordTokens = new string[0], activationState = new SerializableEntityStateType(typeof(Idle)), activationStateMachineName = "", baseMaxStock = 1, baseRechargeInterval = 0f, beginSkillCooldownOnSkillEnd = false, canceledFromSprinting = false, forceSprintDuringState = false, fullRestockOnAssign = true, interruptPriority = (InterruptPriority)0, resetCooldownTimerOnUse = false, isCombatSkill = false, mustKeyPress = false, cancelSprintingOnActivation = false, rechargeStock = 1, requiredStock = 2, stockToConsume = 1 }); Skills.AddPassiveSkills(component.passiveSkillSlot.skillFamily, component.unforgivenPassive); } private void AddPrimarySkills() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) UnforgivenSteppedSkillDef unforgivenSteppedSkillDef = Skills.CreateSkillDef<UnforgivenSteppedSkillDef>(new SkillDefInfo("Swift Strikes", "KENKO_UNFORGIVEN_PRIMARY_SWING_NAME", "KENKO_UNFORGIVEN_PRIMARY_SWING_DESCRIPTION", assetBundle.LoadAsset<Sprite>("texPrimaryIcon"), new SerializableEntityStateType(typeof(SlashCombo)))); unforgivenSteppedSkillDef.stepCount = 2; unforgivenSteppedSkillDef.stepGraceDuration = 0.1f; ((SkillDef)unforgivenSteppedSkillDef).keywordTokens = new string[0]; Skills.AddPrimarySkills(bodyPrefab, unforgivenSteppedSkillDef); } private void AddSecondarySkills() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "SteelTempest"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_SECONDARY_STEEL_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_SECONDARY_STEEL_DESCRIPTION"; skillDefInfo.keywordTokens = new string[2] { Tokens.agileKeyword, Tokens.unforgivenSwiftKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSecondaryIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(EnterStab)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 2.5f; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = false; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.mustKeyPress = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; SkillDef val = (SkillDef)(object)Skills.CreateSkillDef<ScaleCDwAttackSpeed>(skillDefInfo); Skills.AddSecondarySkills(bodyPrefab, val); } private void AddUtilitySkills() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "SweepingBlade"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_UTILITY_SWEEP_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_UTILITY_SWEEP_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Dash)); skillDefInfo.activationStateMachineName = "Dash"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 0.25f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = false; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = true; SkillDef val = (SkillDef)(object)Skills.CreateSkillDef<DashTrackerSkillDef>(skillDefInfo); Skills.AddUtilitySkills(bodyPrefab, val); } private void AddSpecialSkills() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "LastBreath"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_SPECIAL_BREATH_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_SPECIAL_BREATH_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSpecialIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(DashSpecial)); skillDefInfo.activationStateMachineName = "Dash"; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.baseRechargeInterval = 9f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = true; SkillDef val = (SkillDef)(object)Skills.CreateSkillDef<UnforgivenSpecialTrackerSkillDef>(skillDefInfo); Skills.AddSpecialSkills(bodyPrefab, val); } private void InitializeScepter() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "FirstBreath"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_SPECIAL_SCEP_BREATH_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_SPECIAL_SCEP_BREATH_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSpecialIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(DashSpecial)); skillDefInfo.activationStateMachineName = "Dash"; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.baseRechargeInterval = 9f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = true; firstBreath = (SkillDef)(object)Skills.CreateSkillDef<UnforgivenSpecialTrackerSkillDef>(skillDefInfo); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(firstBreath, bodyName, (SkillSlot)3, 0); } public override void InitializeSkins() { ModelSkinController val = ((Component)prefabCharacterModel).gameObject.AddComponent<ModelSkinController>(); RendererInfo[] baseRendererInfos = prefabCharacterModel.baseRendererInfos; List<SkinDef> list = new List<SkinDef>(); SkinDef val2 = Skins.CreateSkinDef("DEFAULT_SKIN", assetBundle.LoadAsset<Sprite>("texDefaultSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject); val2.meshReplacements = Skins.getMeshReplacements(assetBundle, baseRendererInfos, "meshBody", "meshDefaultSword", "meshSheath", "meshEmpoweredSword", "meshArm"); list.Add(val2); SkinDef val3 = Skins.CreateSkinDef("KENKO_UNFORGIVEN_MASTERY_SKIN_NAME", assetBundle.LoadAsset<Sprite>("texWhirlwindSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, UnforgivenUnlockables.masterySkinUnlockableDef); val3.meshReplacements = Skins.getMeshReplacements(assetBundle, baseRendererInfos, "meshAscendancyBody", "meshAscendancySword", "meshAscendancySheath", "meshAscendancySwordEmpowered", "meshAscendancyArm"); val3.rendererInfos[0].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[1].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[2].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[3].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[4].defaultMaterial = UnforgivenAssets.ascendencyMat; list.Add(val3); val.skins = list.ToArray(); } public override void InitializeCharacterMaster() { UnforgivenAI.Init(bodyPrefab, masterName); } private void AddHooks() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown HUD.onHudTargetChangedGlobal += HUDSetup; CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init); } private void SurvivorCatalog_Init(orig_Init orig) { orig.Invoke(); if (UnforgivenPlugin.emotesInstalled) { EmoteAPICompat.Emotes(); } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = damageReport.attackerBody; NetworkIdentity val = default(NetworkIdentity); if (Object.op_Implicit((Object)(object)attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerMaster) && Object.op_Implicit((Object)(object)damageReport.victim) && attackerBody.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody") && damageReport.victimBody.HasBuff(UnforgivenBuffs.airborneBuff) && ((Component)damageReport.victim).gameObject.TryGetComponent<NetworkIdentity>(ref val)) { NetMessageExtensions.Send((INetMessage)(object)new SyncWindExplosion(val.netId, ((Component)damageReport.victim).gameObject), (NetworkDestination)1); } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0043: 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) if ((NetworkServer.active && self.alive) || !self.godMode || self.ospTimer <= 0f) { CharacterBody body = self.body; UnforgivenController unforgivenController = default(UnforgivenController); if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody") && !damageInfo.rejected && ((Component)body).TryGetComponent<UnforgivenController>(ref unforgivenController) && unforgivenController.shieldAmount == 100f) { body.healthComponent.AddBarrier(body.healthComponent.fullCombinedHealth * 0.25f); unforgivenController.shieldAmount = 0f; body.RemoveBuff(UnforgivenBuffs.hasShieldBuff); Util.PlaySound("sfx_unforgiven_nado_impact", ((Component)body).gameObject); Util.PlaySound("sfx_unforgiven_lost_stacks", ((Component)body).gameObject); } } orig.Invoke(self, damageInfo); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody")) { self.crit *= 1.5f; self.critMultiplier *= 0.9f; } } private static void HUDSetup(HUD hud) { //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0367: 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_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)hud.targetBodyObject) && Object.op_Implicit((Object)(object)hud.targetMaster) && (Object)(object)hud.targetMaster.bodyPrefab == (Object)(object)characterPrefab && ((NetworkBehaviour)hud.targetMaster).hasAuthority) { Transform parent = ((Component)hud.equipmentIcons[0]).gameObject.transform.parent; Transform val = ((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("SpringCanvas") .Find("BottomLeftCluster") .Find("BarRoots") .Find("LevelDisplayCluster"); GameObject val2 = Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("SpringCanvas") .Find("BottomLeftCluster")); ((Object)val2).name = "ShieldTracker"; val2.transform.SetParent(((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("CrosshairCanvas") .Find("CrosshairExtras")); Object.DestroyImmediate((Object)(object)((Component)val2.transform.GetChild(0)).gameObject); Object.Destroy((Object)(object)val2.GetComponentInChildren<LevelText>()); Object.Destroy((Object)(object)val2.GetComponentInChildren<ExpBar>()); ((Component)val2.transform.Find("LevelDisplayRoot").Find("ValueText")).gameObject.SetActive(false); Object.DestroyImmediate((Object)(object)((Component)val2.transform.Find("ExpBarRoot")).gameObject); ((Component)val2.transform.Find("LevelDisplayRoot")).GetComponent<RectTransform>().anchoredPosition = new Vector2(-12f, 0f); RectTransform component = val2.GetComponent<RectTransform>(); ((Transform)component).localScale = new Vector3(0.8f, 0.8f, 1f); component.anchorMin = new Vector2(0f, 0f); component.anchorMax = new Vector2(0f, 0f); component.offsetMin = new Vector2(120f, -40f); component.offsetMax = new Vector2(120f, -40f); component.pivot = new Vector2(0.5f, 0f); component.anchoredPosition = new Vector2(50f, 0f); ((Transform)component).localPosition = new Vector3(120f, -40f, 0f); GameObject val3 = Object.Instantiate<GameObject>(UnforgivenAssets.mainAssetBundle.LoadAsset<GameObject>("WeaponChargeBar")); ((Object)val3).name = "WindShieldMeter"; val3.transform.SetParent(((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("CrosshairCanvas") .Find("CrosshairExtras")); component = val3.GetComponent<RectTransform>(); ((Transform)component).localScale = new Vector3(0.75f, 0.1f, 1f); component.anchorMin = new Vector2(100f, 2f); component.anchorMax = new Vector2(100f, 2f); component.pivot = new Vector2(0.5f, 0f); component.anchoredPosition = new Vector2(100f, 2f); ((Transform)component).localPosition = new Vector3(100f, 2f, 0f); ((Transform)component).rotation = Quaternion.Euler(new Vector3(0f, 0f, 90f)); PassiveShieldHudController passiveShieldHudController = val2.AddComponent<PassiveShieldHudController>(); passiveShieldHudController.targetHUD = hud; passiveShieldHudController.targetText = ((Component)val2.transform.Find("LevelDisplayRoot").Find("PrefixText")).gameObject.GetComponent<LanguageTextMeshController>(); passiveShieldHudController.durationDisplay = val3; passiveShieldHudController.durationBar = ((Component)val3.transform.GetChild(1)).gameObject.GetComponent<Image>(); passiveShieldHudController.durationBarColor = ((Component)val3.transform.GetChild(0)).gameObject.GetComponent<Image>(); } } } } namespace UnforgivenMod.Unforgiven.SkillStates { public class Dash : BaseUnforgivenSkillState { public static float baseDuration = 0.1f; public static float baseExtraDuration = 0.05f; public static float extraDistance = 2.5f; public static float hitRange = 4.5f; public int targetIndex = 0; public CharacterBody victimBody; private Transform modelTransform; private HurtBox hurtbox; private UnforgivenTracker tracker; private Vector3 direction; private float distance; private float duration; private float extraDuration; private float speed; private bool hasFired; private float damageCoefficient = UnforgivenConfig.dashDamageCoefficient.Value; private float minDistance = 7f; private AimRequest aimRequest; private int maxStacks => UnforgivenConfig.baseMaxDashStacks.Value + (((EntityState)this).skillLocator.utility.maxStock - 1); public override void OnEnter() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_01f4: 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_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_022d: 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_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) RefreshState(); base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (((EntityState)this).skillLocator.secondary.rechargeStopwatch >= ((EntityState)this).skillLocator.secondary.finalRechargeInterval - 0.5f) { ((EntityState)this).skillLocator.secondary.rechargeStopwatch = ((EntityState)this).skillLocator.secondary.finalRechargeInterval; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); damageCoefficient = UnforgivenConfig.dashDamageCoefficient.Value + (float)((EntityState)this).characterBody.GetBuffCount(UnforgivenBuffs.stackingDashDamageBuff) * UnforgivenConfig.dashStackingDamageCoefficient.Value; } tracker = ((EntityState)this).GetComponent<UnforgivenTracker>(); if (Object.op_Implicit((Object)(object)tracker) && ((EntityState)this).isAuthority) { hurtbox = tracker.GetTrackingTarget(); } if (Object.op_Implicit((Object)(object)hurtbox) && Object.op_Implicit((Object)(object)hurtbox.healthComponent) && Object.op_Implicit((Object)(object)hurtbox.healthComponent.body)) { victimBody = hurtbox.healthComponent.body; } if (!Object.op_Implicit((Object)(object)victimBody)) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); return; } if (NetworkServer.active) { victimBody.AddTimedBuff(UnforgivenBuffs.dashCooldownBuff, 6f); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); Vector3 corePosition = Util.GetCorePosition(victimBody); float num = minDistance; Vector3 val = ((EntityState)this).transform.position - corePosition; distance = Mathf.Max(num, ((Vector3)(ref val)).magnitude); val = corePosition - ((EntityState)this).transform.position; direction = ((Vector3)(ref val)).normalized; duration = baseDuration / ((BaseState)this).attackSpeedStat; extraDuration = baseExtraDuration / ((BaseState)this).attackSpeedStat; speed = distance / duration; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", 0.1f); Util.PlaySound("Play_merc_shift_slice", ((EntityState)this).gameObject); if (((BaseState)this).isGrounded) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } } public override void OnExit() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_0077: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).characterMotor.velocity = Vector3.zero; AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); int num = ((EntityState)this).characterBody.GetBuffCount(UnforgivenBuffs.stackingDashDamageBuff); if (num >= maxStacks) { num = maxStacks - 1; } ((EntityState)this).characterBody.ClearTimedBuffs(UnforgivenBuffs.stackingDashDamageBuff); for (int i = 0; i < num + 1; i++) { ((EntityState)this).characterBody.AddTimedBuff(UnforgivenBuffs.stackingDashDamageBuff, 6f, maxStacks); } } ((EntityState)this).OnExit(); } private void Fire() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: 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_012c: 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_0137: 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_0147: Expected O, but got Unknown if (!hasFired) { hasFired = true; if (NetworkServer.active) { DamageInfo val = new DamageInfo { position = victimBody.transform.position, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)), crit = ((BaseState)this).RollCrit(), force = Vector3.zero, procChainMask = default(ProcChainMask), procCoefficient = 1f }; val.damageType.damageSource = (DamageSource)4; victimBody.healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)victimBody).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)victimBody).gameObject); EffectManager.SpawnEffect(UnforgivenAssets.unforgivenHitEffect, new EffectData { origin = victimBody.transform.position, rotation = Quaternion.identity, networkSoundEventIndex = UnforgivenAssets.swordImpactSoundEvent.index }, true); } } } public override void FixedUpdate() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (((EntityState)this).fixedAge >= duration && extraDuration != 0f) { speed = extraDistance / extraDuration; } ((EntityState)this).characterDirection.forward = direction; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += direction * speed * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (Object.op_Implicit((Object)(object)victimBody)) { Fire(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration + extraDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } public override void OnSerialize(NetworkWriter writer) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(hurtbox)); } public override void OnDeserialize(NetworkReader reader) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); hurtbox = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class DashSpecial : BaseUnforgivenSkillState { public int targetIndex = 0; public CharacterBody victimBody; private Transform modelTransform; private HurtBoxGroup hurtboxGroup; private Vector3 lastKnownPosition; private Vector3 direction; private float distance; private float duration; private float speed; private float stopwatch; public static float stopTrackTime = 0.8f; private float baseDuration = 0.1f; public float extraDuration; public static float extraDistance = 3.25f; public static float exitExtraDistance = 3.25f; public static float baseChainPrepDuration = 0.067f; public static float basePrepDuration = 0.067f; private float prepDuration; private float prepStopwatch; private bool holdBuffer; private AimRequest aimRequest; public override void OnEnter() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00b1: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: 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_02be: 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_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_052b: 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_049e: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) RefreshState(); base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (((EntityState)this).skillLocator.secondary.rechargeStopwatch >= ((EntityState)this).skillLocator.secondary.finalRechargeInterval - 0.5f) { ((EntityState)this).skillLocator.secondary.rechargeStopwatch = ((EntityState)this).skillLocator.secondary.finalRechargeInterval; } RaycastHit val = default(RaycastHit); Vector3 val2; if (((EntityState)this).inputBank.GetAimRaycast(60f, ref val)) { val2 = Vector3.MoveTowards(((RaycastHit)(ref val)).point, ((EntityState)this).transform.position, 5f); } else { Ray aimRay = ((EntityState)this).inputBank.GetAimRay(); val2 = Vector3.MoveTowards(((Ray)(ref aimRay)).GetPoint(60f), ((EntityState)this).transform.position, 5f); } Vector3 origin = val2; origin.y += 2.5f; HurtBox[] hurtBoxes = new SphereSearch { origin = origin, radius = 30f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); if (hurtBoxes.Length != 0) { HurtBox[] array = hurtBoxes; foreach (HurtBox val3 in array) { if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)val3.healthComponent) && Object.op_Implicit((Object)(object)val3.healthComponent.body) && Object.op_Implicit((Object)(object)val3.healthComponent.body.characterMotor)) { if (val3.healthComponent.body.HasBuff(UnforgivenBuffs.airborneBuff) || !val3.healthComponent.body.characterMotor.isGrounded || val3.healthComponent.body.characterMotor.isFlying) { victimBody = val3.healthComponent.body; break; } } else if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)val3.healthComponent) && Object.op_Implicit((Object)(object)val3.healthComponent.body) && !Object.op_Implicit((Object)(object)val3.healthComponent.body.characterMotor)) { victimBody = val3.healthComponent.body; break; } } } if (!Object.op_Implicit((Object)(object)victimBody)) { HurtBox[] hurtBoxes2 = new SphereSearch { origin = ((EntityState)this).transform.position, radius = 60f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); HurtBox[] array2 = hurtBoxes2; foreach (HurtBox val4 in array2) { if (Object.op_Implicit((Object)(object)val4) && Object.op_Implicit((Object)(object)val4.healthComponent) && Object.op_Implicit((Object)(object)val4.healthComponent.body) && Object.op_Implicit((Object)(object)val4.healthComponent.body.characterMotor)) { if (val4.healthComponent.body.HasBuff(UnforgivenBuffs.airborneBuff) || !val4.healthComponent.body.characterMotor.isGrounded || val4.healthComponent.body.characterMotor.isFlying) { victimBody = val4.healthComponent.body; break; } } else if (Object.op_Implicit((Object)(object)val4) && Object.op_Implicit((Object)(object)val4.healthComponent) && Object.op_Implicit((Object)(object)val4.healthComponent.body) && !Object.op_Implicit((Object)(object)val4.healthComponent.body.characterMotor)) { victimBody = val4.healthComponent.body; break; } } } if (!Object.op_Implicit((Object)(object)victimBody)) { ((EntityState)this).skillLocator.special.AddOneStock(); ((EntityState)this).outer.SetNextStateToMain(); return; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); Vector3 val5 = ((EntityState)this).transform.position - victimBody.coreTransform.position; distance = ((Vector3)(ref val5)).magnitude + 4f; val5 = victimBody.coreTransform.position - ((EntityState)this).transform.position; direction = ((Vector3)(ref val5)).normalized; duration = baseDuration / ((BaseState)this).attackSpeedStat; extraDuration = Dash.baseExtraDuration / ((BaseState)this).attackSpeedStat; speed = distance / duration; prepDuration = baseChainPrepDuration / ((BaseState)this).attackSpeedStat; unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", 0.05f); Util.PlaySound("Play_merc_shift_slice", ((EntityState)this).gameObject); } public override void OnExit() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).characterMotor.velocity = Vector3.zero; AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter - 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (prepStopwatch >= prepDuration) { stopwatch += Time.fixedDeltaTime; Vector3 val = ((!Object.op_Implicit((Object)(object)victimBody)) ? lastKnownPosition : (lastKnownPosition = victimBody.coreTransform.position)); if (stopwatch < duration * 0.5f) { Vector3 val2 = val - ((EntityState)this).transform.position; direction = ((Vector3)(ref val2)).normalized; } if (stopwatch >= duration && extraDuration != 0f) { speed = extraDistance / extraDuration; } ((EntityState)this).characterDirection.forward = direction; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += direction * speed * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (stopwatch >= duration + Dash.baseExtraDuration) { if (unforgivenController.bufferedSpin) { holdBuffer = true; } EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Dash").SetNextState((EntityState)(object)new Special { isBuffered = holdBuffer }); } } else { prepStopwatch += Time.fixedDeltaTime; } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class DashSpin : BaseMeleeAttack { private bool hasGrantedStacks; private bool activateNado; public override void OnEnter() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) RefreshState(); hitboxGroupName = "SteelTempestSpinHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); damageSource = (DamageSource)2; damageCoefficient = (empowered ? UnforgivenConfig.tornadoDamageCoefficient.Value : UnforgivenConfig.stabDamageCoefficient.Value); procCoefficient = 1f; pushForce = 300f; bonusForce = (empowered ? (Vector3.up * 3000f) : Vector3.zero); baseDuration = 1.1f; attackStartPercentTime = 0.05f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 8f; swingSoundString = GroundLight2.slash1Sound; hitSoundString = "sfx_unforgiven_stab"; playbackRateParam = "Slash.playbackRate"; muzzleString = "SpinMuzzle"; swingEffectPrefab = (empowered ? UnforgivenAssets.spinNadoEffect : (empoweredSpecial ? UnforgivenAssets.spinEmpoweredSlashEffect : UnforgivenAssets.spinSlashEffect)); hitEffectPrefab = UnforgivenAssets.unforgivenHitEffect; if (empowered) { if (NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(UnforgivenBuffs.stabMaxStacksBuff); } activateNado = true; moddedDamageTypeHolder.Add(DamageTypes.KnockAirborne); } impactSound = (empowered ? UnforgivenAssets.nadoImpactSoundEvent.index : UnforgivenAssets.swordImpactSoundEvent.index); base.OnEnter(); ((EntityState)this).characterBody.isSprinting = true; } protected override void PlayAttackAnimation() { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("FullBody, Override", "DashSpin", 0.05f); } public override void FixedUpdate() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.isSprinting = true; hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { RemoveHitstop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateParam, 0f); } } bool flag = stopwatch >= duration * attackStartPercentTime; bool flag2 = stopwatch >= duration * attackEndPercentTime; if ((flag && !flag2) || (flag && flag2 && !hasFired)) { if (!hasFired) { EnterAttack(); } FireAttack(); } if (((EntityState)this).isAuthority && stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } protected override void OnHitEnemyAuthority() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) base.OnHitEnemyAuthority(); if (!hasGrantedStacks) { hasGrantedStacks = true; NetworkIdentity component = ((EntityState)this).gameObject.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new SyncStacks(component.netId, activateNado), (NetworkDestination)2); } } } public override void OnExit() { base.OnExit(); unforgivenController.bufferedSpin = false; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitPercentTime) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class EnterStab : BaseUnforgivenSkillState { private EntityState savedState; private bool hasChosenState; public override void OnEnter() { RefreshState(); base.OnEnter(); } public override void FixedUpdate() { base.FixedUpdate(); EntityStateMachine val = null; EntityStateMachine[] components = ((EntityState)this).gameObject.GetComponents<EntityStateMachine>(); for (int i = 0; i < components.Length; i++) { if (components[i].customName == "Dash") { val = components[i]; break; } } if (Object.op_Implicit((Object)(object)val) && val.state is Dash && !hasChosenState) { hasChosenState = true; unforgivenController.bufferedSpin = true; savedState = (EntityState)(object)new DashSpin(); } else if (Object.op_Implicit((Object)(object)val) && val.state is DashSpecial && !hasChosenState) { hasChosenState = true; unforgivenController.bufferedSpin = true; savedState = (EntityState)(object)new DashSpin(); } else if (!hasChosenState) { if (empowered) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Tornado()); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new StabForward()); } } else if (!(val.state is DashSpecial) && !(val.state is Dash)) { ((EntityState)this).outer.SetNextState(savedState); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class MainState : GenericCharacterMain { private Animator animator; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; FindLocalUser(); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)animator)) { return; } bool flag = false; if (!((EntityState)this).characterBody.outOfDanger || !((EntityState)this).characterBody.outOfCombat) { flag = true; } animator.SetBool("inCombat", flag); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } if (!flag) { if (animator.GetBool("isUnsheathed")) { animator.SetBool("isUnsheathed", false); if (((EntityState)this).characterBody.isSprinting) { EntityState.PlayAnimationOnAnimator(animator, "Transition", "SprintToSafe"); } else if (!((EntityState)this).characterBody.GetNotMoving()) { EntityState.PlayAnimationOnAnimator(animator, "Transition", "RunToSafe"); } else { EntityState.PlayAnimationOnAnimator(animator, "Transition", "ToSafe"); } } animator.SetLayerWeight(animator.GetLayerIndex("Body, Combat"), 0f); } else if (animator.GetBool("isUnsheathed")) { animator.SetLayerWeight(animator.GetLayerIndex("Body, Combat"), 1f); } } public override void ProcessJump() { //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: 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_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0301: 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_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) || !((BaseCharacterMain)this).hasCharacterMotor || ((EntityState)this).healthComponent.isInFrozenState) { return; } bool flag = false; bool flag2 = false; if (((EntityState)this).characterBody.inventory.GetItemCountEffective(Items.JumpDamageStrike) > 0) { ((EntityState)this).characterBody.GetBuffCount(Buffs.JumpDamageStrikeCharge); } if (!base.jumpInputReceived || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } int itemCountEffective = ((EntityState)this).characterBody.inventory.GetItemCountEffective(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if (itemCountEffective > 0 && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCountEffective / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false); if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (((EntityState)this).characterBody.isSprinting) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("SprintJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else if (flag) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("BonusJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; ((EntityState)this).characterBody.TriggerJumpEventGlobally(); } } public class SlashCombo : BaseMeleeAttack { protected GameObject swingEffectInstance; public override void OnEnter() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) RefreshState(); hitboxGroupName = "MeleeHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); damageSource = (DamageSource)1; damageCoefficient = UnforgivenConfig.swingDamageCoefficient.Value; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1.1f; attackStartPercentTime = 0.2f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 7f; swingSoundString = "Play_merc_sword_swing"; hitSoundString = ""; playbackRateParam = "Slash.playbackRate"; swingEffectPrefab = (empoweredSpecial ? UnforgivenAssets.swordSwingEmpoweredEffect : UnforgivenAssets.swordSwingEffect); hitEffectPrefab = UnforgivenAssets.unforgivenHitEffect; impactSound = UnforgivenAssets.swordImpactSoundEvent.index; switch (swingIndex) { case 0: muzzleString = "SwingMuzzle1"; break; case 1: muzzleString = "SwingMuzzle2"; break; } base.OnEnter(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void FireAttack() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = Mathf.Max(direction.y, direction.y * 0.5f); ((BaseState)this).FindModelChild("MeleePivot").rotation = Util.QuaternionSafeLookRotation(direction); } base.FireAttack(); } protected override void PlaySwingEffect() { if (Object.op_Implicit((Object)(object)swingEffectPrefab)) { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val); } } } protected override void PlayAttackAnimation() { RefreshState(); if (!unforgivenController.isUnsheathed) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DrawSlash", playbackRateParam, duration * 1.3f, 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), playbackRateParam, duration * 1.3f, 0.05f); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } } } public class Special : BaseUnforgivenSkillState { public static float damageCoefficient = 2.5f; public static float finalDamageCoefficient = 8f; public static float procCoefficient = 1f; public bool crit; public bool isBuffered; private float maxRange = 12f; private float roundDuration = 0.3f; private float roundStopwatch; private int numRounds = 3; private int roundsCompleted = 0; protected GameObject swingEffectInstance; private GameObject swingEffectPrefab = UnforgivenAssets.swordSwingEffect; private GameObject swingEffectPrefab2 = UnforgivenAssets.swordSwingEmpoweredEffect; private GameObject slashEffectPrefab = UnforgivenAssets.specialSlashingEffect; private GameObject slashEffectPrefab2 = UnforgivenAssets.specialEmpoweredSlashingEffect; private AimRequest aimRequest; public override void OnEnter() { if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(UnforgivenBuffs.lastBreathBuff); } RefreshState(); base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } ((EntityState)this).characterBody.isSprinting = true; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((EntityState)this).characterBody.SetAimTimer(1.5f); roundsCompleted = 0; roundStopwatch = roundDuration; float num = (((BaseState)this).attackSpeedStat - 1f) * 0.5f; roundDuration /= num + 1f; crit = ((BaseState)this).RollCrit(); unforgivenController.Unsheath(); if (!unforgivenController.bufferedSpin || !isBuffered) { ((EntityState)this).PlayCrossfade("FullBody, Override", "Special", "Slash.playbackRate", (float)numRounds * roundDuration, (float)numRounds * roundDuration * 0.05f); } Transform modelTransform = ((EntityState)this).characterBody.modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { Animator component = ((Component)modelTransform).GetComponent<Animator>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((EntityState)this).gameObject); val.duration = 1.2f; val.destroyComponentOnEnd = true; val.originalMaterial = UnforgivenAssets.specialMaterial; val.inspectorCharacterModel = ((Component)component).gameObject.GetComponent<CharacterModel>(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.animateShaderAlpha = true; } } public override void OnExit() { if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)this).characterBody.RemoveBuff(UnforgivenBuffs.lastBreathBuff); ((EntityState)this).characterBody.AddTimedBuff(UnforgivenBuffs.lastBreathBuff, 6f); } ((EntityState)this).OnExit(); AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } unforgivenController.bufferedSpin = false; isBuffered = false; } private void Fire() { //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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0110: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0350: 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_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) bool flag = roundsCompleted == numRounds - 1; float num = (flag ? finalDamageCoefficient : damageCoefficient); Util.PlaySound(flag ? GroundLight2.slash3Sound : GroundLight2.slash1Sound, ((EntityState)this).gameObject); BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, procChainMask = default(ProcChainMask), losType = (LoSType)1, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 32)), procCoefficient = 1f, bonusForce = Vector3.down * 3000f, baseForce = 300f, baseDamage = num * ((BaseState)this).damageStat, falloffModel = (FalloffModel)0, radius = maxRange, position = ((EntityState)this).transform.position, attackerFiltering = (AttackerFiltering)2, teamIndex = ((BaseState)this).GetTeam(), inflictor = ((EntityState)this).gameObject, crit = crit }; val.damageType.damageSource = (DamageSource)8; if ((Object)(object)((EntityState)this).skillLocator.special.skillDef == (Object)(object)UnforgivenSurvivor.firstBreath) { DamageAPI.AddModdedDamageType(val, DamageTypes.ResetDashes); if (((EntityState)this).skillLocator.secondary.stock != ((EntityState)this).skillLocator.secondary.maxStock) { ((EntityState)this).skillLocator.secondary.Reset(); } } val.Fire(); if (Object.op_Implicit((Object)(object)slashEffectPrefab) && Object.op_Implicit((Object)(object)slashEffectPrefab2)) { EffectManager.SpawnEffect(flag ? slashEffectPrefab2 : slashEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position }, true); } Transform val2 = ((roundsCompleted % 2 == 0) ? ((BaseState)this).FindModelChild("SwingMuzzle2") : ((BaseState)this).FindModelChild("SwingMuzzle1")); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)swingEffectPrefab2) && Object.op_Implicit((Object)(object)swingEffectPrefab)) { if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } swingEffectInstance = Object.Instantiate<GameObject>(flag ? swingEffectPrefab2 : swingEffectPrefab, val2); } Util.PlayAttackSpeedSound(flag ? GroundLight2.slash3Sound : GroundLight2.slash1Sound, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (!NetworkServer.active) { return; } Vector3 val3 = Vector3.down; if (!flag) { val3 = Random.insideUnitSphere; } val3.y = Mathf.Max(0f, val3.y); val3 = ((Vector3)(ref val3)).normalized; List<HealthComponent> list = new List<HealthComponent>(); Collider[] array = Physics.OverlapSphere(((EntityState)this).transform.position, maxRange, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask), (QueryTriggerInteraction)0); for (int i = 0; i < array.Length; i++) { HurtBox component = ((Component)array[i]).GetComponent<HurtBox>(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent)) { continue; } TeamComponent component2 = ((Component)healthComponent).GetComponent<TeamComponent>(); if (component2.teamIndex == ((EntityState)this).teamComponent.teamIndex || list.Contains(healthComponent)) { continue; } list.Add(healthComponent); if (Object.op_Implicit((Object)(object)healthComponent.body)) { if (Object.op_Implicit((Object)(object)healthComponent.body.characterMotor)) { healthComponent.body.characterMotor.velocity = val3 * 12f; } else if (Object.op_Implicit((Object)(object)healthComponent.body.rigidbody)) { healthComponent.body.rigidbody.velocity = val3 * 12f; } healthComponent.body.AddTimedBuff(UnforgivenBuffs.specialSlamTrackerBuff, 2f, 1); } } } public override void FixedUpdate() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterMotor.velocity = Vector3.zero; roundStopwatch += Time.fixedDeltaTime; if (roundStopwatch >= roundDuration) { Fire(); roundsCompleted++; roundStopwatch = 0f; } if (roundsCompleted >= numRounds) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } public class StabForward : BaseMeleeAttack { private bool hasGrantedStacks; protected GameObject swingEffectInstance; public override void OnEnter() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) RefreshState(); hitboxGroupName = "SteelTempestHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); damageSource = (DamageSource)2; damageCoefficient = UnforgivenConfig.stabDamageCoefficient.Value; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1.1f; attackStartPercentTime = 0.2f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 6f; swingSoundString = "sfx_unforgiven_stab"; hitSoundString = ""; playbackRateParam = "Slash.playbackRate"; swingEffectPrefab = UnforgivenAssets.stabSwingEffect; hitEffectPrefab = UnforgivenAssets.unforgivenHitEffect; impactSound = UnforgivenAssets.stabImpactSoundEvent.index; muzzleString = "StabMuzzle"; base.OnEnter(); } protected override void OnHitEnemyAuthority() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) base.OnHitEnemyAuthority(); if (!hasGrantedStacks) { hasGrantedStacks = true; NetworkIdentity component = ((EntityState)this).gameObject.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new SyncStacks(component.netId, empowered), (NetworkDestination)2); } } } protected override void FireAttack() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = Mathf.Max(direction.y, direction.y * 0.5f); ((BaseState)this).FindModelChild("MeleePivot").rotation = Util.QuaternionSafeLookRotation(direction); } base.FireAttack(); } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).GetComponent<UnforgivenTracker>().GetTrackingTarget()) && ((EntityState)this).inputBank.skill3.down) { if (!hasFired) { FireAttack(); } ((EntityState)this).outer.SetNextStateToMain(); } } protected override void PlaySwingEffect() { Util.PlaySound(swingSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)swingEffectPrefab)) { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val); } } } protected override void PlayAttackAnimation() { if (!unforgivenController.isUnsheathed) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DrawStab", playbackRateParam, duration * 1.3f, duration * 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "Stab", playbackRateParam, duration * 1.3f, duration * 0.05f); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitPercentTime) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Tornado : BaseUnforgivenSkillState { public static float damageCoefficient = UnforgivenConfig.tornadoDamageCoefficient.Value; public static float procCoefficient = 1f; public static float baseDuration = 0.65f; public static float throwForce = 80f; public GameObject nado = UnforgivenAssets.nadoPrefab; private float duration; public override void OnEnter() { RefreshState(); base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); if (!unforgivenController.isUnsheathed) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DrawSlash", "Slash.playbackRate", duration, duration * 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash2", "Slash.playbackRate", duration, duration * 0.05f); } if (NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(UnforgivenBuffs.stabMaxStacksBuff); } Fire(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_001e: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("sfx_unforgiven_throw_nado", ((EntityState)this).gameObject); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); value.damageSource = (DamageSource)2; if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = nado, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = damageCoefficient * ((BaseState)this).damageStat, force = 800f, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, target = null }; ((FireProjectileInfo)(ref val)).speedOverride = throwForce; val.useSpeedOverride = false; val.damageTypeOverride = value; instance.FireProjectile(val); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } } namespace UnforgivenMod.Unforgiven.Content { public static class DamageTypes { public static ModdedDamageType Default; public static ModdedDamageType KnockAirborne; public static ModdedDamageType ResetDashes; internal static void Init() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Default = DamageAPI.ReserveDamageType(); KnockAirborne = DamageAPI.ReserveDamageType(); ResetDashes = DamageAPI.ReserveDamageType(); Hook(); } private static void Hook() { GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = damageReport.damageInfo; if (!Object.op_Implicit((Object)(object)damageReport.attackerBody) || !Object.op_Implicit((Object)(object)damageReport.victimBody)) { return; } HealthComponent victim = damageReport.victim; GameObject inflictor = damageInfo.inflictor; CharacterBody victimBody = damageReport.victimBody; EntityStateMachine component = ((Component)victimBody).GetComponent<EntityStateMachine>(); CharacterBody attackerBody = damageReport.attackerBody; GameObject gameObject = damageReport.attacker.gameObject; UnforgivenController component2 = ((Component)attackerBody).GetComponent<UnforgivenController>(); if (NetworkServer.active && Object.op_Implicit((Object)(object)component2) && attackerBody.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody")) { if (DamageAPI.HasModdedDamageType(damageInfo, KnockAirborne)) { ((Component)victimBody).gameObject.AddComponent<AirborneComponent>(); } if (DamageAPI.HasModdedDamageType(damageInfo, ResetDashes) && victimBody.HasBuff(UnforgivenBuffs.dashCooldownBuff)) { victimBody.RemoveOldestTimedBuff(UnforgivenBuffs.dashCooldownBuff); } } } } public static class UnforgivenAI { public static void Init(GameObject bodyPrefab, string masterName) { //IL_003a: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or