Quest/Fixup

* don't try to create an objective for empty SourceItem
 * fixed size of source spell icon
This commit is contained in:
Sarjuuk
2025-10-23 16:26:59 +02:00
parent 862b3dff73
commit 6d7f9c0f00

View File

@@ -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