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

Function GetItemRecord

Source/items.cpp:3996–4013  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3994}
3995
3996BOOL GetItemRecord(int nSeed, WORD wCI, int nIndex)
3997{
3998 int i;
3999 DWORD dwTicks;
4000
4001 dwTicks = SDL_GetTicks();
4002
4003 for (i = 0; i < gnNumGetRecords; i++) {
4004 if (dwTicks - itemrecord[i].dwTimestamp > 6000) {
4005 NextItemRecord(i);
4006 i--;
4007 } else if (nSeed == itemrecord[i].nSeed && wCI == itemrecord[i].wCI && nIndex == itemrecord[i].nIndex) {
4008 return FALSE;
4009 }
4010 }
4011
4012 return TRUE;
4013}
4014
4015void NextItemRecord(int i)
4016{

Callers 2

On_REQUESTGITEMFunction · 0.85
On_REQUESTAGITEMFunction · 0.85

Calls 1

NextItemRecordFunction · 0.85

Tested by

no test coverage detected