Renamed GetItemAIFlag to match pmdsky-debug

This commit is contained in:
AnonymousRandomPerson 2024-12-28 23:57:20 -06:00
parent 560560bbe7
commit 1ec6bc5e21
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ u8 GetItemPalette(u8 id);
u32 GetItemActionType(u8 id);
u32 GetSpawnAmountRange(u8 id, u32 r1);
u8 *GetItemDescription(u8 id);
bool8 GetItemAIFlag(u8 id, u32 aiFlag);
bool8 TestItemAIFlag(u8 id, u32 aiFlag);
void BufferItemName(u8 *, u8 id, unkStruct_8090F58 *);
void sub_8090E14(u8 *ext_buffer, Item *slot, const unkStruct_8090F58 *);
bool8 AddItemToInventory(const Item* slot);

View File

@ -189,7 +189,7 @@ void AIDecideUseItem(Entity *pokemon)
{
if ((item->flags & ITEM_FLAG_STICKY) == 0)
{
if (GetItemAIFlag(item->id, ITEM_AI_FLAG_TARGET_SELF))
if (TestItemAIFlag(item->id, ITEM_AI_FLAG_TARGET_SELF))
{
u32 itemWeight = GetAIUseItemProbability(pokemon, item, ITEM_TARGET_ALLY);
if (itemWeight != 0)
@ -228,7 +228,7 @@ void AIDecideUseItem(Entity *pokemon)
for (thrownAIFlag = ITEM_AI_FLAG_TARGET_ALLY; thrownAIFlag <= ITEM_AI_FLAG_TARGET_ENEMY; thrownAIFlag++)
{
potentialTargetWeights = gAIThrownItemProbabilities;
if (GetItemAIFlag(item->id, thrownAIFlag))
if (TestItemAIFlag(item->id, thrownAIFlag))
{
u8 itemType = GetItemCategory(item->id);
if (itemType == CATEGORY_THROWN_ARC)

View File

@ -285,7 +285,7 @@ u8 *GetItemDescription(u8 id)
return gItemParametersData[id].description;
}
bool8 GetItemAIFlag(u8 id, u32 aiFlag)
bool8 TestItemAIFlag(u8 id, u32 aiFlag)
{
return gItemParametersData[id].aiFlags[aiFlag];
}