private static async Task <bool> SwiftCastAspectedHelios() { if (!Spells.Swiftcast.IsKnownAndReady()) { return(false); } if (!await Buff.Swiftcast()) { return(false); } while (Core.Me.HasAura(Auras.Swiftcast)) { if (await Spells.AspectedHelios.HealAura(Core.Me, Auras.AspectedHelios, false)) { return(true); } await Coroutine.Yield(); } return(false); }
public static async Task <bool> Ascend() { if (!AstrologianSettings.Instance.Ascend) { return(false); } if (!Globals.InParty) { return(false); } if (Core.Me.CurrentMana < Spells.Ascend.Cost) { return(false); } /* * if (Group.DeadAllies.Any()) * { * Logger.WriteInfo( * @"========================================Dead Guy Logger========================================"); * var deadguycount = 0; * foreach (var deadguy in Group.DeadAllies) * { * deadguycount++; * Logger.WriteInfo($@"{deadguycount}" + "\t" + $@"{deadguy.Name}" + "\t" + * $@"DoesntHaveRaiseAura: {!deadguy.HasAura(Auras.Raise)}" + "\t" + * $@"Distance: {deadguy.Distance(Core.Me)}"); * Logger.WriteInfo("\t" + $@"InLineOfSight: {deadguy.InLineOfSight()}" + "\t" + * $@"IsTargetable: {deadguy.IsTargetable}" + "\t" + * $@"IsVisible: {deadguy.IsVisible}"); * } * Logger.WriteInfo( * @"========================================Dead Guy Logger========================================"); * } */ var deadList = Group.DeadAllies.Where(u => !u.HasAura(Auras.Raise) && u.Distance(Core.Me) <= 30 && u.InLineOfSight() && u.IsTargetable && u.IsVisible) .OrderByDescending(r => r.GetResurrectionWeight()); var deadTarget = deadList.FirstOrDefault(); if (deadTarget == null) { return(false); } if (!deadTarget.IsTargetable) { return(false); } if (Core.Me.InCombat || Core.Me.OnPvpMap()) { if (!ActionManager.HasSpell(Spells.Ascend.Id)) { return(false); } if (!AstrologianSettings.Instance.AscendSwiftcast) { return(false); } if (!ActionManager.HasSpell(Spells.Swiftcast.Id)) { return(false); } if (Spells.Swiftcast.Cooldown != TimeSpan.Zero) { return(false); } if (await Buff.Swiftcast()) { while (Core.Me.HasAura(Auras.Swiftcast)) { if (await Spells.Ascend.Cast(deadTarget)) { return(true); } await Coroutine.Yield(); } } } if (Core.Me.InCombat) { return(false); } return(await Spells.Raise.CastAura(deadTarget, Auras.Raise)); }