Fixed shiny object events

This commit is contained in:
Hedara 2025-01-05 10:14:10 +01:00
parent c3b0f4dd7f
commit 5868c2756a

View file

@ -1668,7 +1668,13 @@ static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEven
return OBJECT_EVENTS_COUNT;
objectEvent = &gObjectEvents[objectEventId];
if (objectEvent->graphicsId >= OBJ_EVENT_GFX_MON_BASE + SPECIES_SHINY_TAG)
{
objectEvent->shiny = TRUE;
objectEvent->graphicsId -= SPECIES_SHINY_TAG;
}
graphicsInfo = GetObjectEventGraphicsInfo(objectEvent->graphicsId);
if (spriteTemplate->paletteTag != TAG_NONE && spriteTemplate->paletteTag != OBJ_EVENT_PAL_TAG_DYNAMIC)
LoadObjectEventPalette(spriteTemplate->paletteTag);
@ -1678,18 +1684,6 @@ static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEven
if (OW_GFX_COMPRESS)
spriteTemplate->tileTag = LoadSheetGraphicsInfo(graphicsInfo, objectEvent->graphicsId, NULL);
if (objectEvent->graphicsId >= OBJ_EVENT_GFX_MON_BASE + SPECIES_SHINY_TAG)
{
objectEvent->shiny = TRUE;
objectEvent->graphicsId -= SPECIES_SHINY_TAG;
}
if (objectEvent->graphicsId >= OBJ_EVENT_GFX_MON_BASE + SPECIES_SHINY_TAG)
{
objectEvent->shiny = TRUE;
objectEvent->graphicsId -= SPECIES_SHINY_TAG;
}
spriteId = CreateSprite(spriteTemplate, 0, 0, 0);
if (spriteId == MAX_SPRITES)
{