From 6d7f9c0f005efc7d7f2e0230c2f92750f462d48c Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 23 Oct 2025 16:26:59 +0200 Subject: [PATCH] Quest/Fixup * don't try to create an objective for empty SourceItem * fixed size of source spell icon --- endpoints/quest/quest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/quest/quest.php b/endpoints/quest/quest.php index a18c5d7e..4c01b65a 100644 --- a/endpoints/quest/quest.php +++ b/endpoints/quest/quest.php @@ -320,7 +320,7 @@ class QuestBaseResponse extends TemplateResponse implements ICache $olItems[$i] = [$id, $qty, $id == $olItems[0][0]]; } - if ($ids = array_column($olItems, 0)) + if ($ids = array_filter(array_column($olItems, 0))) { $olItemData = new ItemList(array(['id', $ids])); $this->extendGlobalData($olItemData->getJSGlobals(GLOBALINFO_SELF)); @@ -498,7 +498,7 @@ class QuestBaseResponse extends TemplateResponse implements ICache if ($_ = $this->subject->getField('sourceSpellId')) { $this->extendGlobalIds(Type::SPELL, $_); - $this->objectiveList[] = [0, new IconElement(Type::SPELL, $_, SpellList::getName($_), extraText: Lang::quest('provided'), element: 'iconlist-icon')]; + $this->objectiveList[] = [0, new IconElement(Type::SPELL, $_, SpellList::getName($_), extraText: Lang::quest('provided'), element: 'iconlist-icon', size: IconElement::SIZE_SMALL)]; } // required money