* reworked how an dwhen locks on GameObjects and Items are displayed
 * added structure for LockType.dbc
This commit is contained in:
Sarjuuk
2022-02-14 23:17:51 +01:00
parent 53e2af2116
commit 01a9744ba7
7 changed files with 83 additions and 50 deletions

View File

@@ -103,7 +103,7 @@ class GameObjectList extends BaseType
if (isset($this->curTpl['lockId']))
if ($locks = Lang::getLocks($this->curTpl['lockId']))
foreach ($locks as $l)
$x .= '<tr><td>'.$l.'</td></tr>';
$x .= '<tr><td>'.sprintf(Lang::game('requires'), $l).'</td></tr>';
$x .= '</table>';

View File

@@ -918,8 +918,8 @@ class ItemList extends BaseType
$x .= sprintf(Lang::game('requires'), '<a class="q1" href="?faction='.$reqFac.'">'.FactionList::getName($reqFac).'</a> - '.Lang::game('rep', $this->curTpl['requiredFactionRank'])).'<br />';
// locked or openable
if ($locks = Lang::getLocks($this->curTpl['lockId'], true))
$x .= '<span class="q0">'.Lang::item('locked').'<br />'.implode('<br />', $locks).'</span><br />';
if ($locks = Lang::getLocks($this->curTpl['lockId'], $arr, true, true))
$x .= '<span class="q0">'.Lang::item('locked').'<br />'.implode('<br />', array_map(function($x) { return sprintf(Lang::game('requires'), $x); }, $locks)).'</span><br />';
else if ($this->curTpl['flags'] & ITEM_FLAG_OPENABLE)
$x .= '<span class="q2">'.Lang::item('openClick').'</span><br />';