fix own dungeon items on shuffled boss rooms (#2683)

This commit is contained in:
Adam Bird
2023-04-11 07:31:37 -04:00
committed by GitHub
parent 330da0b5ec
commit b47d538e62
3 changed files with 72 additions and 37 deletions

View File

@@ -759,9 +759,15 @@ static void FillExcludedLocations() {
//Function to handle the Own Dungeon setting
static void RandomizeOwnDungeon(const Dungeon::DungeonInfo* dungeon) {
std::vector<uint32_t> dungeonLocations = dungeon->GetDungeonLocations();
std::vector<uint32_t> dungeonItems;
// Search and filter for locations that match the hint region of the dungeon
// This accounts for boss room shuffle so that own dungeon items can be placed
// in the shuffled boss room
std::vector<LocationKey> dungeonLocations = FilterFromPool(allLocations, [dungeon](const auto loc) {
return GetHintRegionHintKey(Location(loc)->GetParentRegionKey()) == dungeon->GetHintKey();
});
//filter out locations that may be required to have songs placed at them
dungeonLocations = FilterFromPool(dungeonLocations, [](const auto loc){
if (ShuffleSongs.Is(SONGSHUFFLE_SONG_LOCATIONS)) {