Don't validate items in Single Player #7159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently received a copy of a Veil of Steel that had been generated in vanilla Hellfire with ilvl 25 and both the
CF_UNIQUE
flag and theCF_SMITHPREMIUM
flag. Here is a character save with a copy of the item: single_0.hsv.zip.This is basically the same issue as described in #6560, except in this case the function is
SpawnUnique()
which doesn't useitem[0]
but rather gets an available item using theitemavail
array.Basically, for Single Player quest reward items created using either
SpawnUnique()
orCreateItem()
in vanilla Diablo/Hellfire, the create info will be inherited from whatever happens to have been in theitem
array before the quest reward item's creation. In this case, it was one of Griswold's premium items. It adds theCF_UNIQUE
flag which creates an invalid combination of flags on the item, thereby causing the item to fail validation in DevilutionX.Since these quest reward items from vanilla can only be found in Single Player, we can solve this by simply disabling the validation logic in Single Player. Given that the intent of validation is to mitigate the proliferation of invalid items in Multiplayer games, I doubt we even intended for this logic to apply to Single Player in the first place.