From ce90229a8b66b57d09409a1ef597280bc5f79a04 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sat, 25 Jul 2020 20:55:10 +0200 Subject: [PATCH] Quest/Rewards * implement changes to max level xp conversion from https://github.com/TrinityCore/TrinityCore/commit/670085d8c099606136a904c8a67b8df9c0dd9f1e --- pages/quest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/quest.php b/pages/quest.php index 61cb3eef5..1e9f0f144 100644 --- a/pages/quest.php +++ b/pages/quest.php @@ -1056,14 +1056,15 @@ private function createRewards($side) // moneyReward / maxLevelCompensation $comp = $this->subject->getField('rewardMoneyMaxLevel'); $questMoney = $this->subject->getField('rewardOrReqMoney'); + $realComp = max($comp, $questMoney); if ($questMoney > 0) { $rewards['money'] = Util::formatMoney($questMoney); - if ($comp > 0) - $rewards['money'] .= ' ' . sprintf(Lang::quest('expConvert'), Util::formatMoney($questMoney + $comp), MAX_LEVEL); + if ($realComp > $questMoney) + $rewards['money'] .= ' ' . sprintf(Lang::quest('expConvert'), Util::formatMoney($realComp), MAX_LEVEL); } - else if ($questMoney <= 0 && $questMoney + $comp > 0) - $rewards['money'] = sprintf(Lang::quest('expConvert2'), Util::formatMoney($questMoney + $comp), MAX_LEVEL); + else if ($questMoney <= 0 && $realComp > 0) + $rewards['money'] = sprintf(Lang::quest('expConvert2'), Util::formatMoney($realComp), MAX_LEVEL); // itemChoices if (!empty($this->subject->choices[$this->typeId][TYPE_ITEM]))