Item/Tooltip

* display hidden/cosmetic spells for staff
This commit is contained in:
Sarjuuk
2022-06-10 16:58:18 +02:00
parent 47da18b717
commit df1ba841c5

View File

@@ -970,12 +970,15 @@ class ItemList extends BaseType
if ($itemSpellsAndTrigger) if ($itemSpellsAndTrigger)
{ {
$cooldown = '';
$itemSpells = new SpellList(array(['s.id', array_keys($itemSpellsAndTrigger)])); $itemSpells = new SpellList(array(['s.id', array_keys($itemSpellsAndTrigger)]));
foreach ($itemSpells->iterate() as $__) foreach ($itemSpells->iterate() as $sId => $__)
if ($parsed = $itemSpells->parseText('description', $_reqLvl > 1 ? $_reqLvl : MAX_LEVEL, false, $causesScaling)[0])
{ {
$parsed = $itemSpells->parseText('description', $_reqLvl > 1 ? $_reqLvl : MAX_LEVEL, false, $causesScaling)[0];
if (!$parsed && User::isInGroup(U_GROUP_EMPLOYEE))
$parsed = '<span style="opacity:.75">&lt;'.$itemSpells->getField('name', true, true).'&gt;</span>';
else if (!$parsed)
continue;
if ($interactive) if ($interactive)
{ {
$link = '<a href="?spell='.$itemSpells->id.'">%s</a>'; $link = '<a href="?spell='.$itemSpells->id.'">%s</a>';