Update z_kaleido_item.c to include additional bow swapping scenario on equip (#2655)

This commit is contained in:
inspectredc 2023-08-20 18:57:27 +01:00 committed by GitHub
parent d06e6af306
commit 55cd8c1539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -903,7 +903,17 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) {
gSaveContext.equips.buttonItems[otherButtonIndex] = ITEM_NONE; gSaveContext.equips.buttonItems[otherButtonIndex] = ITEM_NONE;
gSaveContext.equips.cButtonSlots[otherSlotIndex] = SLOT_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);
}
} }
} }