MCPcopy Create free account
hub / github.com/diasurgical/devilution / RecreatePremiumItem

Function RecreatePremiumItem

Source/items.cpp:3796–3808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3794}
3795
3796void RecreatePremiumItem(int ii, int idx, int plvl, int iseed)
3797{
3798 int itype;
3799
3800 SetRndSeed(iseed);
3801 itype = RndPremiumItem(plvl >> 2, plvl) - 1;
3802 GetItemAttrs(ii, itype, plvl);
3803 GetItemBonus(ii, itype, plvl >> 1, plvl, TRUE);
3804
3805 item[ii]._iSeed = iseed;
3806 item[ii]._iCreateInfo = plvl | 0x800;
3807 item[ii]._iIdentified = TRUE;
3808}
3809
3810void RecreateBoyItem(int ii, int idx, int lvl, int iseed)
3811{

Callers 1

RecreateTownItemFunction · 0.85

Calls 4

SetRndSeedFunction · 0.85
RndPremiumItemFunction · 0.85
GetItemAttrsFunction · 0.85
GetItemBonusFunction · 0.85

Tested by

no test coverage detected