diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.11k stars 795 forks source link

Clear unique item flags in LoadGameLevel() #7515

Closed StephenCWills closed 2 weeks ago

StephenCWills commented 2 weeks ago

Vanilla called InitItemGFX() in LoadGameLevel() when firstflag == true. https://github.com/diasurgical/devilution/blob/bbda8dd586c65b03028ec75c52f8ea8627eb9ff5/Source/diablo.cpp#L1845

In DevilutionX, this call to InitItemGFX() was moved to game client startup, and also when changing various settings.

Startup: https://github.com/diasurgical/devilutionX/blob/d8dde8d2b119dfbc7973384aa598bd9e9de2c864/Source/diablo.cpp#L1217-L1218

Changing settings: https://github.com/diasurgical/devilutionX/blob/d8dde8d2b119dfbc7973384aa598bd9e9de2c864/Source/DiabloUI/settingsmenu.cpp#L211-L214

This function had side effects with regard to the unique item drop table. This PR simply moves those side effects to its own function and invokes it in the same place vanilla does.