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

Function VerifyGoldSeeds

Source/pack.cpp:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void VerifyGoldSeeds(PlayerStruct *pPlayer)
145{
146 int i, j;
147
148 for (i = 0; i < pPlayer->_pNumInv; i++) {
149 if (pPlayer->InvList[i].IDidx == IDI_GOLD) {
150 for (j = 0; j < pPlayer->_pNumInv; j++) {
151 if (i != j) {
152 if (pPlayer->InvList[j].IDidx == IDI_GOLD && pPlayer->InvList[i]._iSeed == pPlayer->InvList[j]._iSeed) {
153 pPlayer->InvList[i]._iSeed = GetRndSeed();
154 j = -1;
155 }
156 }
157 }
158 }
159 }
160}
161
162void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok)
163{

Callers 1

UnPackPlayerFunction · 0.85

Calls 1

GetRndSeedFunction · 0.85

Tested by

no test coverage detected