Decompiled source of Seamstress v1.4.3
plugins/SeamstressMod.dll
Decompiled 2 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.InteropServices; 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 HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using On.RoR2.Items; using On.RoR2.UI; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using SeamstressMod.Modules; using SeamstressMod.Modules.Achievements; using SeamstressMod.Modules.BaseStates; using SeamstressMod.Modules.Characters; using SeamstressMod.Seamstress; using SeamstressMod.Seamstress.Components; using SeamstressMod.Seamstress.Content; using SeamstressMod.Seamstress.SkillStates; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; [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: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("SeamstressMod")] [assembly: AssemblyProduct("SeamstressMod")] [assembly: AssemblyTitle("SeamstressMod")] [assembly: AssemblyInformationalVersion("1.0.0+063899a244dbd940c48d1994388e8e361a27cae2")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace SeamstressMod { 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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.kenko.Seamstress", "Seamstress", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class SeamstressPlugin : BaseUnityPlugin { public const string MODUID = "com.kenko.Seamstress"; public const string MODNAME = "Seamstress"; public const string MODVERSION = "1.0.0"; public const string DEVELOPER_PREFIX = "KENKO"; public static SeamstressPlugin instance; public static bool emotesInstalled => Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"); public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); private void Awake() { instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Language.Init(); new SeamstressSurvivor().Initialize(); new ContentPacks().Initialize(); } } } namespace SeamstressMod.Seamstress { public class SeamstressSurvivor : SurvivorBase<SeamstressSurvivor> { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Init <>9__70_0; internal void <Emotes>b__70_0(orig_Init orig) { orig.Invoke(); GameObject val = SeamstressAssets.mainAssetBundle.LoadAsset<GameObject>("seamstress_emoteskeleton"); CustomEmotesAPI.ImportArmature(characterPrefab, val, 0, true); } } public const string SEAMSTRESS_PREFIX = "KENKO_SEAMSTRESS_"; internal static GameObject characterPrefab; public static SkillDef snapBackSkillDef; public static SkillDef scepterFireScissor; public override string assetBundleName => "seamstressassets"; public override string bodyName => "SeamstressBody"; public override string masterName => "SeamstressMonsterMaster"; public override string modelPrefabName => "mdlSeamstress"; public override string displayPrefabName => "SeamstressDisplay"; public override string survivorTokenPrefix => "KENKO_SEAMSTRESS_"; public override BodyInfo bodyInfo { get { //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_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) BodyInfo bodyInfo = new BodyInfo(); bodyInfo.bodyName = bodyName; bodyInfo.bodyNameToken = "KENKO_SEAMSTRESS_NAME"; bodyInfo.subtitleNameToken = "KENKO_SEAMSTRESS_SUBTITLE"; bodyInfo.characterPortrait = assetBundle.LoadAsset<Texture>("texSeamstressIcon"); bodyInfo.bodyColor = new Color(31f / 51f, 11f / 51f, 11f / 51f); bodyInfo.sortPosition = 7f; bodyInfo.crosshair = CharacterAssets.LoadCrosshair("SimpleDot"); bodyInfo.podPrefab = null; bodyInfo.initialStateType = new SerializableEntityStateType(typeof(SeamstressSpawnState)); bodyInfo.maxHealth = 160f; bodyInfo.healthRegen = 1f; bodyInfo.armor = 0f; bodyInfo.damage = 12f; bodyInfo.damageGrowth = 0f; bodyInfo.healthGrowth = 48f; bodyInfo.jumpCount = 1; return bodyInfo; } } public override CustomRendererInfo[] customRendererInfos => new CustomRendererInfo[5] { new CustomRendererInfo { childName = "Model" }, new CustomRendererInfo { childName = "ScissorLModel" }, new CustomRendererInfo { childName = "ScissorRModel" }, new CustomRendererInfo { childName = "CrownModel" }, new CustomRendererInfo { childName = "HeartModel" } }; public override UnlockableDef characterUnlockableDef => SeamstressUnlockables.characterUnlockableDef; public override ItemDisplaysBase itemDisplays => new SeamstressItemDisplays(); 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() { SeamstressConfig.Init(); SeamstressUnlockables.Init(); base.InitializeCharacter(); SeamstressCrosshair.Init(assetBundle); DamageTypes.Init(); SeamstressStates.Init(); SeamstressTokens.Init(); SeamstressAssets.Init(assetBundle); SeamstressBuffs.Init(assetBundle); InitializeEntityStateMachines(); InitializeSkills(); InitializeSkins(); InitializeCharacterMaster(); AdditionalBodySetup(); characterPrefab = bodyPrefab; AddHooks(); } private void AdditionalBodySetup() { //IL_0017: 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_0032: Expected O, but got Unknown //IL_0032: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_005a: Expected O, but got Unknown AddHitboxes(); TempVisualEffectAPI.AddTemporaryVisualEffect(SeamstressAssets.sewnCdEffect, new EffectRadius(pee), new EffectCondition(tempAdd), ""); TempVisualEffectAPI.AddTemporaryVisualEffect(SeamstressAssets.sewnEffect, new EffectRadius(pee), new EffectCondition(tempAdd2), ""); bodyPrefab.AddComponent<SeamstressController>(); bodyPrefab.AddComponent<ScissorController>(); bodyPrefab.AddComponent<NeedleController>(); bodyPrefab.AddComponent<Tracker>(); static float pee(CharacterBody body) { return 2f * body.radius; } static bool tempAdd(CharacterBody body) { return body.HasBuff(SeamstressBuffs.ManipulatedCd); } static bool tempAdd2(CharacterBody body) { return body.HasBuff(SeamstressBuffs.Manipulated); } } public void AddHitboxes() { Prefabs.SetupHitBoxGroup(characterModelObject, "Sword", "SwordHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "SwordBig", "SwordHitboxBig"); Prefabs.SetupHitBoxGroup(characterModelObject, "Weave", "WeaveHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "WeaveBig", "WeaveHitboxBig"); Prefabs.SetupHitBoxGroup(characterModelObject, "Right", "RightScissorHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "Left", "LeftScissorHitbox"); } public override void InitializeEntityStateMachines() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) bodyPrefab.GetComponent<CharacterBody>().preferredInitialStateType = new SerializableEntityStateType(typeof(SeamstressSpawnState)); EntityStateMachine[] components = bodyPrefab.GetComponents<EntityStateMachine>(); foreach (EntityStateMachine val in components) { if (val.customName == "Body") { val.mainStateType = new SerializableEntityStateType(typeof(MainState)); } } EntityStateMachine val2 = bodyPrefab.AddComponent<EntityStateMachine>(); val2.initialStateType = new SerializableEntityStateType(typeof(SeamstressJump)); val2.mainStateType = new SerializableEntityStateType(typeof(SeamstressJump)); val2.customName = "Passive"; Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon"); Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon2"); } public override void InitializeSkills() { bodyPrefab.AddComponent<SeamstressPassive>(); Skills.CreateSkillFamilies(bodyPrefab); AddPassiveSkills(); AddPrimarySkills(); AddSecondarySkills(); AddUtilitySkills(); AddSpecialSkills(); if (SeamstressPlugin.scepterInstalled) { InitializeScepter(); } } private void AddPassiveSkills() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) SeamstressPassive component = bodyPrefab.GetComponent<SeamstressPassive>(); SkillLocator component2 = bodyPrefab.GetComponent<SkillLocator>(); component2.passiveSkill.enabled = false; component.blinkPassive = Skills.CreateSkillDef(new SkillDefInfo { skillName = "KENKO_SEAMSTRESS_PASSIVE_NAME", skillNameToken = "KENKO_SEAMSTRESS_PASSIVE_NAME", skillDescriptionToken = "KENKO_SEAMSTRESS_PASSIVE_DESCRIPTION", skillIcon = assetBundle.LoadAsset<Sprite>("texItHungersIcon"), keywordTokens = new string[1] { Tokens.detailsKeyword }, 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.blinkPassive); component.impGauge = Skills.CreateSkillDef(new SkillDefInfo { skillName = "KENKO_SEAMSTRESS_NEEDLE_NAME", skillNameToken = "KENKO_SEAMSTRESS_NEEDLE_NAME", skillDescriptionToken = "KENKO_SEAMSTRESS_NEEDLE_DESCRIPTION", skillIcon = assetBundle.LoadAsset<Sprite>("texImpTouchedIcon"), keywordTokens = new string[1] { Tokens.needlesKeyword }, 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.impGaugeSkillSlot.skillFamily, component.impGauge); } private void AddPrimarySkills() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) SteppedSkillDef val = Skills.CreateSkillDef<SteppedSkillDef>(new SkillDefInfo("Trim", "KENKO_SEAMSTRESS_PRIMARY_TRIM_NAME", "KENKO_SEAMSTRESS_PRIMARY_TRIM_DESCRIPTION", assetBundle.LoadAsset<Sprite>("texFlurryIcon"), new SerializableEntityStateType(typeof(Trim)))); val.stepCount = 3; val.stepGraceDuration = 1f; Skills.AddPrimarySkills(bodyPrefab, (SkillDef)val); SteppedSkillDef val2 = Skills.CreateSkillDef<SteppedSkillDef>(new SkillDefInfo("Flurry", "KENKO_SEAMSTRESS_PRIMARY_FLURRY_NAME", "KENKO_SEAMSTRESS_PRIMARY_FLURRY_DESCRIPTION", assetBundle.LoadAsset<Sprite>("texFlurryIcon"), new SerializableEntityStateType(typeof(Flurry)))); val2.stepCount = 2; val2.stepGraceDuration = 1f; Skills.AddPrimarySkills(bodyPrefab, (SkillDef)val2); } private void AddSecondarySkills() { //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) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Clip"; skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SECONDARY_CLIP_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SECONDARY_CLIP_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texClipIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Clip)); skillDefInfo.activationStateMachineName = "Weapon"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 6f; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = false; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.mustKeyPress = true; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = true; skillDefInfo.forceSprintDuringState = false; SkillDef val = Skills.CreateSkillDef(skillDefInfo); Skills.AddSecondarySkills(bodyPrefab, val); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "PlanarManipulation"; skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SECONDARY_PLANMAN_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SECONDARY_PLANMAN_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { Tokens.crushKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texPlanarManipulationIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Telekinesis)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 0.5f; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 0; skillDefInfo.stockToConsume = 0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = false; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.mustKeyPress = true; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; TrackingSkillDef trackingSkillDef = Skills.CreateSkillDef<TrackingSkillDef>(skillDefInfo); Skills.AddSecondarySkills(bodyPrefab, trackingSkillDef); } private void AddUtilitySkills() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "HeartDashSeamstress"; skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_UTILITY_HEARTDASH_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_UTILITY_HEARTDASH_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { Tokens.insatiableKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texGlimpseOfCorruptionIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(HealthCostDash)); skillDefInfo.activationStateMachineName = "Weapon"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 6f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = false; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; SkillDef val = Skills.CreateSkillDef(skillDefInfo); Skills.AddUtilitySkills(bodyPrefab, val); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "ParrySeamstress"; skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_UTILITY_PARRY_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_UTILITY_PARRY_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { Tokens.insatiableKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texGlimpseOfPurityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Parry)); skillDefInfo.activationStateMachineName = "Weapon"; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.baseRechargeInterval = 8f; 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 = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = true; skillDefInfo.forceSprintDuringState = false; SkillDef val2 = Skills.CreateSkillDef(skillDefInfo); Skills.AddUtilitySkills(bodyPrefab, val2); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "SnapBack"; skillDefInfo.skillNameToken = "SnapBack"; skillDefInfo.skillDescriptionToken = "Snapback to core"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texImpTouchedIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Snapback)); skillDefInfo.activationStateMachineName = "Body"; skillDefInfo.interruptPriority = (InterruptPriority)3; skillDefInfo.baseRechargeInterval = 0f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 0; skillDefInfo.requiredStock = 0; skillDefInfo.stockToConsume = 0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.mustKeyPress = true; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; snapBackSkillDef = Skills.CreateSkillDef(skillDefInfo); } private void AddSpecialSkills() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "FireSeamstress"; skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SPECIAL_FIRE_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SPECIAL_FIRE_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { Tokens.symbioticKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSkewerIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(FireScissor)); skillDefInfo.activationStateMachineName = "Weapon"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 14f; skillDefInfo.baseMaxStock = 2; skillDefInfo.rechargeStock = 2; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = true; skillDefInfo.forceSprintDuringState = false; SkillDef val = Skills.CreateSkillDef(skillDefInfo); Skills.AddSpecialSkills(bodyPrefab, val); } private void InitializeScepter() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "FireScepterSeamstress"; skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SPECIAL_SCEPTER_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SPECIAL_SCEPTER_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { Tokens.symbioticKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSkewerScepterIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(FireScissorScepter)); skillDefInfo.activationStateMachineName = "Weapon"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 14f; skillDefInfo.baseMaxStock = 2; skillDefInfo.rechargeStock = 2; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = true; skillDefInfo.forceSprintDuringState = false; scepterFireScissor = Skills.CreateSkillDef(skillDefInfo); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(scepterFireScissor, bodyName, (SkillSlot)3, 0); } public static Material CreateMaterial(AssetBundle assetBundle, string materialName, float emission, Color emissionColor, float normalStrength) { //IL_0073: 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) if (!Object.op_Implicit((Object)(object)SeamstressAssets.commandoMat)) { SeamstressAssets.commandoMat = Resources.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<CharacterModel>().baseRendererInfos[0].defaultMaterial; } Material val = Object.Instantiate<Material>(SeamstressAssets.commandoMat); Material val2 = assetBundle.LoadAsset<Material>(materialName); if (!Object.op_Implicit((Object)(object)val2)) { return SeamstressAssets.commandoMat; } ((Object)val).name = materialName; val.SetColor("_Color", val2.GetColor("_Color")); val.SetTexture("_MainTex", val2.GetTexture("_MainTex")); val.SetColor("_EmColor", emissionColor); val.SetFloat("_EmPower", emission); val.SetTexture("_EmTex", val2.GetTexture("_EmissionMap")); val.SetFloat("_NormalStrength", normalStrength); return val; } public static Material CreateMaterial(AssetBundle assetBundle, string materialName) { return CreateMaterial(assetBundle, materialName, 0f); } public static Material CreateMaterial(AssetBundle assetBundle, string materialName, float emission) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) return CreateMaterial(assetBundle, materialName, emission, Color.black); } public static Material CreateMaterial(AssetBundle assetBundle, string materialName, float emission, Color emissionColor) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) return CreateMaterial(assetBundle, materialName, emission, emissionColor, 0f); } public override void InitializeSkins() { //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) ModelSkinController val = ((Component)prefabCharacterModel).gameObject.AddComponent<ModelSkinController>(); ChildLocator component = ((Component)prefabCharacterModel).GetComponent<ChildLocator>(); RendererInfo[] baseRendererInfos = prefabCharacterModel.baseRendererInfos; List<SkinDef> list = new List<SkinDef>(); SkinDef val2 = SeamstressSkins.CreateSkinDef("DEFAULT_SKIN", assetBundle.LoadAsset<Sprite>("texMainSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject); val2.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshSeamstress", "meshScissorL", "meshScissorR", "meshSeamstressCrown", "meshHeart"); val2.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matSeamstress"); val2.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matScissors"); val2.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matScissors"); val2.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matSeamstress"); val2.rendererInfos[4].defaultMaterial = assetBundle.LoadAsset<Material>("matSeamstress"); list.Add(val2); SkinDef val3 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME", assetBundle.LoadAsset<Sprite>("texMonsoonBlue"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masterySkinUnlockableDef); val3.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshPrincess", "meshPrincessSwordL", "meshPrincessSwordR", "meshPrincessCrown", null); val3.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessBlue"); val3.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSword"); val3.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSword"); val3.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessBlueEmissions"); val3.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1] { new GameObjectActivation { gameObject = component.FindChildGameObject("HeartModel"), shouldActivate = false } }; SkinDef val4 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME2", assetBundle.LoadAsset<Sprite>("texMonsoonRed"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masterySkinUnlockableDef); val4.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshPrincess", "meshPrincessSwordL", "meshPrincessSwordR", "meshPrincessCrown", null); val4.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessRed"); val4.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSwordAlt"); val4.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSwordAlt"); val4.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessRedEmissions"); val4.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1] { new GameObjectActivation { gameObject = component.FindChildGameObject("HeartModel"), shouldActivate = false } }; SkinDef val5 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME3", assetBundle.LoadAsset<Sprite>("ravenIcon"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masteryTyphoonSkinUnlockableDef); val5.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshRaven", "meshShadowClawsL", "meshShadowClawsR", "meshRavenCrown", null); val5.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matRaven"); val5.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws"); val5.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws"); val5.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matRaven"); val5.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1] { new GameObjectActivation { gameObject = component.FindChildGameObject("HeartModel"), shouldActivate = false } }; SkinDef val6 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME4", assetBundle.LoadAsset<Sprite>("ravenIcon"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masteryTyphoonSkinUnlockableDef); val6.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshRavenAlt", "meshShadowClawsL", "meshShadowClawsR", "meshRavenCrownAlt", null); val6.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenAlt"); val6.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws"); val6.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws"); val6.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenAltEmission"); val6.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1] { new GameObjectActivation { gameObject = component.FindChildGameObject("HeartModel"), shouldActivate = false } }; list.Add(val3); list.Add(val4); list.Add(val5); list.Add(val6); val.skins = list.ToArray(); } public override void InitializeCharacterMaster() { SeamstressAI.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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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 //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown HUD.onHudTargetChangedGlobal += HUDSetup; HealthComponent.Heal += new hook_Heal(HealthComponent_Heal); CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays); CharacterModel.UpdateOverlayStates += new hook_UpdateOverlayStates(CharacterModel_UpdateOverlayStates); HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); LoadoutPanelController.Rebuild += new hook_Rebuild(LoadoutPanelController_Rebuild); GenericSkill.SetBonusStockFromBody += new hook_SetBonusStockFromBody(GenericSkill_SetBonusStockFromBody); ImmuneToDebuffBehavior.OverrideDot += new hook_OverrideDot(ImmuneToDebuffBehavior_OverrideDot); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); if (SeamstressPlugin.emotesInstalled) { Emotes(); } } private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody")) { SeamstressController component = ((Component)self.body).GetComponent<SeamstressController>(); AddOverlay(component.blue ? SeamstressAssets.insatiableOverlayMat2 : SeamstressAssets.insatiableOverlayMat, self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && !component.hasStartedInsatiable); if (self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && !component.hasStartedInsatiable) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val.duration = 0.6f; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.4f); val.animateShaderAlpha = true; val.destroyComponentOnEnd = true; val.originalMaterial = (component.blue ? SeamstressAssets.insatiableOverlayMat2 : SeamstressAssets.insatiableOverlayMat); } if (self.body.HasBuff(SeamstressBuffs.ParryStart)) { TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val2.duration = 0.4f; val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val2.animateShaderAlpha = true; val2.destroyComponentOnEnd = true; val2.originalMaterial = SeamstressAssets.parryMat; } } void AddOverlay(Material overlayMaterial, bool condition) { if (self.activeOverlayCount < CharacterModel.maxOverlays && condition) { Material[] currentOverlays = self.currentOverlays; CharacterModel obj = self; int activeOverlayCount = obj.activeOverlayCount; obj.activeOverlayCount = activeOverlayCount + 1; currentOverlays[activeOverlayCount] = overlayMaterial; } } } private bool CharacterModel_UpdateOverlayStates(orig_UpdateOverlayStates orig, CharacterModel self) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) bool flag = orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.body) || self.body.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody")) { return flag; } SeamstressController component = ((Component)self.body).GetComponent<SeamstressController>(); SetOverlayFlag(self.baseRendererInfos.Length, self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && !component.hasStartedInsatiable); return self.oldOverlays != self.activeOverlays || flag; void SetOverlayFlag(int index, bool condition) { if (condition) { CharacterModel obj = self; obj.activeOverlays |= 1 << index; } } } private bool ImmuneToDebuffBehavior_OverrideDot(orig_OverrideDot orig, InflictDotInfo inflictDotInfo) { //IL_0001: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) GameObject victimObject = inflictDotInfo.victimObject; CharacterBody val = ((victimObject != null) ? victimObject.GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val) && val.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody") && inflictDotInfo.dotIndex == Dots.SeamstressSelfBleed) { return false; } return orig.Invoke(inflictDotInfo); } private static void Emotes() { //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_0020: Expected O, but got Unknown object obj = <>c.<>9__70_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { orig.Invoke(); GameObject val2 = SeamstressAssets.mainAssetBundle.LoadAsset<GameObject>("seamstress_emoteskeleton"); CustomEmotesAPI.ImportArmature(characterPrefab, val2, 0, true); }; <>c.<>9__70_0 = val; obj = (object)val; } SurvivorCatalog.Init += (hook_Init)obj; } private static void LoadoutPanelController_Rebuild(orig_Rebuild orig, LoadoutPanelController self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (self.currentDisplayData.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody")) { return; } LanguageTextMeshController[] componentsInChildren = ((Component)self).gameObject.GetComponentsInChildren<LanguageTextMeshController>(); foreach (LanguageTextMeshController val in componentsInChildren) { if (Object.op_Implicit((Object)(object)val) && val.token == "LOADOUT_SKILL_MISC") { val.token = "Passive"; } } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0049: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) float num = 0f; if ((NetworkServer.active && self.alive) || !self.godMode || self.ospTimer <= 0f) { CharacterBody body = self.body; if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody")) { if (body.HasBuff(SeamstressBuffs.ParryStart) && damageInfo.damage > 0f) { body.RemoveBuff(SeamstressBuffs.ParryStart); if (!body.HasBuff(SeamstressBuffs.ParrySuccess)) { body.AddBuff(SeamstressBuffs.ParrySuccess); } body.AddTimedBuff(Buffs.Immune, 0.9f); damageInfo.rejected = true; } else if (body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && damageInfo.dotIndex != Dots.SeamstressSelfBleed) { SeamstressController component = ((Component)body).gameObject.GetComponent<SeamstressController>(); if (Object.op_Implicit((Object)(object)component) && !body.HasBuff(Buffs.HiddenInvincibility)) { if (damageInfo.damage >= self.combinedHealth && (Object)(object)body.skillLocator.utility.skillDef == (Object)(object)snapBackSkillDef) { body.skillLocator.utility.ExecuteIfReady(); } damageInfo.rejected = true; } } else if (body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff)) { num = body.healthComponent.barrier; if (num > 0f) { body.healthComponent.AddBarrier(0f - num); } } } } orig.Invoke(self, damageInfo); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody")) { if (num > 0f) { self.body.healthComponent.AddBarrier(num); } self.body.RecalculateStats(); } } private float HealthComponent_Heal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen = true) { //IL_0021: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody")) { amount *= 0.001f; } float num = orig.Invoke(self, amount, procChainMask, nonRegen); if (self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody") && Object.op_Implicit((Object)(object)((Component)self.body).GetComponent<SeamstressController>()) && self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff)) { if (self.health >= self.fullHealth) { self.AddBarrier(amount / 0.001f * 0.999f); } else { self.AddBarrier(num / 0.001f * 0.999f / 2f); } } return num; } public void GenericSkill_SetBonusStockFromBody(orig_SetBonusStockFromBody orig, GenericSkill self, int newBonusStockFromBody) { if ((!self.skillDef.dontAllowPastMaxStocks || !(self.skillDef.skillNameToken == "KENKO_SEAMSTRESS_SPECIAL_SCEPTER_NAME")) && !(self.skillDef.skillNameToken == "KENKO_SEAMSTRESS_SPECIAL_FIRE_NAME")) { orig.Invoke(self, newBonusStockFromBody); } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) if (sender.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody")) { return; } SeamstressController component = ((Component)sender).GetComponent<SeamstressController>(); HealthComponent component2 = ((Component)sender).GetComponent<HealthComponent>(); SkillLocator component3 = ((Component)sender).GetComponent<SkillLocator>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component3)) { float num = component2.fullCombinedHealth * sender.cursePenalty - (component2.health + component2.shield / 2f); float num2 = component2.fullHealth * 0.66f; if (sender.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && component3.utility.skillNameToken == "KENKO_SEAMSTRESS_UTILITY_PARRY_NAME") { args.baseDamageAdd += num2 * 0.04f + num * 0.04f; } else { args.baseDamageAdd += num * 0.04f; } } if (sender.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff)) { args.attackSpeedMultAdd += 0.2f; args.baseMoveSpeedAdd += 2f; } if (!sender.HasBuff(SeamstressBuffs.ScissorLeftBuff)) { args.attackSpeedMultAdd += 0.1f; } if (!sender.HasBuff(SeamstressBuffs.ScissorRightBuff)) { args.attackSpeedMultAdd += 0.1f; } if (Object.op_Implicit((Object)(object)sender.inventory) && sender.inventory.GetItemCount(Items.EquipmentMagazineVoid) != 0) { args.attackSpeedMultAdd += 0.1f * (float)sender.inventory.GetItemCount(Items.EquipmentMagazineVoid); } } internal static void HUDSetup(HUD hud) { if (Object.op_Implicit((Object)(object)hud.targetBodyObject) && (Object)(object)hud.targetMaster.bodyPrefab == (Object)(object)characterPrefab && ((NetworkBehaviour)hud.targetMaster).hasAuthority && !Object.op_Implicit((Object)(object)((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("CrosshairCanvas") .Find("SeamstressCrosshair"))) { GameObject val = Object.Instantiate<GameObject>(SeamstressCrosshair.seamstressCrosshair, ((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("CrosshairCanvas")); ((Object)val).name = "SeamstressCrosshair"; val.gameObject.GetComponent<HudElement>().targetBodyObject = hud.targetBodyObject; val.gameObject.GetComponent<HudElement>().targetCharacterBody = hud.targetBodyObject.GetComponent<CharacterBody>(); } } } } namespace SeamstressMod.Seamstress.SkillStates { public class Clip : BaseSeamstressSkillState { public GameObject clawSlash = SeamstressAssets.clawSlashEffect; public GameObject hitEffectPrefab = SeamstressAssets.scissorsHitImpactEffect; public GameObject swingEffectPrefab = SeamstressAssets.scissorsSlashComboEffect; public GameObject wideEffectPrefab = SeamstressAssets.wideSlashEffect; protected Animator animator; private OverlapAttack overlapAttack; private DamageType damageType = (DamageType)0; private ModdedDamageType moddedDamageType3 = DamageTypes.Empty; private ModdedDamageType moddedDamageType = DamageTypes.CutDamage; private float damageCoefficient = 0.65f; private float procCoefficient = 0.6f; private float pushForce = 0f; private Vector3 bonusForce = Vector3.zero; protected float stopwatch; private HitStopCachedState hitStopCachedState; private float hitPauseTimer; protected float hitStopDuration = 0.04f; private bool hasHopped; protected bool inHitPause; protected string playbackRateParam = "Slash.playbackRate"; protected string hitBoxString = "SwordBig"; private int snips; private int alternateSwings = 0; private float baseDuration = 0.75f; private float duration; private float firstSnip; private float secondSnip; private float snipInterval; private float lastSnip; private bool hasFired; private bool hasFired2; private bool noScissors; private bool inAir; private Vector3 storedVelocity; public override void OnEnter() { RefreshState(); if (seamstressController.blue) { clawSlash = SeamstressAssets.clawSlashEffect2; hitEffectPrefab = SeamstressAssets.scissorsHitImpactEffect2; swingEffectPrefab = SeamstressAssets.scissorsSlashComboEffect2; wideEffectPrefab = SeamstressAssets.wideSlashEffect2; } base.OnEnter(); baseDuration = 0.75f; snips = needleCount; if (!scissorRight || !scissorLeft) { noScissors = true; } if (noScissors) { hitBoxString = "Sword"; } animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; firstSnip = duration * 0.2f; secondSnip = duration * 0.4f; snipInterval = 0f; lastSnip = duration - firstSnip; if (!((EntityState)this).characterMotor.isGrounded) { inAir = true; } ((BaseState)this).StartAimMode(duration, false); PlayAttackAnimation(); if (inAir) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 6f); } } public override void FixedUpdate() { //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00cb: 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) base.FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { RemoveHitstop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; if (inAir && ((EntityState)this).isAuthority) { Vector3 velocity = ((EntityState)this).characterDirection.forward * ((BaseState)this).moveSpeedStat * Mathf.Lerp(3f, 1f, ((EntityState)this).age / duration); velocity.y = ((EntityState)this).characterMotor.velocity.y; ((EntityState)this).characterMotor.velocity = velocity; } } 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); } } if (stopwatch >= firstSnip && !hasFired) { hasFired = true; EnterAttack(); FireAttack(); } if (stopwatch >= secondSnip + snipInterval && snipInterval <= secondSnip && snips > 0) { EnterAttack(); FireAttack(); snips--; snipInterval += secondSnip / 5f; Util.PlaySound("Play_bandit2_m2_alt_throw", ((EntityState)this).gameObject); } if (stopwatch >= lastSnip && !hasFired2) { hasFired2 = true; EnterAttack(); FireAttack(); } if (stopwatch >= duration && snips == 0 && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } protected void ApplyHitstop() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0048: Unknown result type (might be due to invalid IL or missing references) if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateParam); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void RemoveHitstop() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } protected virtual void OnHitEnemyAuthority() { if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f); } hasHopped = true; } ApplyHitstop(); } private void EnterAttack() { if (noScissors) { Util.PlayAttackSpeedSound("Play_imp_attack", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } else { Util.PlayAttackSpeedSound("Play_bandit2_m2_impact", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } } protected virtual void PlaySwingEffect() { if (!Object.op_Implicit((Object)(object)clawSlash)) { Log.Error("Error, no effect?"); return; } Transform val = ((BaseState)this).FindModelChild("SwingCenter"); Transform val2 = ((BaseState)this).FindModelChild("SwingLeftSmall"); Transform val3 = ((BaseState)this).FindModelChild("SwingRightSmall"); Transform val4 = ((BaseState)this).FindModelChild("SwingCharAirCenter"); Transform val5 = ((BaseState)this).FindModelChild("SwingCharAirCenter2"); if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val2) || !Object.op_Implicit((Object)(object)val3) || !Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val4) || !Object.op_Implicit((Object)(object)val5)) { return; } if (noScissors) { if (hasFired && !hasFired2) { if (alternateSwings == 0) { Object.Instantiate<GameObject>(clawSlash, val2); alternateSwings = 1; } else if (alternateSwings == 1) { Object.Instantiate<GameObject>(clawSlash, val3); alternateSwings = 0; } } else if (hasFired2) { Object.Instantiate<GameObject>(clawSlash, val3); } return; } if (inAir) { if (hasFired && !hasFired2) { if (alternateSwings == 0) { Object.Instantiate<GameObject>(wideEffectPrefab, val5); alternateSwings = 1; } else if (alternateSwings == 1) { Object.Instantiate<GameObject>(wideEffectPrefab, val4); alternateSwings = 0; } } else if (hasFired2) { Object.Instantiate<GameObject>(wideEffectPrefab, val4); } return; } if (hasFired && !hasFired2) { if (alternateSwings == 0) { Object.Instantiate<GameObject>(clawSlash, val2); alternateSwings = 1; } else if (alternateSwings == 1) { Object.Instantiate<GameObject>(clawSlash, val3); alternateSwings = 0; } } else if (hasFired2) { Object.Instantiate<GameObject>(clawSlash, val3); } Object.Instantiate<GameObject>(swingEffectPrefab, val); } protected virtual void FireAttack() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_001a: 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_0024: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) hasHopped = false; overlapAttack = new OverlapAttack(); overlapAttack.damageType = DamageTypeCombo.op_Implicit(damageType); if (isInsatiable) { DamageAPI.AddModdedDamageType(overlapAttack, moddedDamageType); } DamageAPI.AddModdedDamageType(overlapAttack, DamageTypes.SeamstressLifesteal); overlapAttack.attacker = ((EntityState)this).gameObject; overlapAttack.inflictor = ((EntityState)this).gameObject; overlapAttack.teamIndex = ((BaseState)this).GetTeam(); overlapAttack.damage = damageCoefficient * ((BaseState)this).damageStat; overlapAttack.procCoefficient = procCoefficient; overlapAttack.hitEffectPrefab = hitEffectPrefab; overlapAttack.forceVector = bonusForce; overlapAttack.pushAwayForce = pushForce; overlapAttack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitBoxString); overlapAttack.isCrit = ((BaseState)this).RollCrit(); 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("SwingPivot").rotation = Util.QuaternionSafeLookRotation(direction); if (overlapAttack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } PlaySwingEffect(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration) { return (InterruptPriority)0; } return (InterruptPriority)2; } private void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Additive", "Clip", "Slash.playbackRate", duration * 1.7f, 0.1f * duration); } public override void OnExit() { ((EntityState)this).OnExit(); } } public class FireScissor : BaseSeamstressSkillState { public GameObject scissorFiringPrefab = SeamstressAssets.impDashEffect; private GameObject projectilePrefab; public static float baseDuration = 0.5f; public static float damageCoefficient = 1f; public static float procCoefficient = 1f; public static string attackSoundString = "Play_imp_overlord_attack1_throw"; private Animator modelAnimator; private float duration; private string chosenAnim = "FireScissorL"; private bool hasFired; private Ray aimRay; private string fireString; protected virtual bool sceptered => false; public override void OnEnter() { //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_006b: Unknown result type (might be due to invalid IL or missing references) RefreshState(); if (seamstressController.blue) { scissorFiringPrefab = SeamstressAssets.impDashEffect2; } base.OnEnter(); Util.PlaySound("Play_item_lunar_specialReplace_explode", ((EntityState)this).gameObject); ((Component)((EntityState)this).characterBody).GetComponent<ScissorController>().isRight = true; duration = baseDuration / ((BaseState)this).attackSpeedStat; aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { if (scissorRight && scissorLeft) { chosenAnim = "FireScissorL"; } else if (scissorRight && !scissorLeft) { chosenAnim = "FireScissorR"; } else if (scissorLeft && !scissorRight) { chosenAnim = "FireScissorL"; } else { chosenAnim = "FireScissorL"; } ((EntityState)this).PlayCrossfade("Gesture, Additive", chosenAnim, "Slash.playbackRate", duration, 0.05f); } } public override void OnExit() { RefreshState(); ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (Object.op_Implicit((Object)(object)modelAnimator) && !hasFired) { if (chosenAnim == "FireScissorL") { projectilePrefab = seamstressController.scissorLPrefab; fireString = "SwingRightSmall"; } else { projectilePrefab = seamstressController.scissorRPrefab; fireString = "SwingLeftSmall"; } float num = (sceptered ? 1.5f : 2.5f); ((Component)projectilePrefab.transform.GetChild(0).GetChild(5)).gameObject.GetComponent<PickupFilterComponent>().pickupTimer = Mathf.Max(0.5f, num * ((EntityState)this).skillLocator.special.cooldownScale - ((EntityState)this).skillLocator.special.flatCooldownReduction); if (isInsatiable) { projectilePrefab.GetComponent<ModdedDamageTypeHolderComponent>().Add(DamageTypes.CutDamage); } else { projectilePrefab.GetComponent<ModdedDamageTypeHolderComponent>().Remove(DamageTypes.CutDamage); } Fire(aimRay, fireString); hasFired = true; } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire(Ray aimRay, string muzzleName) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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) //IL_0088: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Transform val = ((BaseState)this).FindModelChild(muzzleName); if (Object.op_Implicit((Object)(object)val)) { EffectData val2 = new EffectData(); val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val2.origin = val.position; val2.scale = 0.5f; EffectManager.SpawnEffect(scissorFiringPrefab, val2, true); } if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f); } } 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 FireScissorScepter : FireScissor { protected override bool sceptered => true; } public class Flurry : BaseMeleeAttack { private GameObject swingInstance; public override void OnEnter() { //IL_0015: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: 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) RefreshState(); hitboxGroupName = "Sword"; damageType = (DamageType)0; damageTotal = 1.4f; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1.1f; baseScissorDuration = 2f; attackStartPercentTime = 0.2f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 3.5f; swingSoundString = "sfx_seamstress_swing"; hitSoundString = ""; hitEffectPrefab = (seamstressController.blue ? SeamstressAssets.scissorsHitImpactEffect2 : SeamstressAssets.scissorsHitImpactEffect); swingEffectPrefab = (seamstressController.blue ? SeamstressAssets.clawSlashEffect2 : SeamstressAssets.clawSlashEffect); bonusSwingEffectPrefab = (seamstressController.blue ? SeamstressAssets.scissorsSlashEffect2 : SeamstressAssets.scissorsSlashEffect); muzzleString = ((swingIndex % 2 == 0) ? "SwingLeftSmall" : "SwingRightSmall"); buffer = false; if (isInsatiable) { moddedDamageTypeHolder.Add(DamageTypes.CutDamage); moddedDamageTypeHolder.Add(DamageTypes.GainNeedles); } moddedDamageTypeHolder.Add(DamageTypes.SeamstressLifesteal); scissorHit = true; if (muzzleString == "SwingLeftSmall" && !scissorRight) { scissorHit = false; } if (muzzleString == "SwingRightSmall" && !scissorLeft) { scissorHit = false; } impactSound = SeamstressAssets.scissorsHitSoundEvent.index; base.OnEnter(); } public override void FixedUpdate() { base.FixedUpdate(); } 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("SwingPivot").rotation = Util.QuaternionSafeLookRotation(direction); if (attack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } } protected override void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Additive", (swingIndex % 2 == 0) ? "Slash1" : "Slash2", "Slash.playbackRate", duration, 0.1f * duration); } protected override void PlaySwingEffect() { if (Object.op_Implicit((Object)(object)swingEffectPrefab)) { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { swingInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val); } } } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)swingInstance)) { Object.Destroy((Object)(object)swingInstance); } } } public class HealthCostDash : BaseSeamstressSkillState { public float baseDuration = 0.8f; public float dashPower = 6f; public float damageCoefficient = 4f; public GameObject uppercutEffect = SeamstressAssets.uppercutEffect; public GameObject projectilePrefab = SeamstressAssets.heartPrefab; public GameObject scissorHitImpactEffect = SeamstressAssets.scissorsHitImpactEffect; public GameObject bloodExplosionEffect = SeamstressAssets.bloodExplosionEffect; public GameObject impDashEffect = SeamstressAssets.impDashEffect; public GameObject bloodSplatterEffect = SeamstressAssets.bloodSplatterEffect; public GameObject smallBlinkEffect = SeamstressAssets.smallBlinkEffect; public Color mainColor = SeamstressAssets.coolRed; public Material destealthMaterial = SeamstressAssets.destealthMaterial; private Vector3 dashVector; private OverlapAttack attack; private List<HurtBox> victimsStruck = new List<HurtBox>(); protected string hitBoxString = "Sword"; private bool hasHit; private bool hasDelayed; public override void OnEnter() { //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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) RefreshState(); if (seamstressController.blue) { uppercutEffect = SeamstressAssets.uppercutEffect2; projectilePrefab = SeamstressAssets.heartPrefab2; scissorHitImpactEffect = SeamstressAssets.scissorsHitImpactEffect2; bloodExplosionEffect = SeamstressAssets.bloodExplosionEffect2; impDashEffect = SeamstressAssets.impDashEffect2; bloodSplatterEffect = SeamstressAssets.bloodSplatterEffect2; smallBlinkEffect = SeamstressAssets.smallBlinkEffect2; mainColor = Color.cyan; destealthMaterial = SeamstressAssets.destealthMaterial2; } base.OnEnter(); dashVector = ((EntityState)this).inputBank.aimDirection; ((EntityState)this).characterMotor.disableAirControlUntilCollision = false; Transform modelTransform = ((EntityState)this).GetModelTransform(); Animator component = ((Component)modelTransform).GetComponent<Animator>(); if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)destealthMaterial)) { TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((EntityState)this).gameObject); val.duration = 1.2f; val.destroyComponentOnEnd = true; val.originalMaterial = destealthMaterial; val.inspectorCharacterModel = ((Component)component).gameObject.GetComponent<CharacterModel>(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.animateShaderAlpha = true; } ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).PlayCrossfade("FullBody, Override", "RipHeart", "Dash.playbackRate", baseDuration / ((BaseState)this).attackSpeedStat * 1.8f, baseDuration / ((BaseState)this).attackSpeedStat * 0.05f); Util.PlayAttackSpeedSound("Play_imp_overlord_attack2_tell", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); } public override void FixedUpdate() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: 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_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Expected O, but got Unknown base.FixedUpdate(); if (!hasDelayed) { ((EntityState)this).characterMotor.velocity.y = 0f; } if (((EntityState)this).fixedAge > 0.5f / ((BaseState)this).attackSpeedStat && !hasDelayed) { Util.PlaySound("sfx_seamstress_dash", ((EntityState)this).gameObject); Util.PlaySound("sfx_seamstress_chains", ((EntityState)this).gameObject); hasDelayed = true; attack = new OverlapAttack(); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32); attack.procCoefficient = 1f; attack.teamIndex = ((BaseState)this).GetTeam(); attack.isCrit = ((BaseState)this).RollCrit(); attack.forceVector = Vector3.up * 2000f; attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitBoxString); attack.hitEffectPrefab = scissorHitImpactEffect; EffectManager.SpawnEffect(bloodExplosionEffect, new EffectData { origin = ((EntityState)this).transform.position, rotation = Quaternion.identity, scale = 0.5f }, false); if (isInsatiable) { DamageAPI.AddModdedDamageType(attack, DamageTypes.CutDamage); } DamageAPI.AddModdedDamageType(attack, DamageTypes.SeamstressLifesteal); EffectData val = new EffectData { origin = ((EntityState)this).characterBody.corePosition, rotation = Util.QuaternionSafeLookRotation(dashVector), scale = 3f }; EffectManager.SpawnEffect(impDashEffect, val, false); EffectManager.SpawnEffect(smallBlinkEffect, val, false); ((EntityState)this).characterMotor.velocity.y = 0f; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity += dashVector * (dashPower * (((BaseState)this).moveSpeedStat + 1f)); Vector3 val2 = ((EntityState)this).transform.localPosition; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, Vector3.one, ref val3, 10f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { val2 = ((RaycastHit)(ref val3)).point; } EffectManager.SpawnEffect(bloodSplatterEffect, new EffectData { origin = val2, rotation = Quaternion.identity, color = Color32.op_Implicit(mainColor) }, false); seamstressController.snapBackPosition = ((EntityState)this).characterBody.corePosition; Vector3 corePosition = ((EntityState)this).characterBody.corePosition; if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(SeamstressBuffs.SeamstressInsatiableBuff, 12f); ((EntityState)this).gameObject.AddComponent<SeamstressBleedVisualController>(); } GameObject val4 = Object.Instantiate<GameObject>(projectilePrefab, corePosition, Quaternion.identity); ProjectileController component = val4.GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)component)) { component.owner = ((EntityState)this).gameObject; component.Networkowner = ((EntityState)this).gameObject; } val4.GetComponent<TeamFilter>().teamIndex = ((EntityState)this).GetComponent<TeamComponent>().teamIndex; if (NetworkServer.active) { NetworkServer.Spawn(val4); } } if (!((EntityState)this).isAuthority || !hasDelayed) { return; } ((EntityState)this).characterDirection.forward = dashVector; ((EntityState)this).characterBody.isSprinting = true; if (attack.Fire(victimsStruck)) { hasHit = true; Transform val5 = ((BaseState)this).FindModelChild("UpperCut"); if (Object.op_Implicit((Object)(object)val5)) { Object.Instantiate<GameObject>(uppercutEffect, val5); } ((EntityState)this).characterMotor.velocity = Vector3.zero; ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f); ((EntityState)this).outer.SetNextStateToMain(); } if (((EntityState)this).fixedAge >= baseDuration && hasDelayed) { EffectData val6 = new EffectData { origin = ((EntityState)this).characterBody.corePosition, rotation = Util.QuaternionSafeLookRotation(dashVector), scale = 3f }; EffectManager.SpawnEffect(impDashEffect, val6, false); ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //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) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!hasHit) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.2f; } ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).gameObject, SeamstressSurvivor.snapBackSkillDef, (SkillOverridePriority)4); } 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)7; } } public class HeartSpawnState : BaseState { public static float duration = 0.01f; public static string enterSoundString = "Play_bleedOnCritAndExplode_impact"; public float fixedAgeFixed; public override void OnEnter() { ((BaseState)this).OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); ((Component)((BaseState)this).FindModelChild("ChargeUpFX")).gameObject.SetActive(true); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); fixedAgeFixed += Time.fixedDeltaTime; if (fixedAgeFixed >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new HeartStandBy()); } } } public class HeartStandBy : BaseState { public GameObject chain = SeamstressAssets.chainToHeart; public static AnimationCurve yankSuitabilityCurve; private CharacterBody ownerBody; private SeamstressController seamstressController; private GameObject owner; private float snapBackDelay; private bool hasFired; private bool splat; private static float bleedInterval = 0.2f; private float bleedTimer; public override void OnEnter() { ((BaseState)this).OnEnter(); splat = false; ProjectileController component = ((EntityState)this).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)component)) { owner = component.owner; } ((EntityState)this).PlayAnimation("Base", "SpawnToIdle"); Util.PlaySound("Play_treeBot_R_yank", owner); seamstressController = owner.GetComponent<SeamstressController>(); ownerBody = owner.GetComponent<CharacterBody>(); if (seamstressController.blue) { chain = SeamstressAssets.chainToHeart2; } ((Behaviour)chain.GetComponent<DestroyOnCondition>()).enabled = true; chain.GetComponent<DestroyOnCondition>().ownerBody = ownerBody; } public override void FixedUpdate() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00bd: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)ownerBody) && ownerBody.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff)) { HandleBleed(); if (!hasFired) { hasFired = true; ChainUpdate(12f); } } else if (Object.op_Implicit((Object)(object)ownerBody) && !ownerBody.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && hasFired) { if (!splat) { splat = true; Vector3 val = ownerBody.corePosition - ((EntityState)this).transform.position; snapBackDelay = ((Vector3)(ref val)).magnitude / 10f; snapBackDelay = Mathf.Clamp(snapBackDelay, 0.2f, 1f); ((Behaviour)chain.GetComponent<DestroyOnCondition>()).enabled = false; ChainUpdate(snapBackDelay); } snapBackDelay -= Time.fixedDeltaTime; if (snapBackDelay <= 0.2f) { ((EntityState)this).outer.SetNextStateToMain(); } } } private void HandleBleed() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e5: Expected O, but got Unknown bleedTimer += Time.fixedDeltaTime; if (bleedTimer >= bleedInterval) { bleedTimer = 0f; if (NetworkServer.active) { DamageInfo val = new DamageInfo { damage = (ownerBody.healthComponent.fullCombinedHealth - (ownerBody.healthComponent.fullCombinedHealth - (ownerBody.healthComponent.health + ownerBody.healthComponent.shield))) * 0.02f, damageType = DamageTypeCombo.op_Implicit((DamageType)67108931), dotIndex = (DotIndex)0, position = ownerBody.corePosition, attacker = ((EntityState)this).gameObject, procCoefficient = 0f, crit = false, damageColorIndex = (DamageColorIndex)2 }; ownerBody.healthComponent.TakeDamage(val); } } } private void ChainUpdate(float num) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_002d: Expected O, but got Unknown Vector3 position = ((EntityState)this).transform.position; EffectData val = new EffectData { scale = 1f, origin = position, genericFloat = num }; val.SetHurtBoxReference(owner); EffectManager.SpawnEffect(chain, val, true); } public override void OnExit() { if ((Object)(object)ownerBody != (Object)null) { ownerBody = null; } EntityState.Destroy((Object)(object)((EntityState)this).gameObject); ((EntityState)this).OnExit(); } } public class MainState : GenericCharacterMain { private Animator animator; private SeamstressController seamCom; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; seamCom = ((EntityState)this).GetComponent<SeamstressController>(); } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } } public override void ProcessJump() { //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Expected O, but got Unknown //IL_01f4: 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_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown //IL_0212: 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_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Expected O, but got Unknown //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: 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_0234: Unknown result type (might be due to invalid IL or missing references) if (!((BaseCharacterMain)this).hasCharacterMotor || !seamCom.blinkReady || ((EntityState)this).healthComponent.isInFrozenState) { return; } bool flag = false; bool flag2 = false; if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(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 (itemCount > 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)itemCount / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (((EntityState)this).inputBank.moveVector == Vector3.zero) { if (layerIndex >= 0) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } else { layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("FullBody, Override"); Vector3 normalized = ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).normalized; Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : normalized); Vector3 val2 = Vector3.Cross(Vector3.up, val); float num6 = Vector3.Dot(normalized, val); float num7 = Vector3.Dot(normalized, val2); ((BaseCharacterMain)this).modelAnimator.SetFloat("dashF", num6); ((BaseCharacterMain)this).modelAnimator.SetFloat("dashR", num7); ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Dash", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, false); } 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 }, false); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, false); } } } public class Parry : BaseSeamstressSkillState { public static NetworkSoundEventDef parrySoundDef = SeamstressAssets.parrySuccessSoundEvent; public static string enterSoundString = "Play_bandit2_m2_impact"; public static float duration = 0.4f; public static float attackDelay = 0.4f; public static float invulnDuration = 0.5f; public override void OnEnter() { RefreshState(); base.OnEnter(); Util.PlaySound(enterSoundString, ((EntityState)this).gameObject); if (NetworkServer.active) { CleanBuffsServer(); ((EntityState)this).characterBody.AddBuff(SeamstressBuffs.ParryStart); } ((EntityState)this).PlayCrossfade("FullBody, Override", "Parry", "Slash.playbackRate", duration * 1.5f, duration * 0.05f); } public override void FixedUpdate() { base.FixedUpdate(); bool flag = ((EntityState)this).characterBody.HasBuff(SeamstressBuffs.ParrySuccess); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration && flag) { DoAttackServer(); ((EntityState)this).outer.SetNextState((EntityState)(object)new ParryDash()); } else if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration && !flag) { GenericSkill utility = ((EntityState)this).skillLocator.utility; utility.rechargeStopwatch += 0.5f * ((EntityState)this).skillLocator.utility.cooldownRemaining; ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { CleanBuffsServer(); ((EntityState)this).OnExit(); } private void CleanBuffsServer() { if (NetworkServer.active) { if (((EntityState)this).characterBody.HasBuff(SeamstressBuffs.ParryStart)) { ((EntityState)this).characterBody.RemoveBuff(SeamstressBuffs.ParryStart); } if (((EntityState)this).characterBody.HasBuff(SeamstressBuffs.ParrySuccess)) { ((EntityState)this).characterBody.RemoveBuff(SeamstressBuffs.ParrySuccess); } } } private void DoAttackServer() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(SeamstressBuffs.SeamstressInsatiableBuff, 8f, 1); CleanBuffsServer(); if (Object.op_Implicit((Object)(object)parrySoundDef)) { EffectManager.SimpleSoundEffect(parrySoundDef.index, ((EntityState)this).characterBody.corePosition, true); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing refere