dao::items
Declared in dao/Items.h.
Classes
| Class | |
|---|---|
| Requirement | An attribute an item asks of the creature that uses it. |
Functions
CanUse()
bool CanUse(ObjectId creature, ObjectId item)
Returns whether a creature can use an item, as the inventory greys it out: its attributes, the item’s own conditions, and the slots the creature has.
Requirements()
std::vector<Requirement> Requirements(ObjectId item, ObjectId creature=kInvalidObject)
Returns an item’s attribute requirements of a creature, as its tooltip shows them: its base item’s, raised by its material, and an Arcane Warrior’s magic in place of strength when that is the higher.
Call it, and CanUse, on the game thread.
| Parameter | |
|---|---|
creature |
kInvalidObject for the item’s own, each then met |
Returns none for an item with none, or one that ignores them