private static bool useQ(bool gapCloser, bool shortQ, bool longQ, bool validVitals, AIHeroClient qtarget = null, bool turretCheck = false) { if (!Q1.IsReady()) { return(false); } if (qtarget == null) { qtarget = QTarget; } if (!qtarget.IsKillable()) { return(false); } var fuckpoppyW = EntityManager.Heroes.Enemies.Any(e => e.HasBuff("PoppyWZone") && e.IsValidTarget(300, false, qtarget.ServerPosition)); if (fuckpoppyW) { return(false); } if (shortQ || longQ) { var vital = VitalManager.vital(qtarget, validVitals); var vitalResult = VitalManager.CanQVital(vital, shortQ, longQ); if (vitalResult.HasValue) { if (SkillshotDetector.SkillshotsDetected.Any(s => s.WillHit(vitalResult.Value.To2D()))) { return(false); } if (turretCheck && vitalResult.Value.IsUnderEnemyTurret()) { return(false); } if (vital.Vitalsector.IsInside(Player.Instance.ServerPosition) && Orbwalker.CanAutoAttack) { return(false); } return(Q2.Cast(vitalResult.Value)); } } if (gapCloser) { } return(false); }
private Vector3?OverrideOrbwalkPosition() { if (!Config.orbwalk || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { return(null); } var target = QTarget; if (target == null) { return(null); } var AAvital = Config.orbAAVital && target.IsKillable(user.GetAutoAttackRange(target) * 1.15f) || !Config.orbAAVital && target.IsKillable(user.GetAutoAttackRange(target) * 1.35f); var vital = VitalManager.vital(target); if (vital == null) { return(null); } var orbRVital = Config.orbUltVital && vital.IsRVital || !Config.orbUltVital; var validpos = !vital.OrbWalkVitalPos.IsWall() && !vital.OrbWalkVitalPos.IsBuilding(); if (!validpos) { return(null); } if (orbRVital && AAvital) { return(vital.OrbWalkVitalPos); } return(null); }