mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-30 00:16:19 -04:00
fix plentiful item pool crash
This commit is contained in:
@@ -1017,7 +1017,11 @@ namespace randomizer::logic::world
|
||||
utility::random::ShufflePool(bottleLocations);
|
||||
for (auto& bottleLocation : bottleLocations)
|
||||
{
|
||||
bottleLocation->SetCurrentItem(utility::random::PopRandomElement(bottlePool));
|
||||
if (!bottlePool.empty()) {
|
||||
bottleLocation->SetCurrentItem(utility::random::PopRandomElement(bottlePool));
|
||||
} else {
|
||||
bottleLocation->SetCurrentItem(this->GetItem("Empty Bottle"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user