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

Function GetGoldSeed

Source/items.cpp:818–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816}
817
818void GetGoldSeed(int pnum, ItemStruct *h)
819{
820 int i, ii, s;
821 BOOL doneflag;
822
823 do {
824 doneflag = TRUE;
825 s = GetRndSeed();
826 for (i = 0; i < numitems; i++) {
827 ii = itemactive[i];
828 if (item[ii]._iSeed == s)
829 doneflag = FALSE;
830 }
831 if (pnum == myplr) {
832 for (i = 0; i < plr[pnum]._pNumInv; i++) {
833 if (plr[pnum].InvList[i]._iSeed == s)
834 doneflag = FALSE;
835 }
836 }
837 } while (!doneflag);
838
839 h->_iSeed = s;
840}
841
842void SetPlrHandSeed(ItemStruct *h, int iseed)
843{

Callers 3

PlaceStoreGoldFunction · 0.85
control_remove_goldFunction · 0.85
DropHalfPlayersGoldFunction · 0.85

Calls 1

GetRndSeedFunction · 0.85

Tested by

no test coverage detected