| 45 | } |
| 46 | |
| 47 | bool 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 | |
| 60 | bool IsShopPriceValid(const Item &item) |
| 61 | { |
no outgoing calls
no test coverage detected