minor cleanup in ItemCreator
This commit is contained in:
+4
-7
@@ -423,8 +423,8 @@ void ItemCreator::clear_tool_item_if_invalid(ItemData& item) {
|
|||||||
|
|
||||||
void ItemCreator::clear_item_if_restricted(ItemData& item) const {
|
void ItemCreator::clear_item_if_restricted(ItemData& item) const {
|
||||||
if (this->item_parameter_table->is_item_rare(item) && !this->are_rare_drops_allowed()) {
|
if (this->item_parameter_table->is_item_rare(item) && !this->are_rare_drops_allowed()) {
|
||||||
item.clear();
|
|
||||||
this->log.info("Restricted: item is rare, but rares not allowed");
|
this->log.info("Restricted: item is rare, but rares not allowed");
|
||||||
|
item.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,11 +450,11 @@ void ItemCreator::clear_item_if_restricted(ItemData& item) const {
|
|||||||
case Restrictions::WeaponAndArmorMode::ONLY_PICKING:
|
case Restrictions::WeaponAndArmorMode::ONLY_PICKING:
|
||||||
break;
|
break;
|
||||||
case Restrictions::WeaponAndArmorMode::NO_RARE:
|
case Restrictions::WeaponAndArmorMode::NO_RARE:
|
||||||
if (!this->item_parameter_table->is_item_rare(item)) {
|
if (this->item_parameter_table->is_item_rare(item)) {
|
||||||
this->log.info("Restricted: rare items not allowed");
|
this->log.info("Restricted: rare items not allowed");
|
||||||
break;
|
item.clear();
|
||||||
}
|
}
|
||||||
[[fallthrough]];
|
break;
|
||||||
case Restrictions::WeaponAndArmorMode::ALL_OFF:
|
case Restrictions::WeaponAndArmorMode::ALL_OFF:
|
||||||
this->log.info("Restricted: weapons and armors not allowed");
|
this->log.info("Restricted: weapons and armors not allowed");
|
||||||
item.clear();
|
item.clear();
|
||||||
@@ -512,8 +512,6 @@ void ItemCreator::clear_item_if_restricted(ItemData& item) const {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ItemCreator::generate_common_item_variances(
|
void ItemCreator::generate_common_item_variances(
|
||||||
uint32_t norm_area, ItemData& item) {
|
uint32_t norm_area, ItemData& item) {
|
||||||
switch (item.data1[0]) {
|
switch (item.data1[0]) {
|
||||||
@@ -681,7 +679,6 @@ void ItemCreator::generate_common_weapon_variances(
|
|||||||
this->generate_common_weapon_special(item, area_norm);
|
this->generate_common_weapon_special(item, area_norm);
|
||||||
this->set_item_unidentified_flag_if_challenge(item);
|
this->set_item_unidentified_flag_if_challenge(item);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemCreator::generate_common_weapon_grind(
|
void ItemCreator::generate_common_weapon_grind(
|
||||||
|
|||||||
Reference in New Issue
Block a user