dao::loot

Declared in dao/Loot.h.

Enumerations

Result

enum class Result : std::uint8_t

What a button did.

Value  
Closed the panel closed; the game mode goes back on its next update
BackpackFull Take All took what fitted, the panel stays shown with items left.
NotShown no loot panel is shown, so nothing was done

Functions

Close()

Result Close()

Closes the panel as its Close button does: a container that takes nothing and is empty is left, as the engine leaves an emptied one, no longer to be used.

Container()

std::optional<ObjectId> Container()

Returns the container the loot panel shows: a chest, a body’s bag, a pile of bones.

Call it, and the rest, on the game thread.

Returns nullopt when no loot panel is shown

TakeAll()

Result TakeAll()

Takes everything into the party’s backpack as the Take All button does, then closes the panel, unless the backpack filled with items left.