Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rvazarkar/NGUInjector
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Nov 27, 2020
2 parents 6177950 + 5edd9de commit 2f34ee0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions NGUInjector/Managers/ZoneHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,17 @@ internal static void OptimizeITOPOD()
if (Main.Character.adventure.zone < 1000) return;
var controller = Main.Character.adventureController;
var level = controller.itopodLevel;
var highestOpen = Main.Character.adventure.highestItopodLevel;
var optimal = CalculateBestItopodLevel();
if (level == optimal) return; // we are on optimal floor
var highestOpen = Main.Character.adventure.highestItopodLevel;
var climbing = (level < optimal && level >= highestOpen - 1);
controller.itopodStartInput.text = optimal.ToString();
if (climbing)
optimal++;
controller.itopodEndInput.text = optimal.ToString();
controller.verifyItopodInputs();
if (level == optimal) return; // we are on optimal floor
if (level < optimal && level >= highestOpen - 1) return; // we are climbing
controller.zoneSelector.changeZone(1000);
if (!climbing)
controller.zoneSelector.changeZone(1000);
}

internal static int CalculateBestItopodLevel()
Expand Down

0 comments on commit 2f34ee0

Please sign in to comment.