Fixed Flute Items being consumed in battle (#4496)

This commit is contained in:
Eduardo Quezada 2024-05-05 08:26:30 -04:00 committed by GitHub
parent f07ef07855
commit bcb230f3c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4595,7 +4595,8 @@ void ItemUseCB_BattleScript(u8 taskId, TaskFunc task)
gBattleStruct->itemPartyIndex[gBattlerInMenuId] = GetPartyIdFromBattleSlot(gPartyMenu.slotId);
gPartyMenuUseExitCallback = TRUE;
PlaySE(SE_SELECT);
RemoveBagItem(gSpecialVar_ItemId, 1);
if (!IsItemFlute(gSpecialVar_ItemId))
RemoveBagItem(gSpecialVar_ItemId, 1);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = task;
}