MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / IsTownItemValid

Function IsTownItemValid

Source/items/validation.cpp:47–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47bool IsTownItemValid(uint16_t iCreateInfo)
48{
49 const uint8_t level = iCreateInfo & CF_LEVEL;
50 const bool isBoyItem = (iCreateInfo & CF_BOY) != 0;
51 const uint8_t maxTownItemLevel = 30;
52
53 // Wirt items in multiplayer are equal to the level of the player, therefore they cannot exceed the max character level
54 if (isBoyItem && level <= MaxCharacterLevel)
55 return true;
56
57 return level <= maxTownItemLevel;
58}
59
60bool IsShopPriceValid(const Item &item)
61{

Callers 3

IsPItemValidFunction · 0.85
UnPackNetItemFunction · 0.85
IsItemValidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected