// This file is part of ClassicAPI.
//
// ClassicAPI is free software: you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software Foundation, either
// version 3 of the License, or (at your option) any later version.
//
// ClassicAPI is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// ClassicAPI. If not, see .
#pragma once
#include
namespace Item::ID {
// The itemID of a resolved `CGItem *`: OBJECT_FIELD_ENTRY in its object data
// block (Object::Entry). 0 for a null or unpopulated item, so callers can
// short-circuit to a nil push.
int FromCGItem(const uint8_t *item);
// A player's visible-item entry for equipment slot `slot0` (0..18, INVSLOT - 1):
// the broadcast block every player in view carries (FUN_UNIT_GET_VISIBLE_ITEM),
// with the itemID at OFF_VISIBLE_ITEM_ITEM_ID and the enchants after it.
// nullptr for a slot out of range. `player` must be a player object: a
// creature's table is not initialized and the engine call reads garbage.
const uint8_t *VisibleEntry(void *player, int slot0);
// The itemID in that entry, 0 for an empty slot or one out of range.
uint32_t Visible(void *player, int slot0);
} // namespace Item::ID