Skip to content

Commit

Permalink
UI Changes, revert test for seed not found in any region
Browse files Browse the repository at this point in the history
  • Loading branch information
bdawg1989 committed Jun 17, 2024
1 parent 35ef98b commit cf068a5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 40 deletions.
55 changes: 29 additions & 26 deletions SysBot.Pokemon.WinForms/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 6 additions & 14 deletions SysBot.Pokemon/SV/BotRaid/RotatingRaidBotSV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3186,15 +3186,7 @@ private async Task ProcessAllRaids(CancellationToken token)
var allRewards = container.Rewards;
uint denHexSeedUInt;
denHexSeedUInt = uint.Parse(denHexSeed, NumberStyles.AllowHexSpecifier);
bool seedFound = await FindSeedIndexInRaids(denHexSeedUInt, token);

if (!seedFound)
{
Log($"Seed {denHexSeedUInt:X8} not found in any region. Stopping processing and refreshing the map.");
shouldRefreshMap = true;
return;
}

await FindSeedIndexInRaids(denHexSeedUInt, token);
var raidInfoList = await ExtractPaldeaRaidInfo(token);
bool newEventSpeciesFound = false;
var (distGroupIDs, mightGroupIDs) = GetPossibleGroups(container);
Expand Down Expand Up @@ -3426,7 +3418,7 @@ private async Task ProcessAllRaids(CancellationToken token)
}
}

private async Task<bool> FindSeedIndexInRaids(uint denHexSeedUInt, CancellationToken token)
private async Task FindSeedIndexInRaids(uint denHexSeedUInt, CancellationToken token)
{
var upperBound = KitakamiDensCount == 25 ? 94 : 95;
var startIndex = KitakamiDensCount == 25 ? 94 : 95;
Expand All @@ -3439,7 +3431,7 @@ private async Task<bool> FindSeedIndexInRaids(uint denHexSeedUInt, CancellationT
if (seed == denHexSeedUInt)
{
SeedIndexToReplace = i;
return true;
return;
}
}

Expand All @@ -3451,7 +3443,7 @@ private async Task<bool> FindSeedIndexInRaids(uint denHexSeedUInt, CancellationT
if (seed == denHexSeedUInt)
{
SeedIndexToReplace = i + 69;
return true;
return;
}
}

Expand All @@ -3463,11 +3455,11 @@ private async Task<bool> FindSeedIndexInRaids(uint denHexSeedUInt, CancellationT
if (seed == denHexSeedUInt)
{
SeedIndexToReplace = i - 1;
return true;
return;
}
}

return false;
Log($"Seed {denHexSeedUInt:X8} not found in any region.");
}

public static (PK9, Embed) RaidInfoCommand(string seedValue, int contentType, TeraRaidMapParent map, int storyProgressLevel, int raidDeliveryGroupID, List<string> rewardsToShow, bool moveTypeEmojis, List<MoveTypeEmojiInfo> customTypeEmojis, int queuePosition = 0, bool isEvent = false)
Expand Down

0 comments on commit cf068a5

Please sign in to comment.