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

Function PutItemRecord

Source/items.cpp:4046–4062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4044}
4045
4046void PutItemRecord(int nSeed, WORD wCI, int nIndex)
4047{
4048 int i;
4049 DWORD dwTicks;
4050
4051 dwTicks = SDL_GetTicks();
4052
4053 for (i = 0; i < gnNumGetRecords; i++) {
4054 if (dwTicks - itemrecord[i].dwTimestamp > 6000) {
4055 NextItemRecord(i);
4056 i--;
4057 } else if (nSeed == itemrecord[i].nSeed && wCI == itemrecord[i].wCI && nIndex == itemrecord[i].nIndex) {
4058 NextItemRecord(i);
4059 break;
4060 }
4061 }
4062}
4063
4064DEVILUTION_END_NAMESPACE

Callers 3

On_PUTITEMFunction · 0.85
On_SYNCPUTITEMFunction · 0.85
On_RESPAWNITEMFunction · 0.85

Calls 1

NextItemRecordFunction · 0.85

Tested by

no test coverage detected