Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonomov committed Feb 9, 2025
1 parent 6213277 commit a3f9d31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace devilution {
// Item indestructible durability
#define DUR_INDESTRUCTIBLE 255

constexpr int MaxVendorValue = 140000;
constexpr int MaxVendorValue = 200000;
constexpr int MaxVendorValueHf = 200000;
constexpr int MaxBoyValue = 90000;
constexpr int MaxBoyValue = 100000;
constexpr int MaxBoyValueHf = 200000;

enum item_quality : uint8_t {
Expand Down
4 changes: 4 additions & 0 deletions Source/items/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ bool IsCreationFlagComboValid(uint16_t iCreateInfo)

bool IsTownItemValid(uint16_t iCreateInfo)
{
return true;
const uint8_t level = iCreateInfo & CF_LEVEL;
const bool isBoyItem = (iCreateInfo & CF_BOY) != 0;
const uint8_t maxTownItemLevel = 30;
Expand All @@ -59,6 +60,7 @@ bool IsTownItemValid(uint16_t iCreateInfo)

bool IsShopPriceValid(const Item &item)
{
return true;
const int boyPriceLimit = MaxBoyValue;
if (!gbIsHellfire && (item._iCreateInfo & CF_BOY) != 0 && item._iIvalue > boyPriceLimit)
return false;
Expand All @@ -77,6 +79,7 @@ bool IsShopPriceValid(const Item &item)

bool IsUniqueMonsterItemValid(uint16_t iCreateInfo, uint32_t dwBuff)
{
return true;
const uint8_t level = iCreateInfo & CF_LEVEL;
const bool isHellfireItem = (dwBuff & CF_HELLFIRE) != 0;

Expand All @@ -101,6 +104,7 @@ bool IsUniqueMonsterItemValid(uint16_t iCreateInfo, uint32_t dwBuff)

bool IsDungeonItemValid(uint16_t iCreateInfo, uint32_t dwBuff)
{
return true;
const uint8_t level = iCreateInfo & CF_LEVEL;
const bool isHellfireItem = (dwBuff & CF_HELLFIRE) != 0;

Expand Down

0 comments on commit a3f9d31

Please sign in to comment.