| 3821 | } |
| 3822 | |
| 3823 | void RecreateWitchItem(int ii, int idx, int lvl, int iseed) |
| 3824 | { |
| 3825 | int iblvl, itype; |
| 3826 | |
| 3827 | if (idx == IDI_MANA || idx == IDI_FULLMANA || idx == IDI_PORTAL) { |
| 3828 | GetItemAttrs(ii, idx, lvl); |
| 3829 | } else { |
| 3830 | SetRndSeed(iseed); |
| 3831 | itype = RndWitchItem(lvl) - 1; |
| 3832 | GetItemAttrs(ii, itype, lvl); |
| 3833 | iblvl = -1; |
| 3834 | if (random_(51, 100) <= 5) |
| 3835 | iblvl = 2 * lvl; |
| 3836 | if (iblvl == -1 && item[ii]._iMiscId == IMISC_STAFF) |
| 3837 | iblvl = 2 * lvl; |
| 3838 | if (iblvl != -1) |
| 3839 | GetItemBonus(ii, itype, iblvl >> 1, iblvl, TRUE); |
| 3840 | } |
| 3841 | |
| 3842 | item[ii]._iSeed = iseed; |
| 3843 | item[ii]._iCreateInfo = lvl | 0x2000; |
| 3844 | item[ii]._iIdentified = TRUE; |
| 3845 | } |
| 3846 | |
| 3847 | void RecreateHealerItem(int ii, int idx, int lvl, int iseed) |
| 3848 | { |
no test coverage detected