Skip to content

Commit

Permalink
disable experience in challenge mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal committed Jun 10, 2021
1 parent 77d8275 commit a1306a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ To uninstall:

`./acore.sh module uninstall mod-azerothshard`

## Configure

Create a copy of the `azth_mod.conf.dist` and rename it as `azth_mod.conf` under your etc folder
Then you can change configurations as you whish

## Features

List of features that will be published open-source:

* Challenge Mode
* Mythic+
* PlayerStats
* Timewalking (libraries only)
Expand Down
16 changes: 15 additions & 1 deletion modules/mod-challenge-mode/src/scripts/ChallengeModeScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,26 @@ class ChallengeModeMisc : public MiscScript
class ChallengeModePlayer : public PlayerScript
{
public:
ChallengeModePlayer() : PlayerScript("ChallengeModePlayer") { }
ChallengeModePlayer() : PlayerScript("ChallengeModePlayer") {

}

bool OnBeforeAchiComplete(Player* player, AchievementEntry const* /* achievement */) override
{
return sChallengeMode->isEligibleForReward(player);
}

bool OnBeforeCriteriaProgress(Player* player, AchievementCriteriaEntry const* /*criteria*/) override
{
return sChallengeMode->isEligibleForReward(player);
}

void OnGivePlayerXP(Player* player, uint32& amount, Unit* /* victim */) override
{
if (!sChallengeMode->isEligibleForReward(player)) {
amount = 0
}
}
};

class ChallengeModeGlobal : public GlobalScript
Expand Down

0 comments on commit a1306a7

Please sign in to comment.