blob: 5614e9b50a9da1bda459e1b0a46e1743239ab21c (
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 *entityData = entityData = pokemon->entityData;
if (!(entityData->heldItem.itemFlags & ITEM_FLAG_EXISTS))
{
return FALSE;
}
if (entityData->heldItem.itemFlags & ITEM_FLAG_STICKY)
{
return FALSE;
}
if (entityData->heldItem.itemIndex != itemIndex)
{
return FALSE;
}
return TRUE;
}
|