CheckSpellEquippedItem
function · spell · primitive
- Address
0x6e40e0· 692 bytes, up to0x6e4393- Signature
uint8_t __fastcall (void *caster, const void *rec, uint8_t checkAmmo, uint8_t report)- Meaning
- Refuses a spell whose required item is not equipped (0x19 to 0x1b) or whose ammo is not carried (0x2f)
- 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
- IsSpellUsable spell
- TryCastSpell spell
Callees 8
- ClntObjMgrGetActivePlayer objectlayer
- DBCache_ItemStats_C_int_HASHKEY_INT_::GetRecord dbcache
- GetItemClass objectlayer
- GetItemSubClass objectlayer
- FindEquippedItemForSpell objectlayer
- IsActivePlayerUnit objectlayer
- WalkInventoryItems objectlayer
- ReportCastFailure spell
Calls and jumps by a bare address, from tables/calls.tsv.