| 157 | } |
| 158 | |
| 159 | bool IsItemValid(const Item &item) |
| 160 | { |
| 161 | if (!gbIsMultiplayer) |
| 162 | return true; |
| 163 | |
| 164 | if (item.IDidx == IDI_EAR) |
| 165 | return true; |
| 166 | if (item.IDidx != IDI_GOLD && !IsCreationFlagComboValid(item._iCreateInfo)) |
| 167 | return false; |
| 168 | if ((item._iCreateInfo & CF_TOWN) != 0) |
| 169 | return IsTownItemValid(item._iCreateInfo) && IsShopPriceValid(item); |
| 170 | if ((item._iCreateInfo & CF_USEFUL) == CF_UPER15) |
| 171 | return IsUniqueMonsterItemValid(item._iCreateInfo, item.dwBuff); |
| 172 | if ((item.dwBuff & CF_HELLFIRE) != 0 && AllItemsList[item.IDidx].iMiscId == IMISC_BOOK) |
| 173 | return IsHellfireSpellBookValid(item); |
| 174 | |
| 175 | return IsDungeonItemValid(item._iCreateInfo, item.dwBuff); |
| 176 | } |
| 177 | |
| 178 | } // namespace devilution |
no test coverage detected