Skip to content

Updated InvalidateItem() to find multiple appearances#1

Open
RabidAnteater wants to merge 2 commits into
masterfrom
RabidAnteater-InvalidateItem
Open

Updated InvalidateItem() to find multiple appearances#1
RabidAnteater wants to merge 2 commits into
masterfrom
RabidAnteater-InvalidateItem

Conversation

@RabidAnteater
Copy link
Copy Markdown
Owner

InvalidateItem() only invalidates the first appearances of an item in the _itemIds list. If the item appears again in the list, the later appearances are not invalidated. This leads to 'ghost' items that cause problems with other parts of the script, such as ProcessItem().

e.g. An invalid item, a_itemId, appears in both Group 1 @ index 2 and Group 4 @ index 96.
_itemIds1.Find(a_itemId) returns 2 and sets _itemInvalidFlags1[2] = true. Processing stops and the instance in group 4 is not detected.

InvalidateItem() only invalidates the first appearances of an item in the _itemIds list. If the item appears again in the list, the later appearances are not invalidated. This leads to 'ghost' items that cause problems with other parts of the script, such as ProcessItem().

e.g. An invalid item, a_itemId, appears in both Group 1 @ index 2 and Group 4 @ index 96. 
_itemIds1.Find(a_itemId) returns 2 and sets _itemInvalidFlags1[2] = true. Processing stops and the instance in group 4 is not detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant