Objects/SpellFocus

* link from spellfocus in objects and spell infobox to objects filter if able
 * closes #491
This commit is contained in:
Sarjuuk 2026-01-29 21:30:57 +01:00
parent 26292d17c5
commit 08318d286c
2 changed files with 12 additions and 2 deletions

View file

@ -175,8 +175,16 @@ class ObjectBaseResponse extends TemplateResponse implements ICache
// SpellFocus
if ($_ = $this->subject->getField('spellFocusId'))
{
if ($sfo = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE `id` = ?d', $_))
$infobox[] = '[tooltip name=focus]'.Lang::gameObject('focusDesc').'[/tooltip][span class=tip tooltip=focus]'.Lang::gameObject('focus').Lang::main('colon').Util::localizedString($sfo, 'name').'[/span]';
{
$n = Util::localizedString($sfo, 'name');
if (!is_null(GameObjectListFilter::getCriteriaIndex(50, $_)))
$n = '[url=?objects&filter=cr=50;crs='.$_.';crv=0]'.$n.'[/url]';
$infobox[] = '[tooltip name=focus]'.Lang::gameObject('focusDesc').'[/tooltip][span class=tip tooltip=focus]'.Lang::gameObject('focus').Lang::main('colon').$n.'[/span]';
}
}
// lootinfo: [min, max, restock]
if (([$min, $max, $restock] = $this->subject->getField('lootStack')) && $min)