fix Dragon and De Rol Le drops on v1

This commit is contained in:
Martin Michelsen
2024-02-18 09:33:38 -08:00
parent 255878bf60
commit cda86e586d
2 changed files with 92 additions and 82 deletions
+12 -2
View File
@@ -122,11 +122,21 @@ uint8_t ItemCreator::normalize_area_number(uint8_t area) const {
}
ItemCreator::DropResult ItemCreator::on_box_item_drop(uint8_t area) {
return this->on_box_item_drop_with_area_norm(this->normalize_area_number(area));
try {
return this->on_box_item_drop_with_area_norm(this->normalize_area_number(area));
} catch (const exception& e) {
this->log.error("Exception in item creation: %s", e.what());
return DropResult();
}
}
ItemCreator::DropResult ItemCreator::on_monster_item_drop(uint32_t enemy_type, uint8_t area) {
return this->on_monster_item_drop_with_area_norm(enemy_type, this->normalize_area_number(area));
try {
return this->on_monster_item_drop_with_area_norm(enemy_type, this->normalize_area_number(area));
} catch (const exception& e) {
this->log.error("Exception in item creation: %s", e.what());
return DropResult();
}
}
ItemCreator::DropResult ItemCreator::on_box_item_drop_with_area_norm(uint8_t area_norm) {