Skip to content

Commit

Permalink
Quest/Rewards
Browse files Browse the repository at this point in the history
 * implement changes to max level xp conversion from TrinityCore/TrinityCore@670085d
  • Loading branch information
Sarjuuk committed Jul 25, 2020
1 parent 4bd3220 commit ce90229
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pages/quest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down

0 comments on commit ce90229

Please sign in to comment.