Fix ability to assign equipment you don't own

This commit is contained in:
rozlette 2022-06-23 22:12:41 -05:00 committed by Kenix3
commit 8535568f53

View file

@ -535,6 +535,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
} else if (CVar_GetS32("gAssignableTunicsAndBoots", 0) != 0) {
// Only allow assigning tunic and boots to c-buttons
if (pauseCtx->cursorY[PAUSE_EQUIP] > 1) {
if (CHECK_OWNED_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP] - 1)) {
u16 slot = 0;
switch (cursorItem) {
case ITEM_TUNIC_KOKIRI:
@ -561,6 +562,10 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
KaleidoScope_SetupItemEquip(globalCtx, cursorItem, slot,
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
}
}
} else {