summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinspectredc <78732756+inspectredc@users.noreply.github.com>2023-08-20 18:57:27 +0100
committerGitHub <noreply@github.com>2023-08-20 12:57:27 -0500
commit55cd8c1539c03c5805282bfe63bbcdb93085341b (patch)
treefdc767704967c13842f0d2b356b0b688447546e7
parentd06e6af306daa87a9e0329dba6cac01057edc354 (diff)
Update z_kaleido_item.c to include additional bow swapping scenario on equip (#2655)
-rw-r--r--soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c12
1 files changed, 11 insertions, 1 deletions
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);
+ }
}
}