Objects/SpellFocus
* link from spellfocus in objects and spell infobox to objects filter if able * closes #491
This commit is contained in:
parent
26292d17c5
commit
08318d286c
2 changed files with 12 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue