Skip to content

Commit

Permalink
If we cant find anything to unlock then break out of the while so we …
Browse files Browse the repository at this point in the history
…do not have an infinite loop (freeze)
  • Loading branch information
ISeeDEDPpl committed May 7, 2013
1 parent 27fb69f commit f32020e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Questor.Modules/Combat/Combat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,10 @@ private void TargetCombatants()
//
// Assume that if we have no non-scrambling high value targets that we will have low value targets we can untarget elsewhere
//
break;
}

if (unlockThisHighValueTarget != null && unlockThisHighValueTarget.IsTarget && unlockThisHighValueTarget.UnlockTarget("Combat.TargetCombatants"))
if (unlockThisHighValueTarget.IsTarget && unlockThisHighValueTarget.UnlockTarget("Combat.TargetCombatants"))
{
Logging.Log("Combat", "unlocking high value target [" + unlockThisHighValueTarget.Name + "][ID: " + Cache.Instance.MaskedID(unlockThisHighValueTarget.Id) + "]{" + highValueTargetsTargeted.Count + "} [" + Math.Round(unlockThisHighValueTarget.Distance / 1000, 0) + "k away]", Logging.Teal);
//highValueTargets.Remove(unlockThisHighValueTarget);
Expand All @@ -995,9 +996,10 @@ private void TargetCombatants()
//
// Assume that if we have no non-scrambling low value targets that we will have high value targets we can untarget elsewhere
//
break;
}

if ((unlockThisLowValueTarget != null) && unlockThisLowValueTarget.IsTarget && unlockThisLowValueTarget.UnlockTarget("Combat.TargetCombatants"))
if (unlockThisLowValueTarget.IsTarget && unlockThisLowValueTarget.UnlockTarget("Combat.TargetCombatants"))
{
Logging.Log("Combat", "unlocking low value target [" + unlockThisLowValueTarget.Name + "][ID: " + Cache.Instance.MaskedID(unlockThisLowValueTarget.Id) + "]{" + lowValueTargetsTargeted.Count + "} [" + Math.Round(unlockThisLowValueTarget.Distance / 1000, 0) + "k away]", Logging.Teal);
//lowValueTargets.Remove(unlockThisLowValueTarget);
Expand Down Expand Up @@ -1028,6 +1030,7 @@ private void TargetCombatants()
//
// Assume that if we have no non-scrambling targets that we will have to kill some of them as we have run out of slots (all slots should have warp scramblers targeted if this is null)
//
break;
}

if ((unlockAnyNonWarpScramblingTarget != null) && unlockAnyNonWarpScramblingTarget.IsTarget && unlockAnyNonWarpScramblingTarget.UnlockTarget("Combat.TargetCombatants"))
Expand Down

0 comments on commit f32020e

Please sign in to comment.