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))
{
AdEvade.SetAllUndodgeable();
return;
}
}
}
}