public static void UseEvadeSpell() { if (!Situation.ShouldUseEvadeSpell()) { return; } //int posDangerlevel = EvadeHelper.CheckPosDangerLevel(ObjectCache.myHeroCache.serverPos2D, 0); if (EvadeUtils.TickCount - LastSpellEvadeCommand.Timestamp < 1000) { return; } //ConsoleDebug.WriteLineColor("Dodging Skill Shots by Evade Spell", ConsoleColor.Green); foreach (KeyValuePair <int, Spell> entry in SpellDetector.Spells) { Spell spell = entry.Value; if (ShouldActivateEvadeSpell(spell)) { if (ActivateEvadeSpell(spell)) { Evade.SetAllUndodgeable(); return; } } } }
public static void UseEvadeSpell() { if (!Situation.ShouldUseEvadeSpell()) { return; } if (Environment.TickCount - LastSpellEvadeCommand.Timestamp < 1000) { return; } if (!SpellDetector.Spells.Select(entry => entry.Value).Where(ShouldActivateEvadeSpell).Any(spell => ActivateEvadeSpell(spell))) { return; } Evade.SetAllUndodgeable(); }