You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can buy an item from Wirt in Diablo and, due to the 1.5x price adjustment, immediately be unable to use it because it's too expensive.
To Reproduce
Note: The following steps will no longer reproduce the issue using the latest commits from master. You will need to either test using a commit before d8811eb or find a way to reproduce in Multiplayer.
Since the price goes up in Diablo, the price adjustment can drive the _iIvalue stat above the price limit and cause the logic in IsShopPriceValid() to produce the wrong result.
Introduced by commit cfac786. Prior to that commit, IsShopPriceValid() was only called on items that were just regenerated and therefore not price-adjusted.
To fix this issue, I'd recommend applying Wirt's price adjustment as-needed rather than storing it directly in _iIvalue. However, I haven't really evaluated that solution to see if it's viable. Given how messy the shop code is, I wouldn't be surprised if it wasn't.
Operating System
Windows x64
DevilutionX version
Custom build (please specify commit ID)
Describe
You can buy an item from Wirt in Diablo and, due to the 1.5x price adjustment, immediately be unable to use it because it's too expensive.
To Reproduce
Note: The following steps will no longer reproduce the issue using the latest commits from master. You will need to either test using a commit before d8811eb or find a way to reproduce in Multiplayer.
Expected Behavior
No response
Additional context
Wirt's price adjustment gets applied to the item's
_iIvalue
field inBoyBuyEnter()
.devilutionX/Source/stores.cpp
Lines 1769 to 1786 in 9427513
Since the price goes up in Diablo, the price adjustment can drive the
_iIvalue
stat above the price limit and cause the logic inIsShopPriceValid()
to produce the wrong result.devilutionX/Source/items/validation.cpp
Lines 59 to 63 in 9427513
Introduced by commit cfac786. Prior to that commit,
IsShopPriceValid()
was only called on items that were just regenerated and therefore not price-adjusted.Tested using commit f4b6b54
The text was updated successfully, but these errors were encountered: