Closed Argent77 closed 8 years ago
This appears to happen when the item being deleted is in the last position within container. In that case the first item in the next container will also be deleted.
It checks "fj_delete_mode != item_count + item_index" and deletes if true. Problem is, the values essentially swap when the function proceeds to the next container, so it returns true twice instead of once.
Fixed.
The given code
is supposed to find the item index of TOME02A.ITM in AR3017.ARE (Watcher's Keep, Level 4) and delete it via
fj_are_structure
. However, it not only removes the desired item, but also removes the following item which is referenced by another container and happens to be the quest item "Crystal Mallet" (PLOT04D.ITM) in this instance.I'm getting the same results in BG2:ToB, BG2:EE and EET. Using the code for different items on different maps appears to work correctly though.