From 55cd8c1539c03c5805282bfe63bbcdb93085341b Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 20 Aug 2023 18:57:27 +0100 Subject: [PATCH] Update z_kaleido_item.c to include additional bow swapping scenario on equip (#2655) --- .../overlays/misc/ovl_kaleido_scope/z_kaleido_item.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index b37f9ef69..0cc51ec98 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -903,7 +903,17 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) { gSaveContext.equips.buttonItems[otherButtonIndex] = ITEM_NONE; gSaveContext.equips.cButtonSlots[otherSlotIndex] = SLOT_NONE; } - break; // Assume there is only one possible pre-existing equip + //break; // 'Assume there is only one possible pre-existing equip' + } + + //Fix for Equip Dupe + if (pauseCtx->equipTargetItem == ITEM_BOW) { + if ((gSaveContext.equips.buttonItems[otherButtonIndex] >= ITEM_BOW_ARROW_FIRE) && + (gSaveContext.equips.buttonItems[otherButtonIndex] <= ITEM_BOW_ARROW_LIGHT)) { + gSaveContext.equips.buttonItems[otherButtonIndex] = gSaveContext.equips.buttonItems[targetButtonIndex]; + gSaveContext.equips.cButtonSlots[otherSlotIndex] = gSaveContext.equips.cButtonSlots[pauseCtx->equipTargetCBtn]; + Interface_LoadItemIcon2(play, otherButtonIndex); + } } }