diff --git a/endpoints/object/object.php b/endpoints/object/object.php index 5892e005..9480de5b 100644 --- a/endpoints/object/object.php +++ b/endpoints/object/object.php @@ -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) diff --git a/endpoints/spell/spell.php b/endpoints/spell/spell.php index de96a363..6f0cfcd9 100644 --- a/endpoints/spell/spell.php +++ b/endpoints/spell/spell.php @@ -2403,7 +2403,9 @@ class SpellBaseResponse extends TemplateResponse implements ICache if ($sfObj = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE `id` = ?d', $_)) { $n = Util::localizedString($sfObj, 'name'); - if ($objId = DB::Aowow()->selectCell('SELECT `id` FROM ?_objects WHERE `spellFocusId` = ?d', $_)) + if (!is_null(GameObjectListFilter::getCriteriaIndex(50, $_))) + $n = '[url=?objects&filter=cr=50;crs='.$_.';crv=0]'.$n.'[/url]'; + else if ($objId = DB::Aowow()->selectCell('SELECT `id` FROM ?_objects WHERE `spellFocusId` = ?d', $_)) $n = '[url=?object='.$objId.']'.$n.'[/url]'; $infobox[] = Lang::game('requires2').' '.$n;