benilla-re systems structs docs

FindEquippedItemForSpell

function · objectlayer · primitive

Address
0x5f0c50 · 270 bytes, up to 0x5f0d5d
Meaning
Returns the first unbroken item in masked equipment slots matching a spell's item class and subclass mask
Confidence
verified, proof one
Finding
spell/checks#equipped-item-and-ammo

Finding: Equipped item and ammo in spell: checks

0x6e40e0(caster, rec, ammo, report) returns 1 for a caster not the active player, Targets & 0x10, EquippedItemClass < 0 or a zero subclass mask. The slot mask is 0x8000 for AttributesEx3 & 0x400, else 0x10000 for & 0x1000000, else all. No item from 0x5f0c50 is reason 0x1a for 0x400, else 0x1b for 0x1000000, else 0x19; with both bits a second search of slot 16 alone fails as 0x1b. Then, with ammo set, 1 is returned for an ItemSubClass.dbc match with flags 0x10, and for an item without a stats record or with ammo type 0; else a carried projectile (class 6) of that subclass whose entry is PLAYER_AMMO_ID must be found through 0x6e43a0, or 0x2f SPELL_FAILED_NEED_AMMO.

The derivation is in the doc.

Callers 2

Callees 3

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