Profiler/Completions

* show completion info for claimed characters in infobox on
      appropriate db pages
This commit is contained in:
Sarjuuk
2025-11-03 18:00:50 +01:00
parent 37380ff515
commit e3d6f7b3a7
25 changed files with 640 additions and 39 deletions

View File

@@ -487,6 +487,11 @@ class ItemList extends DBTypeList
'quality' => $this->curTpl['quality'],
'icon' => $this->curTpl['iconString']
);
if ($this->curTpl['class'] == ITEM_CLASS_RECIPE)
$data[Type::ITEM][$id]['completion_category'] = $this->curTpl['class'];
else if ($this->curTpl['class'] == ITEM_CLASS_MISC && in_array($this->curTpl['subClass'], [2, 5, -7]))
$data[Type::ITEM][$id]['completion_category'] = $this->curTpl['class'].'-'.$this->curTpl['subClass'];
}
if ($addMask & GLOBALINFO_EXTRA)

View File

@@ -415,7 +415,15 @@ class QuestList extends DBTypeList
}
if ($addMask & GLOBALINFO_SELF)
{
$data[Type::QUEST][$this->id] = ['name' => $this->getField('name', true)];
if ($this->curTpl['flags'] & QUEST_FLAG_DAILY)
$data[Type::QUEST][$this->id]['daily'] = true;
if ($this->curTpl['flags'] & QUEST_FLAG_WEEKLY)
$data[Type::QUEST][$this->id]['weekly'] = true;
}
}
return $data;

View File

@@ -2150,8 +2150,11 @@ class SpellList extends DBTypeList
{
$data[Type::SPELL][$id] = array(
'icon' => $this->curTpl['iconStringAlt'] ?: $this->curTpl['iconString'],
'name' => $this->getField('name', true),
'name' => $this->getField('name', true)
);
if (($_ = $this->curTpl['typeCat']) && in_array($_, [-5, -6, 9, 11]))
$data[Type::SPELL][$id]['completion_category'] = $_;
}
if ($addMask & GLOBALINFO_EXTRA)