Skip to content

Commit

Permalink
[hellfire] AddInitItems bin exact
Browse files Browse the repository at this point in the history
  • Loading branch information
qndel authored and AJenbo committed Sep 15, 2019
1 parent ce586b1 commit 6f67f7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ void AddInitItems()
{
int x, y, i, j, rnd;

#ifdef HELLFIRE
int curlv = items_get_currlevel();
#endif
rnd = random(11, 3) + 3;
for (j = 0; j < rnd; j++) {
i = itemavail[0];
Expand All @@ -280,11 +283,19 @@ void AddInitItems()
dItem[x][y] = i + 1;
item[i]._iSeed = GetRndSeed();
SetRndSeed(item[i]._iSeed);
#ifdef HELLFIRE
if (random(12, 2))
GetItemAttrs(i, IDI_HEAL, curlv);
else
GetItemAttrs(i, IDI_MANA, curlv);
item[i]._iCreateInfo = curlv - 0x8000;
#else
if (random(12, 2))
GetItemAttrs(i, IDI_HEAL, currlevel);
else
GetItemAttrs(i, IDI_MANA, currlevel);
item[i]._iCreateInfo = currlevel - 0x8000;
#endif
SetupItem(i);
item[i]._iAnimFrame = item[i]._iAnimLen;
item[i]._iAnimFlag = FALSE;
Expand Down

0 comments on commit 6f67f7f

Please sign in to comment.