From 2ed6427773d108660d7edef382b22e1c8df4bb52 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 30 Mar 2023 09:39:21 -0700 Subject: [PATCH] fix some names in ItemCreator --- src/ItemCreator.cc | 8 ++++---- src/ItemCreator.hh | 2 +- src/ItemData.cc | 2 +- src/ItemData.hh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ItemCreator.cc b/src/ItemCreator.cc index 1681e277..183bd704 100644 --- a/src/ItemCreator.cc +++ b/src/ItemCreator.cc @@ -328,7 +328,7 @@ ItemData ItemCreator::check_rate_and_create_rare_item( } this->clear_item_if_restricted(item); - this->set_item_unidentified_or_present_flags_if_unsealable(item); + this->set_item_kill_count_if_unsealable(item); return item; } @@ -390,9 +390,9 @@ void ItemCreator::deduplicate_weapon_bonuses(ItemData& item) const { } } -void ItemCreator::set_item_unidentified_or_present_flags_if_unsealable(ItemData& item) const { +void ItemCreator::set_item_kill_count_if_unsealable(ItemData& item) const { if (this->item_parameter_table->is_unsealable_item(item)) { - item.set_unidentified_or_present_flag(0); + item.set_sealed_item_kill_count(0); } } @@ -552,7 +552,7 @@ void ItemCreator::generate_common_item_variances( } this->clear_item_if_restricted(item); - this->set_item_unidentified_or_present_flags_if_unsealable(item); + this->set_item_kill_count_if_unsealable(item); } void ItemCreator::generate_common_armor_or_shield_type_and_variances( diff --git a/src/ItemCreator.hh b/src/ItemCreator.hh index f7b5b646..b604543f 100644 --- a/src/ItemCreator.hh +++ b/src/ItemCreator.hh @@ -122,7 +122,7 @@ private: void generate_rare_weapon_bonuses(ItemData& item, uint32_t random_sample); void deduplicate_weapon_bonuses(ItemData& item) const; - void set_item_unidentified_or_present_flags_if_unsealable(ItemData& item) const; + void set_item_kill_count_if_unsealable(ItemData& item) const; void set_item_unidentified_flag_if_challenge(ItemData& item) const; void set_tool_item_amount_to_1(ItemData& item) const; diff --git a/src/ItemData.cc b/src/ItemData.cc index 19ae30f6..e78f8b7b 100644 --- a/src/ItemData.cc +++ b/src/ItemData.cc @@ -104,7 +104,7 @@ void ItemData::clear_mag_stats() { -void ItemData::set_unidentified_or_present_flag(uint16_t v) { +void ItemData::set_sealed_item_kill_count(uint16_t v) { this->data1[10] = (v >> 8) | 0x80; this->data1[11] = v; } diff --git a/src/ItemData.hh b/src/ItemData.hh index 7deac76f..1e9ffe35 100644 --- a/src/ItemData.hh +++ b/src/ItemData.hh @@ -80,7 +80,7 @@ struct ItemData { // 0x14 bytes void assign_mag_stats(const ItemMagStats& mag); void clear_mag_stats(); - void set_unidentified_or_present_flag(uint16_t v); + void set_sealed_item_kill_count(uint16_t v); uint8_t get_tool_item_amount() const; void set_tool_item_amount(uint8_t amount); int16_t get_armor_or_shield_defense_bonus() const;