private static double SetKillRange() { // Always within kill range if in the NoCheckKillRange list! if (DataDictionary.NoCheckKillRange.Contains(CurrentCacheObject.ActorSNO)) { return(CurrentCacheObject.RadiusDistance + 100f); } double killRange; // Bosses, always kill if (CurrentCacheObject.IsBoss) { return(CurrentCacheObject.RadiusDistance + 100f); } // Elitey type mobs and things if ((c_unit_IsElite || c_unit_IsRare || c_unit_IsUnique)) { // using new GUI slider for elite kill range killRange = Settings.Combat.Misc.EliteRange; } else { killRange = CurrentBotKillRange; } if (!TownRun.IsTryingToTownPortal()) { return(killRange); } // Safety for TownRuns if (killRange <= V.F("Cache.TownPortal.KillRange")) { killRange = V.F("Cache.TownPortal.KillRange"); } return(killRange); }
private static void Monk_MaintainTempestRush() { if (!Monk_TempestRushReady()) { return; } if (Player.IsInTown || Zeta.Bot.Logic.BrainBehavior.IsVendoring) { return; } if (TownRun.IsTryingToTownPortal()) { return; } if (TimeSinceUse(SNOPower.Monk_TempestRush) > 150) { return; } bool shouldMaintain = false; bool nullTarget = CurrentTarget == null; if (!nullTarget) { // maintain for everything except items, doors, interactables... stuff we have to "click" on switch (CurrentTarget.Type) { case GObjectType.Unit: case GObjectType.Gold: case GObjectType.Avoidance: case GObjectType.Barricade: case GObjectType.Destructible: case GObjectType.HealthGlobe: case GObjectType.PowerGlobe: { if (Settings.Combat.Monk.TROption == TempestRushOption.TrashOnly && (TargetUtil.AnyElitesInRange(40f) || CurrentTarget.IsBossOrEliteRareUnique)) { shouldMaintain = false; } else { shouldMaintain = true; } } break; } } else { shouldMaintain = true; } if (Settings.Combat.Monk.TROption != TempestRushOption.MovementOnly && SNOPowerUseTimer(SNOPower.Monk_TempestRush) && shouldMaintain) { Vector3 target = LastTempestRushLocation; const string locationSource = "LastLocation"; if (target.Distance2D(ZetaDia.Me.Position) <= 1f) { // rrrix edit: we can't maintain here return; } if (target == Vector3.Zero) { return; } float DestinationDistance = target.Distance2D(ZetaDia.Me.Position); target = TargetUtil.FindTempestRushTarget(); if (DestinationDistance > 10f && NavHelper.CanRayCast(ZetaDia.Me.Position, target)) { Monk_TempestRushStatus(String.Format("Using Tempest Rush to maintain channeling, source={0}, V3={1} dist={2:0}", locationSource, target, DestinationDistance)); var usePowerResult = ZetaDia.Me.UsePower(SNOPower.Monk_TempestRush, target, CurrentWorldDynamicId, -1); if (usePowerResult) { CacheData.AbilityLastUsed[SNOPower.Monk_TempestRush] = DateTime.UtcNow; } } } }