Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression caused by Foe item queues
Foe item queues broke certain items being removed correctly by other quest actions. This regression was introduced by commit 5c30873 Problem is caused by item cloning behaviour of queues desyncing prototype item UID from cloned item UID. When ReleaseQuestItemForReoffer() was called by various quest actions, it was unable to find cloned items because it was searching on prototype item UID only. Refactored ReleaseQuestItemForReoffer() to search on quest UID and item Symbol instead. This is more stable than item UID and will not break by cloning. This fixes item removal behaviour for several quest actions broken by Foe item queues: -GetItem -GivePc -TakeItem -TotingItemAndClickedNpc These actions will no longer leave behind orphaned items if previously cloned via Foe item queue. Process remains compatible with prototype items added directly to an item collection without first being cloned by Foe item queue. Removed CleanupPlayerQuestItems() mitigation in Quest as it's no longer required now these quest actions have correct behaviour again. Global orphaned item cleanup remains at load time.
- Loading branch information
1 parent
9d0eeeb
commit 06afccc
Showing
7 changed files
with
31 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters