Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hellfire] AddInitItems bin exact #1635

Merged
merged 1 commit into from
Sep 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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