From fd397e9e1c2878111ce33484c1f76a000d9d0388 Mon Sep 17 00:00:00 2001 From: RavePossum <145081120+ravepossum@users.noreply.github.com> Date: Sun, 8 Dec 2024 05:07:19 -0500 Subject: [PATCH] Fix move category and category icon when PSS is off (#5786) --- src/battle_controller_player.c | 3 +-- src/battle_util.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 3396999487..00e73735e8 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -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); } diff --git a/src/battle_util.c b/src/battle_util.c index 3aaa756e44..9cb4da700b 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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)