blob: bfaab5368c090b48697739f7a6c1ede7542e64bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "global.h"
#include "dungeon_items.h"
bool8 HasItem(struct DungeonEntity *pokemon, u8 itemIndex)
{
// Weird assignment to fix a regswap.
struct DungeonEntityData *pokemonData = pokemonData = pokemon->entityData;
if (!(pokemonData->heldItem.itemFlags & ITEM_FLAG_EXISTS))
{
return FALSE;
}
if (pokemonData->heldItem.itemFlags & ITEM_FLAG_STICKY)
{
return FALSE;
}
if (pokemonData->heldItem.itemIndex != itemIndex)
{
return FALSE;
}
return TRUE;
}
|