benilla-re systems structs docs

CountInventoryItemsByEntry

function · objectlayer · orchestration

Address
0x622130 · 46 bytes, up to 0x62215d
Meaning
Sums the stack counts of the inventory's items of an entry through the walk 0x622420
Confidence
verified, proof one
Finding
spell/checks#totems-and-reagents

Finding: Totems and reagents in spell: checks

0x6e4000(caster, rec, report) returns 1 when the caster is not the active player. Otherwise it tests the two totems, then the eight reagents, and returns 0 at the first miss: a nonzero totem (+0xa0, +0xa4) with no carried item of that entry is reason 0x78 SPELL_FAILED_TOTEMS; a nonzero reagent (+0xa8 on) whose carried count is below its count (+0xc8 on, signed) is 0x5c SPELL_FAILED_REAGENTS. With report set it first calls 0x6e1a00(id, reason, entry, −1, 0). Carried means found by the walk 0x622420 with mask 0: slots 0 to 0x26 and 0x51 to 0x70 and bag contents, never the bank, skipping an item with ITEM_FIELD_FLAGS & 0x10, or with durability 0 of a nonzero maximum unless its flags have 8.

The derivation is in the doc.

Callers 18

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.