From 045cb90dbf74fccd762134c68ee09fa61f37fa30 Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Tue, 31 Aug 2021 14:06:06 +0200 Subject: [PATCH] items: add BUGFIX for GetItemRecord when handling quest items When spawing quest items (e.g. blood stone), no unique seed is set for the item. Therefor two quest items may share the same seed, this happens deterministically for the Valor quest, since three blood stones are spawned, each with item seed 0x00000000. For this reason, if two or more such quest items with identical seed are looted within less than 6 seconds, the 2nd, 3rd, etc loot actions are ignored. --- Source/items.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/items.cpp b/Source/items.cpp index 002bbacae..314b3fb25 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -5998,6 +5998,7 @@ BOOL GetItemRecord(int nSeed, WORD wCI, int nIndex) for (i = 0; i < gnNumGetRecords; i++) { if (dwTicks - itemrecord[i].dwTimestamp > 6000) { + // BUGFIX: loot actions for multiple quest items with same seed (e.g. blood stone) performed within less then 6 seconds will be ignored. NextItemRecord(i); i--; } else if (nSeed == itemrecord[i].nSeed && wCI == itemrecord[i].wCI && nIndex == itemrecord[i].nIndex) {