private void SpellDetector_OnProcessDetectedSpells() { if (EvadeHelper.CheckDangerousPos(myHero.ServerPosition.To2D(), 0)) { if (Evade.menu.SubMenu("Main").Item("DodgeSkillShots").GetValue <KeyBind>().Active == false || EvadeSpell.PreferEvadeSpell()) { lastPosInfo = EvadeHelper.SetAllUndodgeable(); EvadeSpell.UseEvadeSpell(); //using spells } else { var posInfo = EvadeHelper.GetBestPosition(); /*if (EvadeHelper.GetHighestDetectedSpellID() > EvadeHelper.GetHighestSpellID(posInfo)) * { * return; * }*/ if (lastPosInfo != null && posInfo != null && lastPosInfo.posDangerCount < posInfo.posDangerCount) { return; } lastPosInfo = posInfo; CheckHeroInDanger(); DodgeSkillShots(); //walking EvadeSpell.UseEvadeSpell(); //using spells } } else { lastPosInfo = EvadeHelper.SetAllDodgeable(); } //Game.PrintChat("SkillsDodged: " + lastPosInfo.dodgeableSpells.Count + " DangerLevel: " + lastPosInfo.undodgeableSpells.Count); }