fix some edge cases in GC NTE item creation

This commit is contained in:
Martin Michelsen
2024-02-19 23:22:22 -08:00
parent b46be572a6
commit 42c72b92ac
4 changed files with 97 additions and 87 deletions
+5 -1
View File
@@ -1038,7 +1038,11 @@ uint8_t ItemParameterTable::get_item_adjusted_stars(const ItemData& item) const
}
bool ItemParameterTable::is_item_rare(const ItemData& item) const {
return (this->get_item_base_stars(item) >= 9);
try {
return (this->get_item_base_stars(item) >= 9);
} catch (const out_of_range&) {
return false;
}
}
bool ItemParameterTable::is_unsealable_item(uint8_t data1_0, uint8_t data1_1, uint8_t data1_2) const {