mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Search/Tabs
* switch between single and multi-class display as necessary
This commit is contained in:
@@ -629,10 +629,24 @@ class SearchPage extends GenericPage
|
||||
if ($this->searchMask & SEARCH_TYPE_REGULAR)
|
||||
$this->extendGlobalData($abilities->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
|
||||
|
||||
$vis = ['level', 'singleclass', 'schools'];
|
||||
$multiClass = 0;
|
||||
foreach ($data as $d)
|
||||
{
|
||||
$multiClass = 0;
|
||||
for ($i = 1; $i <= 10; $i++)
|
||||
if ($d['reqclass'] & (1 << ($i - 1)))
|
||||
$multiClass++;
|
||||
|
||||
if ($multiClass > 1)
|
||||
break;
|
||||
}
|
||||
|
||||
$vis = ['level', 'schools'];
|
||||
if ($abilities->hasSetFields(['reagent1']))
|
||||
$vis[] = 'reagents';
|
||||
|
||||
$vis[] = $multiClass > 1 ? 'classes' : 'singleclass';
|
||||
|
||||
$osInfo = [TYPE_SPELL, ' (Ability)', $abilities->getMatches(), [], []];
|
||||
$result = array(
|
||||
'data' => array_values($data),
|
||||
|
||||
Reference in New Issue
Block a user