mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-05-31 09:31:26 -04:00
Implements fixes for competing getItem calls.
This commit is contained in:
@@ -2206,7 +2206,7 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) {
|
||||
if (item >= RG_BOTTLE_WITH_RED_POTION && item <= RG_BOTTLE_WITH_BIG_POE) {
|
||||
temp = SLOT(ITEM_BOTTLE);
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (gSaveContext.inventory.items[temp + i] == RG_NONE) {
|
||||
if (gSaveContext.inventory.items[temp + i] == ITEM_NONE) {
|
||||
switch (item) {
|
||||
case RG_BOTTLE_WITH_RED_POTION:
|
||||
item = ITEM_POTION_RED;
|
||||
@@ -2238,7 +2238,7 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) {
|
||||
}
|
||||
|
||||
gSaveContext.inventory.items[temp + i] = item;
|
||||
return RG_NONE;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,8 +242,10 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(GlobalContext* globalCtx, Randomi
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA) &&
|
||||
!Flags_GetTreasure(globalCtx, 0x1E) && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
|
||||
globalCtx->sceneLoadFlag == 0) {
|
||||
GetItemEntry getItem = Randomizer_GetItemFromKnownCheck(check, GI_ARROW_LIGHT);
|
||||
GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_ARROW_LIGHT);
|
||||
GiveItemWithoutActor(globalCtx, getItemId);
|
||||
player->getItemEntry = getItem;
|
||||
player->pendingFlag.flagID = 0x1E;
|
||||
player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user