Fix move category and category icon when PSS is off (#5786)

This commit is contained in:
RavePossum 2024-12-08 05:07:19 -05:00 committed by GitHub
parent 6e6352569f
commit fd397e9e1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -1759,7 +1759,6 @@ static void MoveSelectionDisplayMoveDescription(u32 battler)
u16 move = moveInfo->moves[gMoveSelectionCursor[battler]];
u16 pwr = gMovesInfo[move].power;
u16 acc = gMovesInfo[move].accuracy;
u8 cat = gMovesInfo[move].category;
u8 pwr_num[3], acc_num[3];
u8 cat_desc[7] = _("CAT: ");
@ -1796,7 +1795,7 @@ static void MoveSelectionDisplayMoveDescription(u32 battler)
if (gCategoryIconSpriteId == 0xFF)
gCategoryIconSpriteId = CreateSprite(&gSpriteTemplate_CategoryIcons, 38, 64, 1);
StartSpriteAnim(&gSprites[gCategoryIconSpriteId], cat);
StartSpriteAnim(&gSprites[gCategoryIconSpriteId], GetBattleMoveCategory(move));
CopyWindowToVram(B_WIN_MOVE_DESCRIPTION, COPYWIN_FULL);
}

View file

@ -11212,7 +11212,7 @@ u8 GetBattleMoveCategory(u32 moveId)
if (IS_MOVE_STATUS(moveId))
return DAMAGE_CATEGORY_STATUS;
return gTypesInfo[GetMoveType(gCurrentMove)].damageCategory;
return gTypesInfo[GetMoveType(moveId)].damageCategory;
}
static bool32 TryRemoveScreens(u32 battler)