internal static bool DeathShouldWait(object ret) { //if (!UIElements.ReviveAtCorpseButton.IsEnabled) // return true; if (FunkyBaseExtension.Settings.Death.WaitForPotionCooldown) { //Check Potion Cast Flags.. PowerManager.CanCastFlags potionCastFlags; if (!PowerManager.CanCast(SNOPower.DrinkHealthPotion, out potionCastFlags)) { if (potionCastFlags.HasFlag(PowerManager.CanCastFlags.PowerUnusableOnCooldown)) { BotMain.StatusText = "[Funky] Death: Waiting For Cooldowns!"; return(true); } } } if (FunkyBaseExtension.Settings.Death.WaitForAllSkillsCooldown) { //Check Archon? if (FunkyGame.Hero.Class.AC == ActorClass.Wizard && Hotbar.HasBuff(SNOPower.Wizard_Archon)) { Skill cancelSkill = FunkyGame.Hero.Class.Abilities[SNOPower.Wizard_Archon_Cancel]; Skill.UsePower(ref cancelSkill); Hotbar.RefreshHotbar(); BotMain.StatusText = "[Funky] Death: Waiting For Cooldowns!"; return(true); } foreach (var skill in Hotbar.HotbarSkills) { PowerManager.CanCastFlags skillCastFlags; if (!PowerManager.CanCast(skill.Power, out skillCastFlags)) { if (skillCastFlags.HasFlag(PowerManager.CanCastFlags.PowerUnusableOnCooldown)) { BotMain.StatusText = "[Funky] Death: Waiting For Cooldowns!"; return(true); } } } } return(false); }
internal static RunStatus DeathWaitAction(object ret) { //if (!UIElements.ReviveAtCorpseButton.IsEnabled) //{ // UIElements.ReviveAtLastCheckpointButton.Click(); //} if (FunkyBaseExtension.Settings.Death.WaitForPotionCooldown) { //Check Potion Cast Flags.. PowerManager.CanCastFlags potionCastFlags; if (!PowerManager.CanCast(SNOPower.DrinkHealthPotion, out potionCastFlags)) { if (potionCastFlags.HasFlag(PowerManager.CanCastFlags.PowerUnusableOnCooldown)) { InactivityDetector.Reset(); return(RunStatus.Running); } } } if (FunkyBaseExtension.Settings.Death.WaitForAllSkillsCooldown) { if (FunkyGame.Hero.Class.AC == ActorClass.Wizard && Hotbar.HasBuff(SNOPower.Wizard_Archon)) { Hotbar.RefreshHotbar(); InactivityDetector.Reset(); return(RunStatus.Running); } foreach (var skill in Hotbar.HotbarSkills) { PowerManager.CanCastFlags skillCastFlags; if (!PowerManager.CanCast(skill.Power, out skillCastFlags)) { if (skillCastFlags.HasFlag(PowerManager.CanCastFlags.PowerUnusableOnCooldown)) { InactivityDetector.Reset(); return(RunStatus.Running); } } } } GoldInactivity.LastCoinageUpdate = DateTime.Now; return(RunStatus.Success); }
///<summary> ///Used to check for a secondary hotbar set. Currently only used for wizards with Archon. ///</summary> internal override bool SecondaryHotbarBuffPresent() { bool ArchonBuffPresent = Hotbar.HasBuff(SNOPower.Wizard_Archon); //Confirm we don't have archon Ability without archon buff. bool RefreshNeeded = ((!ArchonBuffPresent && (Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast) || Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast_Fire) || Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast_Cold) || Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast_Lightning))) || (ArchonBuffPresent && (!Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast) && !Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast_Fire) && !Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast_Cold) && !Abilities.ContainsKey(SNOPower.Wizard_Archon_ArcaneBlast_Lightning)))); if (RefreshNeeded) { Logger.DBLog.InfoFormat("Updating Hotbar abilities!"); Hotbar.RefreshHotbar(); RecreateAbilities(); return(true); } return(false); }
//Base class for each individual class! protected PlayerClass() { Hotbar.RefreshHotbar(); Hotbar.RefreshPassives(); Skill healthPotionSkill = new DrinkHealthPotion(); healthPotionSkill.Initialize(); Skill.CreateSkillLogicConditions(ref healthPotionSkill); HealthPotionAbility = (DrinkHealthPotion)healthPotionSkill; Equipment.RefreshEquippedItemsList(); Hotbar.OnSkillsChanged += HotbarSkillsChangedHandler; Logger.DBLog.InfoFormat("[Funky] Finished Creating Player Class"); }