feat(Scripting/Hooks): Implement OnQuestComputeXP() hook

This commit is contained in:
郑佩茹
2022-03-07 19:17:29 -07:00
parent b672effc36
commit d60bb4fc90
3 changed files with 12 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))
{