Bubb13 / EEex

An executable extender for Beamdog's Enhanced Edition of the Infinity Engine
50 stars 7 forks source link

[op182] Apply EFF while ITM #59

Closed 4Luke4 closed 1 year ago

4Luke4 commented 1 year ago

The internal function op182 uses to find the item, CGameSprite::FindItemPersonal(), treats the found slot index as a boolean, so it always applies the specified EFF unless the ITM is in SLOT_AMULET.

This PR corrects what the engine considers a "fail" return value from CGameSprite::FindItemPersonal(). It originally, and erroneously considered 0 (SLOT_AMULET) the fail condition; it now properly considers -1 to be a failure.

Bubb13 commented 1 year ago

Thanks!