From 1383bd703ffeff99ed9d8966224bcf83b1ffa72a Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Tue, 9 Apr 2019 18:18:42 +0200 Subject: [PATCH] Clean up SetupAllItems --- Source/items.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 76cba43ce..9c3596fdd 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -2719,8 +2719,8 @@ void ItemRndDur(int ii) void SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen) { - int iblvl; // edi - int uid; // eax + int iblvl; + int uid; item[ii]._iSeed = iseed; SetRndSeed(iseed); @@ -2737,10 +2737,7 @@ void SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, else if (uper == 1) item[ii]._iCreateInfo |= 0x0100; - if (item[ii]._iMiscId == IMISC_UNIQUE) { - if (item[ii]._iLoc != ILOC_UNEQUIPABLE) - GetUniqueItem(ii, iseed); - } else { + if (item[ii]._iMiscId != IMISC_UNIQUE) { iblvl = -1; if (random(32, 100) > 10 && random(33, 100) > lvl || (iblvl = lvl, lvl == -1)) { @@ -2766,6 +2763,9 @@ void SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, } if (item[ii]._iMagical != ITEM_QUALITY_UNIQUE) ItemRndDur(ii); + } else { + if (item[ii]._iLoc != ILOC_UNEQUIPABLE) + GetUniqueItem(ii, iseed); } SetupItem(ii); }