| 4782 | } |
| 4783 | |
| 4784 | void Item::updateRequiredStatsCacheForPlayer(const Player &player) |
| 4785 | { |
| 4786 | if (_itype == ItemType::Misc && _iMiscId == IMISC_BOOK) { |
| 4787 | _iMinMag = GetSpellData(_iSpell).minInt; |
| 4788 | int8_t spellLevel = player._pSplLvl[static_cast<int8_t>(_iSpell)]; |
| 4789 | while (spellLevel != 0) { |
| 4790 | _iMinMag += 20 * _iMinMag / 100; |
| 4791 | spellLevel--; |
| 4792 | if (_iMinMag + 20 * _iMinMag / 100 > 255) { |
| 4793 | _iMinMag = 255; |
| 4794 | spellLevel = 0; |
| 4795 | } |
| 4796 | } |
| 4797 | } |
| 4798 | _iStatFlag = player.CanUseItem(*this); |
| 4799 | } |
| 4800 | |
| 4801 | StringOrView Item::getName() const |
| 4802 | { |
no test coverage detected