Skip to content

Commit

Permalink
Merge pull request #2479 from RoseFlunder/incubatorPrio
Browse files Browse the repository at this point in the history
changed egg prio for unlimited incubator
  • Loading branch information
BornSupercharged authored Aug 3, 2016
2 parents 66ccfba + bfb8497 commit a48e746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PoGo.NecroBot.Logic/Tasks/UseIncubatorsTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public static async Task Execute(ISession session, CancellationToken cancellatio
if (incubator.PokemonId == 0)
{
// Unlimited incubators prefer short eggs, limited incubators prefer long eggs
var egg = incubator.ItemId == ItemId.ItemIncubatorBasicUnlimited
// Special case: If only one incubator is available at all, it will prefer long eggs
var egg = (incubator.ItemId == ItemId.ItemIncubatorBasicUnlimited && incubators.Count > 1)
? unusedEggs.FirstOrDefault()
: unusedEggs.LastOrDefault();

Expand Down

0 comments on commit a48e746

Please sign in to comment.