From c96f79ca2b385b1f7a6fe9647cce2587f9927527 Mon Sep 17 00:00:00 2001 From: clayamore Date: Sat, 23 Mar 2024 18:43:57 +0100 Subject: [PATCH] changed empty arrow slot id and empty bolt slot id to -1 instead of 0 --- src/save/save.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/save/save.rs b/src/save/save.rs index eb84aa3..44051db 100644 --- a/src/save/save.rs +++ b/src/save/save.rs @@ -545,14 +545,14 @@ pub mod save { slot.equip_data.arrows[weapon_slot_index] = equip_index; slot.chr_asm.arrows[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; slot.chr_asm2.arrows[weapon_slot_index] = gaitem_handle; - slot.equipped_items.arrows[weapon_slot_index] = item_id; + slot.equipped_items.arrows[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; }, SaveType::PlayStation(ps_save) => { let slot = &mut ps_save.save_slots[slot_index]; slot.equip_data.arrows[weapon_slot_index] = equip_index; slot.chr_asm.arrows[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; slot.chr_asm2.arrows[weapon_slot_index] = gaitem_handle; - slot.equipped_items.arrows[weapon_slot_index] = item_id; + slot.equipped_items.arrows[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; }, } } @@ -565,14 +565,14 @@ pub mod save { slot.equip_data.bolts[weapon_slot_index] = equip_index; slot.chr_asm.bolts[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; slot.chr_asm2.bolts[weapon_slot_index] = gaitem_handle; - slot.equipped_items.bolts[weapon_slot_index] = item_id; + slot.equipped_items.bolts[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; }, SaveType::PlayStation(ps_save) => { let slot = &mut ps_save.save_slots[slot_index]; slot.equip_data.bolts[weapon_slot_index] = equip_index; slot.chr_asm.bolts[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; slot.chr_asm2.bolts[weapon_slot_index] = gaitem_handle; - slot.equipped_items.bolts[weapon_slot_index] = item_id; + slot.equipped_items.bolts[weapon_slot_index] = if item_id == 0 {u32::MAX} else {item_id}; }, } }