Skip to content

Commit

Permalink
OnBeforeLootEqualChanced
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal committed Jun 10, 2021
1 parent 8f609e2 commit 5f9b54f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/mod-challenge-mode/src/scripts/ChallengeModeScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,19 @@ class ChallengeModeGlobal : public GlobalScript
ChallengeModeGlobal() : GlobalScript("ChallengeModeGlobal") {
}

bool OnBeforeLootEqualChanced(Player const* player, LootStoreItemList EqualChanced, Loot& loot, LootStore const& store) override
{
if (!sChallengeMode->isEligibleForReward(player)) {
return false;
}

return true
}

bool OnItemRoll(Player const* player, LootStoreItem const */* item */, float &chance, Loot &/* loot */, LootStore const& /* store */) override
{
if (!sChallengeMode->isEligibleForReward(player)) {
chance = 0;
return false;
}

Expand Down

0 comments on commit 5f9b54f

Please sign in to comment.