handle unsealable items on BB

This commit is contained in:
Martin Michelsen
2023-06-23 17:32:10 -07:00
parent d6f8fb8917
commit 9602773021
3 changed files with 20 additions and 3 deletions
+10 -2
View File
@@ -262,9 +262,17 @@ void ItemData::add_mag_photon_blast(uint8_t pb_num) {
}
}
uint16_t ItemData::get_sealed_item_kill_count() const {
return ((this->data1[10] << 8) | this->data1[11]) & 0x7FFF;
}
void ItemData::set_sealed_item_kill_count(uint16_t v) {
this->data1[10] = (v >> 8) | 0x80;
this->data1[11] = v;
if (v > 0x7FFF) {
this->data1w[5] = 0xFFFF;
} else {
this->data1[10] = (v >> 8) | 0x80;
this->data1[11] = v;
}
}
uint8_t ItemData::get_tool_item_amount() const {