mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
feat(Hooks/PlayerScript): ShouldBeRewardedWithMoneyInsteadOfExp (#4445)
This commit is contained in:
@@ -16071,10 +16071,14 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
|
||||
AddPct(XP, (*i)->GetAmount());
|
||||
|
||||
int32 moneyRew = 0;
|
||||
if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
GiveXP(XP, nullptr);
|
||||
else
|
||||
if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(this))
|
||||
{
|
||||
moneyRew = int32(quest->GetRewMoneyMaxLevel() * sWorld->getRate(RATE_DROP_MONEY));
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveXP(XP, nullptr);
|
||||
}
|
||||
|
||||
// Give player extra money if GetRewOrReqMoney > 0 and get ReqMoney if negative
|
||||
if (quest->GetRewOrReqMoney())
|
||||
|
||||
Reference in New Issue
Block a user