Quests/Fixup

* fix showing "Gains:" header on detail page if there is nothing
   to be gained
This commit is contained in:
Sarjuuk 2026-03-22 16:34:40 +01:00
parent edfe800348
commit c93417301a
2 changed files with 5 additions and 2 deletions

View file

@ -1216,7 +1216,10 @@ class QuestBaseResponse extends TemplateResponse implements ICache
$gains[5] = $this->subject->getField('rewardArenaPoints');
// honor points
$gains[4] = [$this->subject->getField('rewardHonorPoints'), $side];
if ($_ = $this->subject->getField('rewardHonorPoints'))
$gains[4] = [$_, $side];
else
$gains[4] = null;
// talent points
$gains[3] = $this->subject->getField('rewardTalents');

View file

@ -171,7 +171,7 @@ if ([$xp, $rep, $title, $tp, $honor, $arena] = $this->gains):
echo ' <li><div>'.Lang::quest('bonusTalents', [$tp])."</div></li>\n";
endif;
if ($arena || $honor[0]):
if ($arena || $honor):
echo ' <li><div>';
if ($honor[0]):
$a = '<a href="?currency=104">'.$honor[0].'</a>';