| 1757 | } |
| 1758 | |
| 1759 | int SyncDropItem(Point position, _item_indexes idx, uint16_t icreateinfo, int iseed, int id, int dur, int mdur, int ch, int mch, int ivalue, uint32_t ibuff, int toHit, int maxDam) |
| 1760 | { |
| 1761 | if (ActiveItemCount >= MAXITEMS) |
| 1762 | return -1; |
| 1763 | |
| 1764 | Item item; |
| 1765 | |
| 1766 | RecreateItem(*MyPlayer, item, idx, icreateinfo, iseed, ivalue, (ibuff & CF_HELLFIRE) != 0); |
| 1767 | if (id != 0) |
| 1768 | item._iIdentified = true; |
| 1769 | item._iMaxDur = mdur; |
| 1770 | item._iDurability = ClampDurability(item, dur); |
| 1771 | item._iMaxCharges = clamp<int>(mch, 0, item._iMaxCharges); |
| 1772 | item._iCharges = clamp<int>(ch, 0, item._iMaxCharges); |
| 1773 | if (gbIsHellfire) { |
| 1774 | item._iPLToHit = ClampToHit(item, toHit); |
| 1775 | item._iMaxDam = ClampMaxDam(item, maxDam); |
| 1776 | } |
| 1777 | item.dwBuff = ibuff; |
| 1778 | |
| 1779 | return PlaceItemInWorld(std::move(item), position); |
| 1780 | } |
| 1781 | |
| 1782 | int SyncDropEar(Point position, uint16_t icreateinfo, uint32_t iseed, uint8_t cursval, string_view heroname) |
| 1783 | { |
nothing calls this directly
no test coverage detected