feat(Scripting/Hooks): implement OnQuestComputeXP() hook (#10934)

This commit is contained in:
ZhengPeiRu21
2022-03-24 03:27:15 -06:00
committed by GitHub
parent 9ae0b4e425
commit 44b7a0666c
4 changed files with 19 additions and 0 deletions

View File

@@ -737,6 +737,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
AddPct(XP, (*i)->GetAmount());
sScriptMgr->OnQuestComputeXP(this, quest, XP);
int32 moneyRew = 0;
if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(this))
{