Browse Source

Revert changes to price validation logic in cfac786

pull/7562/head
staphen 1 year ago committed by Anders Jenbo
parent
commit
9427513489
  1. 10
      Source/items/validation.cpp

10
Source/items/validation.cpp

@ -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;

Loading…
Cancel
Save