From 23386285a9fa0b57199fb92de6a272e2f52c536c Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 2 Oct 2019 03:35:16 +0200 Subject: [PATCH] GetStaffPower cleanup --- Source/items.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 0f643f1c3..ed9093c96 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -1151,10 +1151,12 @@ void GetStaffPower(int i, int lvl, int bs, BOOL onlygood) int l[256]; char istr[128]; int nl, j, preidx; - BYTE addok; + BOOL addok; + int tmp; + tmp = random(15, 10); preidx = -1; - if (random(15, 10) == 0 || onlygood) { + if (tmp == 0 || onlygood) { nl = 0; for (j = 0; PL_Prefix[j].PLPower != -1; j++) { if (PL_Prefix[j].PLIType & PLT_STAFF && PL_Prefix[j].PLMinLvl <= lvl) {