Quest/Rewards

* implement changes to max level xp conversion from 670085d8c0
This commit is contained in:
Sarjuuk
2020-07-25 20:55:10 +02:00
parent 4bd32207db
commit ce90229a8b

View File

@@ -1056,14 +1056,15 @@ class QuestPage extends GenericPage
// moneyReward / maxLevelCompensation // moneyReward / maxLevelCompensation
$comp = $this->subject->getField('rewardMoneyMaxLevel'); $comp = $this->subject->getField('rewardMoneyMaxLevel');
$questMoney = $this->subject->getField('rewardOrReqMoney'); $questMoney = $this->subject->getField('rewardOrReqMoney');
$realComp = max($comp, $questMoney);
if ($questMoney > 0) if ($questMoney > 0)
{ {
$rewards['money'] = Util::formatMoney($questMoney); $rewards['money'] = Util::formatMoney($questMoney);
if ($comp > 0) if ($realComp > $questMoney)
$rewards['money'] .= ' ' . sprintf(Lang::quest('expConvert'), Util::formatMoney($questMoney + $comp), MAX_LEVEL); $rewards['money'] .= ' ' . sprintf(Lang::quest('expConvert'), Util::formatMoney($realComp), MAX_LEVEL);
} }
else if ($questMoney <= 0 && $questMoney + $comp > 0) else if ($questMoney <= 0 && $realComp > 0)
$rewards['money'] = sprintf(Lang::quest('expConvert2'), Util::formatMoney($questMoney + $comp), MAX_LEVEL); $rewards['money'] = sprintf(Lang::quest('expConvert2'), Util::formatMoney($realComp), MAX_LEVEL);
// itemChoices // itemChoices
if (!empty($this->subject->choices[$this->typeId][TYPE_ITEM])) if (!empty($this->subject->choices[$this->typeId][TYPE_ITEM]))