From 9f1f4e4fcf044582cb995a727967dbcc76f2229c Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Fri, 13 Mar 2026 17:18:06 -0400 Subject: [PATCH] Swapped incorrect item_data_flag names --- include/item.h | 6 +++--- src/item_util_1.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/item.h b/include/item.h index ace8594d..6cb4bb51 100644 --- a/include/item.h +++ b/include/item.h @@ -1452,9 +1452,9 @@ enum item_target_flag { enum item_data_flag { ITEM_DATA_FLAG_VALID = 1 << 0, - ITEM_DATA_FLAG_CONSUMABLE = 1 << 5, + ITEM_DATA_FLAG_THROWABLE_AT_ENEMY = 1 << 5, ITEM_DATA_FLAG_THROWABLE_AT_ALLY = 1 << 6, - ITEM_DATA_FLAG_THROWABLE_AT_ENEMY = 1 << 7, + ITEM_DATA_FLAG_CONSUMABLE = 1 << 7, }; // Exclusive effect ID. These are usually encoded as bitvectors. @@ -1634,7 +1634,7 @@ struct item_volatile { }; struct bag_items_inner { - /* 0x0 */ struct item bag_items[INVENTORY_SIZE]; + /* 0x0 */ struct item bag_items[INVENTORY_SIZE]; // NOTE: I don't know why we have to do the subtraction - Seth }; diff --git a/src/item_util_1.c b/src/item_util_1.c index 28a0e080..f709d826 100644 --- a/src/item_util_1.c +++ b/src/item_util_1.c @@ -196,15 +196,15 @@ s16 GetItemMoveId(s16 item_id) bool8 TestItemAiFlag(s16 item_id, s32 flag) { - if (flag == 0) + if (flag == ITEM_FLAG_CONSUMABLE) { item_id = EnsureValidItem(item_id); - if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_THROWABLE_AT_ENEMY) + if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_CONSUMABLE) return TRUE; return FALSE; } - if (flag == 1) + if (flag == ITEM_FLAG_THROWABLE_AT_ALLY) { item_id = EnsureValidItem(item_id); if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_THROWABLE_AT_ALLY) @@ -213,7 +213,7 @@ bool8 TestItemAiFlag(s16 item_id, s32 flag) } item_id = EnsureValidItem(item_id); - if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_CONSUMABLE) + if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_THROWABLE_AT_ENEMY) return TRUE; return FALSE; }