Browse Source

apply enums (#2088)

pull/876/head
qndel 6 years ago committed by GitHub
parent
commit
95e084dbd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      Source/items.cpp
  2. 2
      Source/objects.cpp

9
Source/items.cpp

@ -2476,11 +2476,11 @@ int RndItem(int m)
return 0;
if (random_(24, 100) > 25)
return 1;
return IDI_GOLD + 1;
ri = 0;
for (i = 0; AllItemsList[i].iLoc != ILOC_INVALID; i++) {
if (AllItemsList[i].iRnd == 2 && monster[m].mLevel >= AllItemsList[i].iMinMLvl) {
if (AllItemsList[i].iRnd == IDROP_DOUBLE && monster[m].mLevel >= AllItemsList[i].iMinMLvl) {
ril[ri] = i;
ri++;
}
@ -4665,9 +4665,10 @@ int RndSmithItem(int lvl)
ril[ri] = i;
ri++;
#ifdef HELLFIRE
if (AllItemsList[i].iRnd == 2 && ri < 512) {
if (AllItemsList[i].iRnd == IDROP_DOUBLE && ri < 512) {
#else
if (AllItemsList[i].iRnd == 2) {
if (AllItemsList[i].iRnd == IDROP_DOUBLE)
{
#endif
ril[ri] = i;
ri++;

2
Source/objects.cpp

@ -3369,7 +3369,7 @@ int ItemMiscIdIdx(int imiscid)
int i;
i = 0;
while (AllItemsList[i].iRnd == 0 || AllItemsList[i].iMiscId != imiscid) {
while (AllItemsList[i].iRnd == IDROP_NEVER || AllItemsList[i].iMiscId != imiscid) {
i++;
}

Loading…
Cancel
Save