Skip to content

Commit

Permalink
Revert changes to price validation logic in cfac786
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills authored and AJenbo committed Nov 27, 2024
1 parent f4b6b54 commit 9427513
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/items/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ bool IsTownItemValid(uint16_t iCreateInfo, const Player &player)

bool IsShopPriceValid(const Item &item)
{
const int boyPriceLimit = gbIsHellfire ? MaxBoyValueHf : MaxBoyValue;
if ((item._iCreateInfo & CF_BOY) != 0 && item._iIvalue > boyPriceLimit)
const int boyPriceLimit = MaxBoyValue;
if (!gbIsHellfire && (item._iCreateInfo & CF_BOY) != 0 && item._iIvalue > boyPriceLimit)
return false;

const uint16_t smithOrWitch = CF_SMITH | CF_SMITHPREMIUM | CF_WITCH;
const int premiumPriceLimit = MaxVendorValue;
if (!gbIsHellfire && (item._iCreateInfo & CF_SMITHPREMIUM) != 0 && item._iIvalue > premiumPriceLimit)
return false;

const uint16_t smithOrWitch = CF_SMITH | CF_WITCH;
const int smithAndWitchPriceLimit = gbIsHellfire ? MaxVendorValueHf : MaxVendorValue;
if ((item._iCreateInfo & smithOrWitch) != 0 && item._iIvalue > smithAndWitchPriceLimit)
return false;
Expand Down

0 comments on commit 9427513

Please sign in to comment.