prep for $loadchar on xbox

This commit is contained in:
Martin Michelsen
2024-05-01 23:26:42 -07:00
parent 636309952e
commit 57ea246dd7
4 changed files with 13 additions and 3 deletions
+3
View File
@@ -436,6 +436,9 @@ void ItemData::encode_for_version(Version to_version, shared_ptr<const ItemParam
switch (this->data1[0]) {
case 0x00:
if (should_encode_v2_data && (this->data1[1] > 0x26)) {
if (!item_parameter_table) {
throw logic_error("item parameter table is required to encode v2 data");
}
if (this->data1[1] < 0x89) {
this->data1[5] = this->data1[1];
this->data1[1] = item_parameter_table->get_weapon_v1_replacement(this->data1[1]);