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

Function RndBoyItem

Source/items.cpp:3615–3629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3613}
3614
3615int RndBoyItem(int lvl)
3616{
3617 int i, ri;
3618 int ril[512];
3619
3620 ri = 0;
3621 for (i = 1; AllItemsList[i].iLoc != ILOC_INVALID; i++) {
3622 if (AllItemsList[i].iRnd && PremiumItemOk(i) && lvl >= AllItemsList[i].iMinMLvl) {
3623 ril[ri] = i;
3624 ri++;
3625 }
3626 }
3627
3628 return ril[random_(49, ri)] + 1;
3629}
3630
3631void SpawnBoy(int lvl)
3632{

Callers 2

SpawnBoyFunction · 0.85
RecreateBoyItemFunction · 0.85

Calls 2

PremiumItemOkFunction · 0.85
random_Function · 0.85

Tested by

no test coverage detected