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

Function PremiumItemOk

Source/items.cpp:3395–3417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3393}
3394
3395BOOL PremiumItemOk(int i)
3396{
3397 BOOL rv;
3398
3399 rv = TRUE;
3400 if (AllItemsList[i].itype == ITYPE_MISC)
3401 rv = FALSE;
3402 if (AllItemsList[i].itype == ITYPE_GOLD)
3403 rv = FALSE;
3404 if (AllItemsList[i].itype == ITYPE_0E)
3405 rv = FALSE;
3406 if (AllItemsList[i].itype == ITYPE_STAFF)
3407 rv = FALSE;
3408
3409 if (gbMaxPlayers != 1) {
3410 if (AllItemsList[i].itype == ITYPE_RING)
3411 rv = FALSE;
3412 if (AllItemsList[i].itype == ITYPE_AMULET)
3413 rv = FALSE;
3414 }
3415
3416 return rv;
3417}
3418
3419int RndPremiumItem(int minlvl, int maxlvl)
3420{

Callers 2

RndPremiumItemFunction · 0.85
RndBoyItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected