Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of UrgotMod v1.2.6
UrgotMod.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Captain.Weapon; using EntityStates.Commando.CommandoWeapon; using EntityStates.Huntress; using HG; using HG.BlendableTypes; using IL.RoR2; using KinematicCharacterController; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Serialization; using UnityEngine.UI; using UrgotMod; using UrgotMod.Controllers; using UrgotMod.Modules; using UrgotMod.Modules.Orbs; using UrgotMod.Modules.Survivors; using UrgotMod.SkillStates; using UrgotMod.SkillStates.BaseStates; using UrgotMod.SkillStates.Emotes; using UrgotMod.SkillStates.Keystone; using UrgotMod.States; using UrgotMod.States.Emotes; using UrgotMod.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UrgotMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.2.6.0")] [assembly: AssemblyInformationalVersion("1.2.6")] [assembly: AssemblyProduct("UrgotMod")] [assembly: AssemblyTitle("UrgotMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.6.0")] [module: UnverifiableCode] public class FBDSkillOverrideController : MonoBehaviour { public SkillDef FBDSkillDef; public SkillDef NoMercySkillDef = new SkillDef { skillName = "URGOT_SPECIAL2_NAME", skillNameToken = "rahhhhhhhhhhhh", skillDescriptionToken = "yes the steak on boss execute is balanced", icon = Assets.mainAssetBundle.LoadAsset<Sprite>("urgot_rrecast"), activationState = new SerializableEntityStateType(typeof(NoMercy)), activationStateMachineName = "Weapon", baseMaxStock = 1, baseRechargeInterval = 0.5f, beginSkillCooldownOnSkillEnd = true, canceledFromSprinting = false, forceSprintDuringState = false, fullRestockOnAssign = true, interruptPriority = (InterruptPriority)2, resetCooldownTimerOnUse = false, isCombatSkill = true, mustKeyPress = false, cancelSprintingOnActivation = false, rechargeStock = 1, requiredStock = 1, stockToConsume = 1 }; private bool _canActivateNoMercy; private float _eTime; public bool mayExecute; private SkillLocator skillLocator; private GenericSkill specialSkill; private bool isOverridden; public bool canActivateNoMercy { get { return _canActivateNoMercy; } set { _canActivateNoMercy = value; UpdateSkillOverride(); } } public float eTime { get { if (!(_eTime < 5f) || !(_eTime > 0f)) { return 5f; } return _eTime; } set { _eTime = value; } } private void Start() { skillLocator = ((Component)this).GetComponent<SkillLocator>(); if ((Object)(object)skillLocator != (Object)null) { specialSkill = skillLocator.special; } } public void UpdateSkillOverride() { FBDSkillDef = Skills.skillDefs.Find((SkillDef SkillDef) => SkillDef.skillName == "URGOT_SPECIAL_NAME"); if (canActivateNoMercy && !isOverridden) { OverrideToNoMercy(); } else if (!canActivateNoMercy && isOverridden) { RestoreToFBD(); } } private void OverrideToNoMercy() { if ((Object)(object)specialSkill == (Object)null || (Object)(object)NoMercySkillDef == (Object)null) { UrgotPlugin.Logger.LogMessage((object)(((Object)(object)specialSkill == (Object)null) ? "Could not get special Skill" : "NoMercy skillDef is null")); } else if ((Object)(object)specialSkill.skillDef == (Object)(object)FBDSkillDef) { specialSkill.SetSkillOverride((object)this, NoMercySkillDef, (SkillOverridePriority)4); specialSkill.stock = 1; specialSkill.rechargeStopwatch = 0f; isOverridden = true; } else { UrgotPlugin.Logger.LogMessage((object)$"Special skillDef is not equal to {FBDSkillDef}"); } } private void RestoreToFBD() { if ((Object)(object)specialSkill == (Object)null || (Object)(object)FBDSkillDef == (Object)null) { UrgotPlugin.Logger.LogMessage((object)(((Object)(object)specialSkill == (Object)null) ? "Could not get special Skill" : "FBD skillDef is null")); return; } specialSkill.UnsetSkillOverride((object)this, NoMercySkillDef, (SkillOverridePriority)4); isOverridden = false; } public void SetNoMercyCondition(bool condition) { canActivateNoMercy = condition; } } internal enum UrgotCameraParams { DEFAULT, EMOTE } public enum AnimationLayer { Base, FullBody, Gesture } public static class AnimationLayerNames { private static readonly Dictionary<AnimationLayer, string> layerNames = new Dictionary<AnimationLayer, string> { { AnimationLayer.Base, "Base" }, { AnimationLayer.FullBody, "FullBody, Override" }, { AnimationLayer.Gesture, "Gesture, Override" } }; public static string GetLayerName(this AnimationLayer layer) { if (!layerNames.TryGetValue(layer, out var value)) { return layer.ToString(); } return value; } } internal class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal string bodyNameToClone = "Commando"; internal Texture characterPortrait; internal GameObject crosshair; internal GameObject podPrefab; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen; internal float regenGrowth; internal float shield; internal float shieldGrowth; internal float moveSpeed = 7f; internal float moveSpeedGrowth; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth; internal float damage = 12f; internal float damageGrowth; internal float attackSpeed = 1f; internal float attackSpeedGrowth; internal float armor; internal float armorGrowth; internal float crit = 1f; internal float critGrowth; internal int jumpCount = 1; internal Color bodyColor = Color.grey; internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f); internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f); internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f); } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public string[] keywordTokens = new string[0]; public Sprite skillIcon; public SerializableEntityStateType activationState; public InterruptPriority interruptPriority; public string activationStateMachineName; public float baseRechargeInterval; public int baseMaxStock = 1; public int rechargeStock = 1; public int requiredStock = 1; public int stockToConsume = 1; public bool isCombatSkill = true; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool cancelSprintingOnActivation = true; public bool beginSkillCooldownOnSkillEnd; public bool fullRestockOnAssign = true; public bool resetCooldownTimerOnUse; public bool mustKeyPress; public SkillDefInfo() { } public SkillDefInfo(string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = true, bool slayer = false, bool poisonous = false) { //IL_0060: 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_0071: Unknown result type (might be due to invalid IL or missing references) skillName = skillNameToken; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; this.skillIcon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; interruptPriority = (InterruptPriority)0; isCombatSkill = true; baseRechargeInterval = 0f; requiredStock = 0; stockToConsume = 0; cancelSprintingOnActivation = !agile; if (agile) { keywordTokens = new string[1] { "KEYWORD_AGILE" }; } if (slayer) { keywordTokens = new string[1] { "KEYWORD_SLAYER" }; } } } public enum HUDPosition { Bottom, BottomLeft, Left, Right, Custom } public enum Keywords { poison, rapidRegen, agile, percentHP, sonicBoom, weak, heavy, freezing, stunning, expose, shocking, slayer, superbleed, ignite, weakpoint, activeReload, voidCorruption, autoAttack } namespace UrgotMod { public class MenuSound : MonoBehaviour { private uint playID; private uint playID2; private void OnDestroy() { if (playID != 0) { AkSoundEngine.StopPlayingID(playID); } if (playID2 != 0) { AkSoundEngine.StopPlayingID(playID2); } } private void OnEnable() { ((MonoBehaviour)this).Invoke("PlayVO", 1f); ((MonoBehaviour)this).Invoke("PlaySFX", 0.05f); } private void PlayVO() { if (Config.voiceLines.Value) { UrgotPlugin.Logger.LogMessage((object)"menus voiceline null check"); playID = Util.PlaySound("menu", ((Component)this).gameObject); } } private void PlaySFX() { playID2 = Util.PlaySound("menuSFX", ((Component)this).gameObject); } } [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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.DogWithWine.Urgot", "Urgot", "1.2.5")] public class UrgotPlugin : BaseUnityPlugin { public const string DEVELOPER_PREFIX = "URGOT"; public const string MODNAME = "Urgot"; public const string MODUID = "com.DogWithWine.Urgot"; public const string MODVERSION = "1.2.5"; public static UrgotPlugin instance; public static ModdedDamageType urgotDamage; internal List<SurvivorBase> Survivors = new List<SurvivorBase>(); internal static ManualLogSource Logger; private EchoingFlamesIndicator echoingFlamesindicator; private void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) Logger = ((BaseUnityPlugin)this).Logger; instance = this; try { urgotDamage = DamageAPI.ReserveDamageType(); Assets.Initialize(); Config.ReadConfig(); CameraParams.InitializeParams(); UrgotMod.Modules.States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); new Urgot().Initialize(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; Hook(); } catch (Exception ex) { Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private void Hook() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); PickupPickerController.FixedUpdateServer += new hook_FixedUpdateServer(PickupPickerController_FixedUpdateServer); HUD.Awake += new hook_Awake(HUD_Awake); HUD.Update += new hook_Update(HUD_Update); HUD.onHudTargetChangedGlobal += HUD_onHudTargetChangedGlobal; } private void HUD_onHudTargetChangedGlobal(HUD obj) { if (Object.op_Implicit((Object)(object)obj) && Object.op_Implicit((Object)(object)obj.targetBodyObject) && Object.op_Implicit((Object)(object)echoingFlamesindicator)) { EchoingFlamesComponent component = obj.targetBodyObject.GetComponent<EchoingFlamesComponent>(); CharacterBody component2 = obj.targetBodyObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2)) { echoingFlamesindicator.characterBodyC = component2; } if (Object.op_Implicit((Object)(object)component)) { ((Component)echoingFlamesindicator).gameObject.SetActive(true); echoingFlamesindicator.source = component; } else { ((Component)echoingFlamesindicator).gameObject.SetActive(false); echoingFlamesindicator.source = null; } } } private void HUD_Update(orig_Update orig, HUD self) { if (Object.op_Implicit((Object)(object)self.targetBodyObject) && !Object.op_Implicit((Object)(object)echoingFlamesindicator.characterBodyC)) { echoingFlamesindicator.characterBodyC = self.targetBodyObject.GetComponent<CharacterBody>(); } orig.Invoke(self); } private void HUD_Awake(orig_Awake orig, HUD self) { CreateEchoingFlamesIndicator(self); orig.Invoke(self); } private void CreateEchoingFlamesIndicator(HUD hud) { //IL_009e: 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_00c8: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)echoingFlamesindicator) && Object.op_Implicit((Object)(object)hud) && Object.op_Implicit((Object)(object)hud.mainUIPanel)) { echoingFlamesindicator = hud.mainUIPanel.GetComponentInChildren<EchoingFlamesIndicator>(); if (!Object.op_Implicit((Object)(object)echoingFlamesindicator)) { GameObject val = Object.Instantiate<GameObject>(Assets.mainAssetBundle.LoadAsset<GameObject>("EchoingFlamesIndicatorNew")); echoingFlamesindicator = val.AddComponent<EchoingFlamesIndicator>(); ((Component)echoingFlamesindicator).transform.SetParent(hud.mainUIPanel.transform); RectTransform component = ((Component)echoingFlamesindicator).GetComponent<RectTransform>(); component.anchorMin = new Vector2(0.5f, 0.5f); component.anchorMax = new Vector2(0.5f, 0.5f); component.pivot = new Vector2(0.5f, 0.5f); component.sizeDelta = new Vector2(120f, 120f); component.anchoredPosition = Tools.hudPositions[Config.UIPosition.Value]; ((Transform)component).localRotation = Quaternion.Euler(0f, 0f, 0f); ((Transform)component).localScale = new Vector3(1f, 1f, 1f); ((Component)echoingFlamesindicator).gameObject.SetActive(false); } } } private void Run_OnServerSceneChanged(orig_OnServerSceneChanged orig, Run self, string sceneName) { orig.Invoke(self, sceneName); foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { CharacterBody body = instance.body.GetBody(); if (Object.op_Implicit((Object)(object)body.healthComponent)) { while (body.healthComponent.body.HasBuff(Buffs.executionTokenBuff)) { body.healthComponent.body.RemoveBuff(Buffs.executionTokenBuff); } } } } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { float num = Mathf.Floor(self.level / 4f); if (self.HasBuff(Buffs.regenBuff)) { float num2 = self.GetBuffCount(Buffs.regenBuff); self.regen += num2 * (0.25f + num * 0.25f); } if (self.HasBuff(Buffs.lethalBuff)) { float num3 = self.GetBuffCount(Buffs.lethalBuff); self.attackSpeed += self.attackSpeed * (num3 * 0.1f); } if (self.HasBuff(Buffs.conquerorBuff)) { float num4 = self.GetBuffCount(Buffs.conquerorBuff); self.damage += num4 * (0.6f + num * 0.045f); } if (self.HasBuff(Buffs.movementSpeedBuff)) { self.moveSpeed += self.moveSpeed * (0.3f + num * 0.05f); } } } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { } private void PickupPickerController_FixedUpdateServer(orig_FixedUpdateServer orig, PickupPickerController self) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) CharacterMaster currentParticipantMaster = self.networkUIPromptController.currentParticipantMaster; if (!Object.op_Implicit((Object)(object)currentParticipantMaster)) { return; } CharacterBody body = currentParticipantMaster.GetBody(); Interactor val = (Object.op_Implicit((Object)(object)body) ? ((Component)body).GetComponent<Interactor>() : null); if (Object.op_Implicit((Object)(object)body)) { Vector3 val2 = body.inputBank.aimOrigin - ((Component)self).transform.position; if (!((double)((Vector3)(ref val2)).sqrMagnitude > (Object.op_Implicit((Object)(object)val) ? Math.Pow(val.maxInteractionDistance + self.cutoffDistance, 2.0) : ((double)(self.cutoffDistance * self.cutoffDistance))))) { return; } } self.networkUIPromptController.SetParticipantMaster((CharacterMaster)null); } public void OnDestroy() { try { UnHooks(); } catch (Exception ex) { Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } private void UnHooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown CharacterBody.RecalculateStats -= new hook_RecalculateStats(CharacterBody_RecalculateStats); PickupPickerController.FixedUpdateServer -= new hook_FixedUpdateServer(PickupPickerController_FixedUpdateServer); Run.OnServerSceneChanged -= new hook_OnServerSceneChanged(Run_OnServerSceneChanged); HUD.Awake -= new hook_Awake(HUD_Awake); HUD.Update -= new hook_Update(HUD_Update); HUD.onHudTargetChangedGlobal -= HUD_onHudTargetChangedGlobal; } } public class Tools { public static Vector2[] hudPositions = (Vector2[])(object)new Vector2[5] { new Vector2(0f, -430f), new Vector2(-300f, -430f), new Vector2(-680f, -200f), new Vector2(680f, -200f), default(Vector2) }; public static string[] KeywordTokens = new string[18] { "KEYWORD_POISON", "KEYWORD_RAPID_REGEN", "KEYWORD_AGILE", "KEYWORD_PERCENT_HP", "KEYWORD_SONIC_BOOM", "KEYWORD_WEAK", "KEYWORD_HEAVY", "KEYWORD_FREEZING", "KEYWORD_STUNNING", "KEYWORD_EXPOSE", "KEYWORD_SHOCKING", "KEYWORD_SLAYER", "KEYWORD_SUPERBLEED", "KEYWORD_IGNITE", "KEYWORD_WEAKPOINT", "KEYWORD_ACTIVERELOAD", "KEYWORD_VOIDCORRUPTION", "KEYWORD_AUTO_ATTACK" }; public static float CalculateLevelScaling(float level, float minLvlCap, float maxLvlCap, float minScaleCap, float maxScaleCap) { return Util.Remap(level, minLvlCap, maxLvlCap, minScaleCap, maxScaleCap); } public static float CalculateLevelScaling(float level, float maxLvlCap, float minScaleCap, float maxScaleCap) { return CalculateLevelScaling(level, 1f, maxLvlCap, minScaleCap, maxScaleCap); } public static int GetLegFromAngle(float angle) { int errorCase; return GetLegFromAngle(angle, out errorCase); } public static int GetLegFromAngle(float angle, out int errorCase) { errorCase = int.MaxValue; if (angle > 0f && angle <= 60f) { return 0; } if (angle > 60f && angle <= 120f) { return 1; } if (angle > 120f && angle <= 180f) { return 2; } if (angle > -180f && angle <= -120f) { return 3; } if (angle > -120f && angle <= -60f) { return 4; } if (angle > -60f && angle <= 0f) { return 5; } return errorCase; } public static float CheckForCoolestNumber(float health) { int num = 9999; while (health > (float)num) { num *= 10; num += 9; } return num; } public static void GetLegString(int legID, out string outSide, out string outPos) { string text = ""; string text2 = ""; switch (legID) { case 0: text = "R"; text2 = "Front"; break; case 1: text = "R"; text2 = "Side"; break; case 2: text = "R"; text2 = "Back"; break; case 3: text = "L"; text2 = "Back"; break; case 4: text = "L"; text2 = "Side"; break; case 5: text = "L"; text2 = "Front"; break; } outSide = text; outPos = text2; } } } namespace UrgotMod.UI { public class EchoingFlamesIndicator : MonoBehaviour { private Image[] ind = (Image[])(object)new Image[6]; private Image[] border = (Image[])(object)new Image[6]; private Image[] backGround = (Image[])(object)new Image[6]; private Transform parentRectTransform; public CharacterBody characterBodyC; public EchoingFlamesComponent source { get; set; } private void Awake() { Transform val = ((Component)this).gameObject.GetComponentInChildren<Transform>().Find("Background"); parentRectTransform = (Transform)(object)((Component)this).gameObject.GetComponent<RectTransform>(); for (int i = 0; i < 6; i++) { Transform val2 = ((Component)this).gameObject.GetComponentInChildren<Transform>().Find("ind" + i); ind[i] = ((Component)val2).GetComponent<Image>(); ind[i].fillMethod = (FillMethod)1; val2 = ((Component)val).GetComponentInChildren<Transform>().Find(i.ToString()); backGround[i] = ((Component)val2).GetComponent<Image>(); val2 = ((Component)this).gameObject.GetComponentInChildren<Transform>().Find("edge" + i); border[i] = ((Component)val2).GetComponent<Image>(); } } private void Start() { UpdateEchoingFlamesIndicator(); } public void Update() { UpdateEchoingFlamesIndicator(); } private void UpdateEchoingFlamesIndicator() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)source) && Object.op_Implicit((Object)(object)characterBodyC) && Object.op_Implicit((Object)(object)parentRectTransform)) { float angle = source.GetAngle(characterBodyC.inputBank.aimDirection); parentRectTransform.localEulerAngles = new Vector3(0f, 0f, angle); } else { UrgotPlugin.Logger.LogMessage((object)((!Object.op_Implicit((Object)(object)source)) ? "no source" : (Object.op_Implicit((Object)(object)characterBodyC) ? "no parent" : "no body"))); } for (int i = 0; i < 6; i++) { if (Object.op_Implicit((Object)(object)source) && Object.op_Implicit((Object)(object)ind[i])) { float currentCooldownProgress = source.GetCurrentCooldownProgress(i); ind[i].fillAmount = currentCooldownProgress; ((Behaviour)border[i]).enabled = currentCooldownProgress == 1f; } else { UrgotPlugin.Logger.LogMessage((object)(Object.op_Implicit((Object)(object)source) ? $"no ind{i}" : "no source")); } } } } } namespace UrgotMod.States { public class UrgotMain : GenericCharacterMain { private ChildLocator childLocator; private Animator animator; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); childLocator = ((EntityState)this).GetModelChildLocator(); animator = ((EntityState)this).GetModelAnimator(); localUser = LocalUserManager.readOnlyLocalUsersList[0]; } public override void Update() { //IL_0036: 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_007e: 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) ((GenericCharacterMain)this).Update(); if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && !localUser.isUIFocused) { if (Input.GetKeyDown(Config.tauntKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Taunt(), (InterruptPriority)0); } else if (Input.GetKeyDown(Config.jokeKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Joke(), (InterruptPriority)0); } else if (Input.GetKeyDown(Config.laughKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Laugh(), (InterruptPriority)0); } else if (Input.GetKeyDown(Config.danceKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Dance(), (InterruptPriority)0); } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); } } } namespace UrgotMod.States.Emotes { public class Dance : BaseEmote { private GameObject hat; public override void OnEnter() { animString = "Dance"; duration = 2.042f; soundString = "dance"; base.OnEnter(); if (!Object.op_Implicit((Object)(object)hat)) { hat = Object.Instantiate<GameObject>(Assets.mainAssetBundle.LoadAsset<GameObject>("hat")); } hat.SetActive(false); } public override void FixedUpdate() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (Object.op_Implicit((Object)(object)hat)) { hat.transform.parent = ((Component)((BaseState)this).FindModelChild("AttachObj")).transform; hat.transform.position = ((Component)((BaseState)this).FindModelChild("AttachObj")).transform.position; hat.transform.localPosition = new Vector3(0.1517885f, 0.1841809f, -0.1253804f); hat.transform.localRotation = Quaternion.Euler(-176.593f, 85.119f, -9.799011f); } if (((EntityState)this).fixedAge >= 2.042f && !hat.activeSelf) { hat.SetActive(true); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)hat)) { EntityState.Destroy((Object)(object)hat.gameObject); } base.OnExit(); } } public class Joke : BaseEmote { private GameObject Joke1; public override void OnEnter() { animString = "Joke"; duration = 9.75f; soundString = "joke"; Util.PlaySound("jokeSFX", ((EntityState)this).gameObject); base.OnEnter(); if (!Object.op_Implicit((Object)(object)Joke1)) { Joke1 = Object.Instantiate<GameObject>(Assets.mainAssetBundle.LoadAsset<GameObject>("Joke1")); } Joke1.SetActive(false); } public override void FixedUpdate() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (Object.op_Implicit((Object)(object)Joke1)) { Joke1.transform.parent = ((Component)((BaseState)this).FindModelChild("AttachObj")).transform; Joke1.transform.position = ((Component)((BaseState)this).FindModelChild("AttachObj")).transform.position; Joke1.transform.localPosition = new Vector3(0.1517885f, 0.1841809f, -0.1253804f); Joke1.transform.localRotation = Quaternion.Euler(-176.593f, 85.119f, -9.799011f); } if (((EntityState)this).fixedAge >= 9.75f && !Joke1.activeSelf) { Joke1.SetActive(true); } } public override void OnExit() { if (Object.op_Implicit((Object)(object)Joke1)) { EntityState.Destroy((Object)(object)Joke1.gameObject); } base.OnExit(); } } public class Laugh : BaseEmote { public override void OnEnter() { animString = "Laugh"; duration = 3.667f; soundString = "laugh"; base.OnEnter(); } } public class Taunt : BaseEmote { public override void OnEnter() { animString = "Taunt"; duration = 4.708f; soundString = "religion"; base.OnEnter(); } } } namespace UrgotMod.SkillStates { internal class AimCorrosiveCharge : BaseState { private bool released; public Transform indicatorInstance; private Ray aimRay; private float timer; public override void OnEnter() { ((BaseState)this).OnEnter(); CreateIndicator(); timer = Config.corrosiveChargeCD.Value; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)indicatorInstance)) { UpdateIndicator(); } if (!released && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill2.down)) { released = true; } if (released) { ((EntityState)this).outer.SetNextState((EntityState)(object)new CorrosiveCharge()); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)indicatorInstance)) { EntityState.Destroy((Object)(object)((Component)indicatorInstance).gameObject); } } private void CreateIndicator() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab)) { indicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform; indicatorInstance.localScale = Vector3.one * Config.corrosiveChargeRadius.Value; } } private void UpdateIndicator() { //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: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)indicatorInstance)) { float num = 10000f; aimRay = ((BaseState)this).GetAimRay(); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.NameToLayer("laser"))) { ((Component)indicatorInstance).transform.position = ((RaycastHit)(ref val)).point; ((Component)indicatorInstance).transform.up = ((RaycastHit)(ref val)).normal; } } } } public class CorrosiveCharge : BaseSkillState { public static float damageCoefficient = Config.corrosiveChargeDamageCoefficient.Value; public static float procCoefficient = Config.corrosiveChargeProcCoefficient.Value; public static float baseDuration = 1f; public static float throwForce = 150f; private float duration; private bool hasFired; private GameObject projectilePrefab; public override void OnEnter() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration, false); projectilePrefab = Projectiles.corrosiveChargePrefab; ((EntityState)this).PlayCrossfade("Gesture, Override", "CorrosiveCharge_fwd", "CorrosiveCharge.PlaybackRate", duration, 0.05f); ProjectileController component = projectilePrefab.GetComponent<ProjectileController>(); ProjectileDamage component2 = projectilePrefab.GetComponent<ProjectileDamage>(); projectilePrefab.GetComponent<StickFuse>().playerTeamIndex = ((BaseState)this).GetTeam(); component2.damage = ((EntityState)this).characterBody.damage * Config.corrosiveChargeDamageCoefficient.Value; component2.force = throwForce; component.owner = ((EntityState)this).gameObject; component.procChainMask = default(ProcChainMask); Fire(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { if (!hasFired) { hasFired = true; Util.PlaySound("corrosiveCharge", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { FireCharge(); } } } private void FireCharge() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if ((Object)(object)projectilePrefab != (Object)null) { bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); ((BaseState)this).AddRecoil(-1f * FireTazer.recoilAmplitude, -1.5f * FireTazer.recoilAmplitude, -0.25f * FireTazer.recoilAmplitude, 0.25f * FireTazer.recoilAmplitude); if (Object.op_Implicit((Object)(object)FireTazer.muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MuzzleFlashes/MuzzleflashLoader"), ((EntityState)this).gameObject, "LowerBarrel", false); } FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.procChainMask = default(ProcChainMask); val.target = null; val.owner = ((Component)((EntityState)this).characterBody).gameObject; val.damage = ((EntityState)this).characterBody.damage * damageCoefficient; val.crit = crit; val.force = 80f; val.damageColorIndex = (DamageColorIndex)4; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).outer.SetNextStateToMain(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Disdain : BaseSkillState { public bool willTransition; private List<GameObject> previousTargets = new List<GameObject>(); private static float missBaseDuration = 0.667f; private static float baseDuration = 0.667f; private float missDuration; private float duration; private bool missed; private float pushForce = Config.disdainPushForce.Value; private float procCoefficient = Config.disdainMinorProcCoefficient.Value; private float damageCoefficient = Config.disdainMinorDamageCoefficient.Value; private float velocity = Config.disdainVelocity.Value; private float maxDistanceFilterMajor = Config.disdainMaxDistanceFilterMajor.Value; private float maxAngleFilterMajor = Config.disdainMaxAngleFilterMajor.Value; private float maxDistanceFilterMinor = Config.disdainMaxDistanceFilterMinor.Value; private float maxAngleFilterMinor = Config.disdainMaxAngleFilterMinor.Value; protected Vector3 dashVelocity; public float dashSpeed { get; private set; } public override void OnEnter() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); UrgotPlugin.Logger.LogMessage((object)"DisdainOnEnter"); willTransition = false; missed = true; duration = baseDuration / ((BaseState)this).attackSpeedStat; missDuration = missBaseDuration / ((BaseState)this).attackSpeedStat; Vector3 val = ((EntityState)this).characterMotor.velocity; Ray aimRay = ((BaseState)this).GetAimRay(); dashVelocity = val + ((Ray)(ref aimRay)).direction * velocity; ((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); ((EntityState)this).characterMotor.disableAirControlUntilCollision = true; ((EntityState)this).characterMotor.velocity = dashVelocity; ((EntityState)this).GetModelAnimator().SetBoolString("mayDash", true); ((EntityState)this).PlayCrossfade("FullBody, Override", "Disdain_Move_fwd", "Disdain.PlaybackRate", duration, 0.05f); } public override void FixedUpdate() { //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_001e: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = dashVelocity; ((EntityState)this).characterDirection.forward = dashVelocity; ((EntityState)this).characterBody.isSprinting = true; AttemptGrab(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void AttemptGrab() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0162: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_00f7: 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_00d7: Invalid comparison between Unknown and I4 //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_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_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Invalid comparison between Unknown and I4 //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //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_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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = true, searchOrigin = ((EntityState)this).transform.position, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)1, maxDistanceFilter = maxDistanceFilterMajor, maxAngleFilter = maxAngleFilterMajor }; val.RefreshCandidates(); HurtBox val2 = val.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && Object.op_Implicit((Object)(object)val2.healthComponent.body) && !val2.healthComponent.body.isBoss && (val2.healthComponent.body.isElite || (int)val2.healthComponent.body.hullClassification == 2 || (int)val2.healthComponent.body.hullClassification == 1)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterBody.isSprinting = false; willTransition = true; ((EntityState)this).outer.SetNextState((EntityState)(object)new DisdainGrab()); missed = false; return; } BullseyeSearch val3 = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = false, searchOrigin = ((EntityState)this).transform.position, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)1, maxDistanceFilter = maxDistanceFilterMinor, maxAngleFilter = maxAngleFilterMinor }; val3.RefreshCandidates(); val3.FilterOutGameObject(((EntityState)this).gameObject); HurtBox val4 = val3.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val4) && !previousTargets.Contains(((Component)val4).gameObject) && Object.op_Implicit((Object)(object)val4.healthComponent) && Object.op_Implicit((Object)(object)val4.healthComponent.body) && !val4.healthComponent.body.isElite) { Vector3 val5 = ((Component)val4).gameObject.transform.position - ((EntityState)this).gameObject.transform.position; Vector3 val6 = Vector3.Cross((Vector3.SignedAngle(((Ray)(ref aimRay)).direction, val5, Vector3.up) > 0f) ? (-((Ray)(ref aimRay)).direction) : ((Ray)(ref aimRay)).direction, Vector3.up); Vector3 normalized = ((Vector3)(ref val6)).normalized; DamageInfo val7 = new DamageInfo(); val7.damage = ((BaseState)this).damageStat * damageCoefficient; val7.force = Vector3.zero + normalized * pushForce; val7.procCoefficient = procCoefficient; val7.crit = false; val7.inflictor = ((EntityState)this).gameObject; val7.position = ((EntityState)this).gameObject.transform.position; val7.damageColorIndex = (DamageColorIndex)0; val7.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val7.procChainMask = default(ProcChainMask); val7.attacker = ((EntityState)this).gameObject; val7.canRejectForce = false; val4.healthComponent.TakeDamage(val7); val4.healthComponent.TakeDamageForce(val7, true, true); val4.healthComponent.body.AddBuff(Buffs.PermanentDebuff); val4.healthComponent.body.AddTimedBuff(Buffs.Poisoned, 60f); previousTargets.Add(((Component)val4).gameObject); } } public override void OnExit() { ((EntityState)this).OnExit(); UrgotPlugin.Logger.LogMessage((object)"DisdainOnExit"); ((EntityState)this).GetModelAnimator().SetBoolString("mayDash", false); if (missed) { ((EntityState)this).PlayCrossfade("FullBody, Override", "Disdain_Miss_fwd", "Disdain_Miss_fwd", missDuration, 0.05f); missed = false; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class DisdainGrab : BaseSkillState { public static float slamDamageCoefficient = Config.disdainTargetDamageCoefficient.Value; public static float slamProcCoefficient = Config.disdainTargetProcCoefficient.Value; protected Animator animator; private UrgotGrabController grabController; private static float baseDuration = 0.833f; private bool hasGrabbed; private bool hasTurned; private HurtBox saveHurtbox; public override void OnEnter() { //IL_0042: 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_0049: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); hasTurned = false; UrgotPlugin.Logger.LogMessage((object)"GrabOnEnter"); ((EntityState)this).PlayCrossfade("FullBody, Override", "Disdain_Grab_fwd", "DisdainGrab.PlaybackRate", baseDuration, 0.05f); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { //IL_0036: 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_003e: 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) ((EntityState)this).FixedUpdate(); if (!hasGrabbed) { AttemptGrab(); } if (((EntityState)this).fixedAge >= baseDuration / 2f && !hasTurned) { CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = -((Ray)(ref aimRay)).direction; hasTurned = true; } if (((EntityState)this).fixedAge >= baseDuration && ((EntityState)this).isAuthority && hasGrabbed) { ((EntityState)this).outer.SetNextStateToMain(); } } public void AttemptGrab() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0046: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)grabController)) { return; } Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch { teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()), filterByLoS = true, searchOrigin = ((EntityState)this).transform.position, searchDirection = ((Ray)(ref aimRay)).direction, sortMode = (SortMode)1, maxDistanceFilter = 8f, maxAngleFilter = 90f }; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); HurtBox val2 = val.GetResults().FirstOrDefault(); if (!Object.op_Implicit((Object)(object)val2)) { return; } UrgotPlugin.Logger.LogMessage((object)((Component)val2).gameObject); if (Object.op_Implicit((Object)(object)val2.healthComponent) && Object.op_Implicit((Object)(object)val2.healthComponent.body) && (val2.healthComponent.body.isElite || !val2.healthComponent.body.isBoss)) { grabController = ((Component)val2.healthComponent.body).gameObject.AddComponent<UrgotGrabController>(); grabController.pivotTransform = ((BaseState)this).FindModelChild("AttatchObj"); grabController.baseTransform = ((BaseState)this).FindModelChild("MidCon"); grabController.baseScale = ((EntityState)this).gameObject.transform.lossyScale; DamageInfo val3 = new DamageInfo(); val3.damage = ((BaseState)this).damageStat * slamDamageCoefficient; val3.procCoefficient = slamProcCoefficient; val3.crit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); val3.attacker = ((EntityState)this).gameObject; val3.inflictor = ((EntityState)this).gameObject; val3.position = ((EntityState)this).gameObject.transform.position; val3.damageColorIndex = (DamageColorIndex)0; val3.damageType = DamageTypeCombo.op_Implicit((DamageType)16384); val3.procChainMask = default(ProcChainMask); val2.healthComponent.TakeDamage(val3); val2.healthComponent.body.AddBuff(Buffs.Weak); EntityStateMachine component = ((Component)val2).gameObject.GetComponent<EntityStateMachine>(); if (component != null) { component.SetState((EntityState)new StunState { stunDuration = 2f, duration = 2f }); } hasGrabbed = true; saveHurtbox = val2; } if (NetworkServer.active && !((EntityState)this).characterBody.HasBuff(Buffs.HiddenInvincibility)) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } } public override void OnExit() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); UrgotPlugin.Logger.LogMessage((object)"GrabOnExit"); Util.PlaySound("disdain_slam", ((Component)saveHurtbox).gameObject); if (Object.op_Implicit((Object)(object)grabController)) { grabController.Release(); } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.HiddenInvincibility)) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); hasTurned = false; } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class DisdainWindup : BaseSkillState { public float duration; private Animator animator; private float shieldAmount = Config.disdainShieldCoefficient.Value; private float baseDuration = 0.5f; public override void OnEnter() { ((BaseState)this).OnEnter(); UrgotPlugin.Logger.LogMessage((object)"WindupOnEnter"); animator = ((EntityState)this).GetModelAnimator(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).healthComponent.AddBarrierAuthority(((EntityState)this).healthComponent.fullBarrier * shieldAmount); Util.PlaySound("DisdainStart", ((EntityState)this).gameObject); Util.PlaySound("DisdainShield", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("FullBody, Override", "Disdain_Start_fwd", "Disdain.PlaybackRate", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Disdain()); } } public override void OnExit() { ((EntityState)this).OnExit(); UrgotPlugin.Logger.LogMessage((object)"WindupOnExit"); } } public class FBD : BaseSkillState { public static float damageCoefficient = Config.FBDDamageCoefficient.Value; public static float procCoefficient = Config.FBDProcCoefficient.Value; public static float baseDuration = 1.5f; private float duration; private bool hasFired; private GameObject projectilePrefab; public override void OnEnter() { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); hasFired = false; duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration, false); projectilePrefab = Projectiles.drillPrefab; ((EntityState)this).PlayCrossfade("FullBody, Override", "FBD_Start_fwd", "FBDStart.PlaybackRate", duration, 0.05f); if (Config.voiceLines.Value) { Util.PlaySound("FBD", ((EntityState)this).gameObject); } Util.PlaySound("FBDLaunch", ((EntityState)this).gameObject); ProjectileController component = projectilePrefab.GetComponent<ProjectileController>(); ProjectileDamage component2 = projectilePrefab.GetComponent<ProjectileDamage>(); ExecutionHandler component3 = projectilePrefab.GetComponent<ExecutionHandler>(); component2.damage = ((EntityState)this).characterBody.damage * damageCoefficient; component2.force = 0f; component.owner = ((EntityState)this).gameObject; component.procChainMask = default(ProcChainMask); component3.attacker = ((EntityState)this).gameObject; component3.stack = ((EntityState)this).characterBody.GetBuffCount(Buffs.executionTokenBuff); component3.healthComponentC = ((EntityState)this).healthComponent; component3.FBDSkillOverrideControllerC = ((Component)((EntityState)this).characterBody).GetComponent<FBDSkillOverrideController>(); } private void Fire() { if (((EntityState)this).isAuthority) { FireCharge(); } } private void FireCharge() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_00ed: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if ((Object)(object)projectilePrefab != (Object)null) { bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); ((BaseState)this).AddRecoil(-1f * FireTazer.recoilAmplitude, -1.5f * FireTazer.recoilAmplitude, -0.25f * FireTazer.recoilAmplitude, 0.25f * FireTazer.recoilAmplitude); if (Object.op_Implicit((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MuzzleFlashes/MuzzleflashBFG"))) { EffectManager.SimpleMuzzleFlash(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MuzzleFlashes/MuzzleflashBFG"), ((EntityState)this).gameObject, "MidCon", false); } FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; _ = ((BaseState)this).FindModelChild("MidCon").position; val.position = ((BaseState)this).FindModelChild("MidCon").position; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.procChainMask = default(ProcChainMask); val.target = null; val.owner = ((Component)((EntityState)this).characterBody).gameObject; val.damage = ((EntityState)this).characterBody.damage * damageCoefficient; val.crit = crit; val.force = 80f; val.damageColorIndex = (DamageColorIndex)0; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= baseDuration / 3f && !hasFired) { Fire(); hasFired = true; } if (((EntityState)this).fixedAge >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class UrgotGrabController : MonoBehaviour { public Transform pivotTransform; public Transform baseTransform; public Vector3 baseScale; private CapsuleCollider capsuleCollider; private CharacterDirection direction; private ModelLocator modelLocator; private Transform modelTransform; private CharacterMotor motor; private Quaternion originalRotation; private SphereCollider sphereCollider; public void Release() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)modelLocator)) { ((Behaviour)modelLocator).enabled = true; } if (Object.op_Implicit((Object)(object)modelTransform)) { modelTransform.rotation = originalRotation; } if (Object.op_Implicit((Object)(object)direction)) { ((Behaviour)direction).enabled = true; } if (Object.op_Implicit((Object)(object)capsuleCollider)) { ((Collider)capsuleCollider).enabled = true; } if (Object.op_Implicit((Object)(object)sphereCollider)) { ((Collider)sphereCollider).enabled = true; } Object.Destroy((Object)(object)this); } private void Awake() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) motor = ((Component)this).GetComponent<CharacterMotor>(); direction = ((Component)this).GetComponent<CharacterDirection>(); modelLocator = ((Component)this).GetComponent<ModelLocator>(); capsuleCollider = ((Component)this).GetComponent<CapsuleCollider>(); sphereCollider = ((Component)this).GetComponent<SphereCollider>(); if (Object.op_Implicit((Object)(object)direction)) { ((Behaviour)direction).enabled = false; } if (Object.op_Implicit((Object)(object)capsuleCollider)) { ((Collider)capsuleCollider).enabled = false; } if (Object.op_Implicit((Object)(object)sphereCollider)) { ((Collider)sphereCollider).enabled = false; } if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform)) { modelTransform = modelLocator.modelTransform; originalRotation = modelTransform.rotation; if (((Object)((Component)modelLocator).gameObject).name == "GreaterWispBody(Clone)") { modelLocator.dontReleaseModelOnDeath = true; modelLocator.dontDetatchFromParent = true; } ((Behaviour)modelLocator).enabled = false; } } private void FixedUpdate() { //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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) Vector3 val2; if (Object.op_Implicit((Object)(object)pivotTransform) && Object.op_Implicit((Object)(object)baseTransform)) { float num = Mathf.Max(((Component)this).gameObject.transform.lossyScale.y / baseScale.y, 1f); Vector3 val = pivotTransform.position - baseTransform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; val2 = pivotTransform.position + normalized * num; } else { val2 = ((Component)this).transform.position; } if (Object.op_Implicit((Object)(object)motor)) { motor.disableAirControlUntilCollision = true; motor.velocity = Vector3.zero; motor.rootMotion = Vector3.zero; ((BaseCharacterController)motor).Motor.SetPosition(val2, true); } if (Object.op_Implicit((Object)(object)pivotTransform) && Object.op_Implicit((Object)(object)baseTransform)) { ((Component)this).transform.position = val2; } else { Release(); } if (Object.op_Implicit((Object)(object)modelTransform)) { modelTransform.position = val2; modelTransform.rotation = pivotTransform.rotation; } } } internal class NoMercy : BaseSkillState { public float duration; private FBDSkillOverrideController fBDSkillOverrideControllerC; private readonly float baseDuration = 5f; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fBDSkillOverrideControllerC = ((Component)((EntityState)this).characterBody).GetComponent<FBDSkillOverrideController>(); fBDSkillOverrideControllerC.eTime = duration; fBDSkillOverrideControllerC.mayExecute = true; fBDSkillOverrideControllerC.SetNoMercyCondition(condition: false); ((EntityState)this).PlayAnimation("Gesture, Override", "FBD_execute"); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { fBDSkillOverrideControllerC.canActivateNoMercy = false; fBDSkillOverrideControllerC.mayExecute = false; } ((EntityState)this).outer.SetNextStateToMain(); } public override void OnExit() { ((EntityState)this).OnExit(); } } } namespace UrgotMod.SkillStates.Keystone { public class ElectrocuteHandler : MonoBehaviour { public CharacterBody attackerBody; public float electrocuteCD = 5f; public float stopwatch; private static readonly int maxElectrocuteStacks = 3; private CharacterBody body; private int electrocuteStacks; private bool fired; private HurtBox hurtBox; public void AddStack() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (GetStacks() < maxElectrocuteStacks && !fired) { body.AddTimedBuff(Buffs.electrocuteDebuff.buffIndex, 3f); GetStacks(); } } public int GetStacks() { electrocuteStacks = body.GetBuffCount(Buffs.electrocuteDebuff); return electrocuteStacks; } public void SetStacks(int num) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) body.SetBuffCount(Buffs.electrocuteDebuff.buffIndex, num); GetStacks(); } private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); hurtBox = body.mainHurtBox; AddStack(); } private void FireLightning() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00af: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown if (GetStacks() >= maxElectrocuteStacks) { SetStacks(0); fired = true; float num = Mathf.Floor(attackerBody.level / 4f); if (Object.op_Implicit((Object)(object)hurtBox)) { float num2 = 6f + num * 0.75f; OrbManager.instance.AddOrb((Orb)new SimpleLightningStrikeOrb { attacker = ((Component)attackerBody).gameObject, damageColorIndex = (DamageColorIndex)3, damageValue = attackerBody.damage * num2, isCrit = Util.CheckRoll(attackerBody.crit, attackerBody.master), procChainMask = default(ProcChainMask), procCoefficient = 1f, target = hurtBox }); } } } private void FixedUpdate() { if (!fired && NetworkServer.active) { FireLightning(); } if (stopwatch < electrocuteCD) { stopwatch += Time.fixedDeltaTime; } if (stopwatch >= electrocuteCD) { Object.Destroy((Object)(object)this); } } } public class KeyStoneHandler : NetworkBehaviour, IOnDamageDealtServerReceiver, IOnTakeDamageServerReceiver { public enum KeyStones { None = 0, Conqueror = 1, Lethal = 2, PhaseRush = 4, Electrocute = 8 } public float conquerorMaxStacks = 12f; [FormerlySerializedAs("Keystone")] public GenericSkill keyStone; public KeyStones keyStoneType; public float lethalMaxStacks = 6f; public float UptimeStopwatch; private CharacterBody body; private float conquerorUpTime = 4f; private HealthComponent healthComponent; private float lethalUpTime = 6f; private float MaxthrottleTime = 0.5f; private EntityStateMachine outer; private float throttleUpdateTime; protected bool isAuthority => Util.HasEffectiveAuthority(outer.networkIdentity); public void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); outer = ((Component)this).GetComponent<EntityStateMachine>(); healthComponent = ((Component)this).GetComponent<HealthComponent>(); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } private void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 if (damageReport != null && damageReport.victimBody != null && damageReport.attackerBody != null && (int)damageReport.victimTeamIndex != 1 && damageReport.attackerBody.GetBuffCount(Buffs.movementSpeedBuff) < 1 && damageReport.attackerBody.baseNameToken == "URGOT_NAME" && ((Component)damageReport.attackerBody).GetComponent<KeyStoneHandler>().keyStoneType == KeyStones.PhaseRush) { damageReport.attackerBody.AddTimedBuff(Buffs.movementSpeedBuff, 3f); } } public void OnDamageDealtServer(DamageReport damageReport) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || !Object.op_Implicit((Object)(object)damageReport.victimBody) || !Object.op_Implicit((Object)(object)damageReport.attacker) || !(damageReport.attackerBody.baseNameToken == "URGOT_NAME") || !DamageAPI.HasModdedDamageType(damageReport.damageInfo, UrgotPlugin.urgotDamage)) { return; } UptimeStopwatch = 0f; if (keyStoneType == KeyStones.PhaseRush) { if (damageReport.victimBody.GetBuffCount(Buffs.phaseRushDebuff) < 3) { damageReport.victimBody.AddTimedBuff(Buffs.phaseRushDebuff, 4f); } if (damageReport.victimBody.GetBuffCount(Buffs.phaseRushDebuff) >= 3 && body.GetBuffCount(Buffs.movementSpeedBuff) < 1) { body.AddTimedBuff(Buffs.movementSpeedBuff, 3f); } } if (keyStoneType == KeyStones.Electrocute) { ElectrocuteHandler component = ((Component)damageReport.victimBody).gameObject.GetComponent<ElectrocuteHandler>(); if (!Object.op_Implicit((Object)(object)component)) { ((Component)damageReport.victimBody).gameObject.AddComponent<ElectrocuteHandler>().attackerBody = damageReport.attackerBody; } else { component.AddStack(); } } AddKeyStoneBuff(); if (keyStoneType == KeyStones.Conqueror && GetKeyStoneBuffCount() >= GetKeyStoneMaxStacks()) { float num = damageReport.damageDealt * 0.06f; healthComponent.Heal(num, default(ProcChainMask), true); } } public void OnTakeDamageServer(DamageReport damageReport) { } private void AddKeyStoneBuff() { if (GetKeyStoneBuffCount() < GetKeyStoneMaxStacks()) { if (keyStoneType == KeyStones.Conqueror) { body.AddBuff(Buffs.conquerorBuff); } if (keyStoneType == KeyStones.Lethal) { body.AddBuff(Buffs.lethalBuff); } } } private void AuthorityFixedUpdate() { } private void CheckKeyStone() { if (keyStone.skillNameToken == "URGOT_CONQUEROR_NAME") { keyStoneType = KeyStones.Conqueror; } if (keyStone.skillNameToken == "URGOT_LETHAL_NAME") { keyStoneType = KeyStones.Lethal; } if (keyStone.skillNameToken == "URGOT_PHASE_RUSH_NAME") { keyStoneType = KeyStones.PhaseRush; } if (keyStone.skillNameToken == "URGOT_ELECTROCUTE_NAME") { keyStoneType = KeyStones.Electrocute; } } private void FixedUpdate() { if (NetworkServer.active) { ServerFixedUpdate(); } if (isAuthority) { AuthorityFixedUpdate(); } } private float GetKeyStoneBuffCount() { if (keyStoneType == KeyStones.Conqueror) { return body.GetBuffCount(Buffs.conquerorBuff); } if (keyStoneType == KeyStones.Lethal) { return body.GetBuffCount(Buffs.lethalBuff); } return 0f; } private float GetKeyStoneMaxStacks() { if (keyStoneType == KeyStones.Conqueror) { return conquerorMaxStacks; } if (keyStoneType == KeyStones.Lethal) { return lethalMaxStacks; } return 6f; } private float GetKeyStoneUpTime() { if (keyStoneType == KeyStones.Conqueror) { return conquerorUpTime; } if (keyStoneType == KeyStones.Lethal) { return lethalUpTime; } return 5f; } private void RemoveKeyStoneBuff() { if (keyStoneType == KeyStones.Conqueror) { body.RemoveBuff(Buffs.conquerorBuff); } if (keyStoneType == KeyStones.Lethal) { body.RemoveBuff(Buffs.lethalBuff); } } private void ServerFixedUpdate() { if (UptimeStopwatch < GetKeyStoneUpTime()) { UptimeStopwatch += Time.fixedDeltaTime; } if (throttleUpdateTime < MaxthrottleTime) { throttleUpdateTime += Time.fixedDeltaTime; } if (throttleUpdateTime >= MaxthrottleTime && UptimeStopwatch > GetKeyStoneUpTime() && GetKeyStoneBuffCount() > 0f) { RemoveKeyStoneBuff(); throttleUpdateTime = 0f; } if (GetKeyStoneBuffCount() <= 0f) { UptimeStopwatch = 0f; } } private void Update() { CheckKeyStone(); } } } namespace UrgotMod.SkillStates.Emotes { public class BaseEmote : BaseState { public string soundString; public string animString; public float duration; public float animDuration; public bool normalizeModel; private uint activePlayID; private Animator animator; protected ChildLocator childLocator; private CameraParamsOverrideHandle handle; public LocalUser localUser; public override void OnEnter() { //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); localUser = LocalUserManager.readOnlyLocalUsersList[0]; ((EntityState)this).characterBody.hideCrosshair = true; if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator())) { ((Behaviour)((EntityState)this).GetAimAnimator()).enabled = false; } animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 0f); animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 0f); if (animDuration == 0f && duration != 0f) { animDuration = duration; } if (duration > 0f) { ((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", duration, 0f); } else { ((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", animDuration, 0f); } if (Config.voiceLines.Value) { activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject); } if (normalizeModel && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { ((EntityState)this).modelLocator.normalizeToFloor = true; } handle = CameraParams.OverrideUrgotCameraParams(((EntityState)this).cameraTargetParams, UrgotCameraParams.EMOTE); } public override void OnExit() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).cameraTargetParams.RemoveParamsOverride(handle, 0.2f); if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator())) { ((Behaviour)((EntityState)this).GetAimAnimator()).enabled = true; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 1f); animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 1f); } if (normalizeModel && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { ((EntityState)this).modelLocator.normalizeToFloor = false; } ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); if (activePlayID != 0) { AkSoundEngine.StopPlayingID(activePlayID); } } public override void FixedUpdate() { //IL_002a: 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_00f7: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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) ((EntityState)this).FixedUpdate(); bool flag = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { if (!((EntityState)this).characterMotor.isGrounded) { flag = true; } if (((EntityState)this).characterMotor.velocity != Vector3.zero) { flag = true; } } if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { if (((EntityState)this).inputBank.skill1.down) { flag = true; } if (((EntityState)this).inputBank.skill2.down) { flag = true; } if (((EntityState)this).inputBank.skill3.down) { flag = true; } if (((EntityState)this).inputBank.skill4.down) { flag = true; } if (((EntityState)this).inputBank.jump.down) { flag = true; } if (((EntityState)this).inputBank.moveVector != Vector3.zero) { flag = true; } } if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && !localUser.isUIFocused) { if (Input.GetKeyDown(Config.tauntKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Taunt(), (InterruptPriority)0); return; } if (Input.GetKeyDown(Config.jokeKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Joke(), (InterruptPriority)0); return; } if (Input.GetKeyDown(Config.laughKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Laugh(), (InterruptPriority)0); return; } if (Input.GetKeyDown(Config.danceKeybind.Value)) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new Dance(), (InterruptPriority)0); return; } } if (duration > 0f && ((EntityState)this).fixedAge >= duration) { flag = true; } if (flag) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } } namespace UrgotMod.SkillStates.BaseStates { internal class Death : GenericCharacterDeath { public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound("Death", ((EntityState)this).gameObject); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.CrossFadeInFixedTime("Death", 0.1f); } } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } } public class AutoAttack : BaseSkillState { public static float damageCoefficient = Config.purgeDamageCoefficient.Value; public static float procCoefficientV = Config.purgeProcCoefficient.Value; public static float baseDuration = 0.2f; public static float force = Config.purgeForce.Value; public static float recoil = 1.1f; public static GameObject tracerEffectPrefab = Assets.purgeTracer; private Animator animator; private Tracker tracker; private HurtBox hurtBox; private float duration; private bool critB; private Ray aimRay; private static float spreadBloomAngel = 0.3f; private void PlaySound() { Util.PlaySound("firing", ((EntityState)this).gameObject); } private bool BulletHitCallback(BulletAttack bulletAttack, ref BulletHit hitInfo) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) bool result = BulletAttack.defaultHitCallback.Invoke(bulletAttack, ref hitInfo); HealthComponent val = (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) ? hitInfo.hitHurtBox.healthComponent : null); if (Object.op_Implicit((Object)(object)val) && val.alive && hitInfo.hitHurtBox.teamIndex != ((EntityState)this).teamComponent.teamIndex) { PointSoundManager.EmitSoundLocal(AkEventIdArg.op_Implicit(NetworkSoundEventCatalog.GetAkIdFromNetworkSoundEventIndex(Assets.bulletHitSoundEvent.index)), ((Component)hitInfo.hitHurtBox).transform.position); } return result; } public override void OnEnter() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); tracker = ((EntityState)this).GetComponent<Tracker>(); hurtBox = tracker.GetTrackingTarget(); if (!Object.op_Implicit((Object)(object)hurtBox)) { ((EntityState)this).outer.SetNextStateToMain(); return; } duration = baseDuration / ((BaseState)this).attackSpeedStat; aimRay = ((BaseState)this).GetAimRay(); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("attacking", true); ((BaseState)this).StartAimMode(aimRay, 3f, false); critB = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); if (animator.GetBool("isMoving") || !animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("Gesture, Override", critB ? "Crit" : "Fire", "Purge.playbackRate", duration, 0.05f); } else if (!animator.GetBool("isMoving") && animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("FullBody, Override", critB ? "Crit" : "Fire", "Purge.playbackRate", duration, 0.05f); } FireBullet("GunGrill"); Vector3 val = ((Component)hurtBox).transform.position - ((EntityState)this).transform.position; if (((Vector3)(ref val)).magnitude <= 10f) { ((EntityState)this).GetComponent<EchoingFlamesComponent>().CheckAngle(((Vector3)(ref val)).normalized); } } private void FireBullet(string targetMuzzle) { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("purge", ((EntityState)this).gameObject); ((Component)((EntityState)this).characterBody).GetComponent(typeof(CharacterBody)); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, targetMuzzle, false); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (((EntityState)this).isAuthority) { ChildLocator component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<ChildLocator>(); GenericDamageOrb val = (GenericDamageOrb)(object)new UrgotAutoAimOrb { damageValue = ((BaseState)this).damageStat * (damageCoefficient - 0.1f), attacker = ((EntityState)this).gameObject, isCrit = Util.CheckRoll(((BaseState)this).critStat, 0f, (CharacterMaster)null), procChainMask = default(ProcChainMask), procCoefficient = procCoefficientV - 0.1f, teamIndex = (TeamIndex)1, origin = component.FindChild(targetMuzzle).position, target = hurtBox, arrivalTime = 0.01f, damageType = DamageTypeCombo.GenericPrimary }; OrbManager.instance.AddOrb((Orb)(object)val); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomAngel); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("attacking", false); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { _ = ((BaseSkillState)this).activatorSkillSlot.stock; _ = 0; ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { } protected virtual void OnHitEnemyAuthority() { } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Cleanse : BaseSkillState { public static float damageCoefficient = Config.cleanseDamageCoefficient.Value; public static float procCoefficientV = Config.cleanseProcCoefficient.Value; public static float baseDuration = 0.7f; public static float force = Config.cleanseForce.Value; public static float recoil = 1.5f; public static GameObject tracerEffectPrefab = Assets.purgeTracer; private Animator animator; private float duration; private bool critB; private Ray aimRay; private static float spreadBloomAngel = 0.3f; private void FireBullet(string targetMuzzle) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00ee: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("purge", ((EntityState)this).gameObject); ((Component)((EntityState)this).characterBody).GetComponent(typeof(CharacterBody)); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, targetMuzzle, false); ((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil); if (((EntityState)this).isAuthority) { new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, damage = damageCoefficient * ((BaseState)this).damageStat, force = force, tracerEffectPrefab = tracerEffectPrefab, muzzleName = targetMuzzle, hitEffectPrefab = FirePistol2.hitEffectPrefab, isCrit = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), radius = 0.1f, smartCollision = true, trajectoryAimAssistMultiplier = 1f, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)524288), (DamageTypeExtended)0, (DamageSource)1), hitCallback = new HitCallback(BulletHitCallback), procCoefficient = procCoefficientV, procChainMask = default(ProcChainMask) }.Fire(); } ((EntityState)this).characterBody.AddSpreadBloom(spreadBloomAngel); } private bool BulletHitCallback(BulletAttack bulletAttack, ref BulletHit hitInfo) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) bool result = BulletAttack.defaultHitCallback.Invoke(bulletAttack, ref hitInfo); HealthComponent val = (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) ? hitInfo.hitHurtBox.healthComponent : null); if (Object.op_Implicit((Object)(object)val) && val.alive && hitInfo.hitHurtBox.teamIndex != ((EntityState)this).teamComponent.teamIndex) { PointSoundManager.EmitSoundLocal(AkEventIdArg.op_Implicit(NetworkSoundEventCatalog.GetAkIdFromNetworkSoundEventIndex(Assets.bulletHitSoundEvent.index)), ((Component)hitInfo.hitHurtBox).transform.position); } return result; } public override void OnEnter() { //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_0043: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; aimRay = ((BaseState)this).GetAimRay(); animator = ((EntityState)this).GetModelAnimator(); animator.SetBool("attacking", true); ((BaseState)this).StartAimMode(aimRay, 3f, false); critB = Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master); if (animator.GetBool("isMoving") || !animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("Gesture, Override", critB ? "Crit" : "Fire", "Purge.playbackRate", duration, 0.05f); } else if (!animator.GetBool("isMoving") && animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("FullBody, Override", critB ? "Crit" : "Fire", "Purge.playbackRate", duration, 0.05f); } FireBullet("GunGrill"); } public override void OnExit() { ((EntityState)this).OnExit(); animator.SetBool("attacking", false); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority) { _ = ((BaseSkillState)this).activatorSkillSlot.stock; _ = 0; ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { } protected virtual void OnHitEnemyAuthority() { } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class Purge : BaseSkillState { public static float damageCoefficient = Config.purgeDamageCoefficient.Value; public static float procCoefficientV = Config.purgeProcCoefficient.Value; public static float baseDuration = 0.2f; public static float force = Config.purgeForce.Value; public static float recoil = 1.1f; public static GameObject tracerEffectPrefab = Assets.purgeTracer; private Animator animator; private float duration; private bool critB; private Ray aimRay; private static float spreadBloomAngel = 0.3f; private void PlaySound() { Util.PlaySound("firing", ((EntityState)this).gameObject); } private bool BulletHitCallback(BulletAttack bulletAttack, ref