Skip to content

Commit

Permalink
Remove unnecessary recreate
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed May 12, 2024
1 parent 80b8093 commit 88e6026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ void SetupAllItems(const Player &player, Item &item, _item_indexes idx, uint32_t
}

if (!recreate)
TryRandomUniqueItem(item, idx, lvl, uper, onlygood, pregen, recreate);
TryRandomUniqueItem(item, idx, lvl, uper, onlygood, pregen);
}

void SetupBaseItem(Point position, _item_indexes idx, bool onlygood, bool sendmsg, bool delta, bool spawn = false)
Expand Down Expand Up @@ -3297,7 +3297,7 @@ Item *SpawnUnique(_unique_items uid, Point position, std::optional<int> level /*
return &item;
}

void TryRandomUniqueItem(Item &item, _item_indexes idx, int lvl, int uper, bool onlygood, bool pregen, bool recreate)
void TryRandomUniqueItem(Item &item, _item_indexes idx, int lvl, int uper, bool onlygood, bool pregen)
{
// Return early if the item is a quest unique or non-unique.
if ((item._iCreateInfo & CF_UNIQUE) == 0 || item._iMiscId == IMISC_UNIQUE)
Expand Down Expand Up @@ -3374,7 +3374,7 @@ void TryRandomUniqueItem(Item &item, _item_indexes idx, int lvl, int uper, bool
do {
item = {}; // Reset item data
item.position = itemPos; // Retain drop position of the item.
SetupAllItems(*MyPlayer, item, idx, itemGenerator.advanceRndSeed(), targetLvl, uper, onlygood, pregen, recreate, uidOffset);
SetupAllItems(*MyPlayer, item, idx, itemGenerator.advanceRndSeed(), targetLvl, uper, onlygood, pregen, false, uidOffset);
} while (item._iUid != uid);

// Set item as obtained to prevent it from being dropped again in Single Player.
Expand Down

0 comments on commit 88e6026

Please sign in to comment.