Template/Update (Part 25)

* convert dbtype 'spell'
 * point spell effects on detail page to spells filter
This commit is contained in:
Sarjuuk
2025-08-11 18:25:53 +02:00
parent 3ba0cc4ade
commit e6980ce220
14 changed files with 973 additions and 863 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
<?php
namespace Aowow;
if (!defined('AOWOW_REVISION'))
die('illegal access');
class SpellPowerResponse extends TextResponse implements ICache
{
use TrCache, TrTooltip;
private const /* string */ POWER_TEMPLATE = '$WowheadPower.registerSpell(%d, %d, %s);';
protected int $type = Type::SPELL;
protected int $typeId = 0;
protected int $cacheType = CACHE_TYPE_TOOLTIP;
protected array $expectedGET = array(
'domain' => ['filter' => FILTER_CALLBACK, 'options' => [Locale::class, 'tryFromDomain']]
);
public function __construct(string $param)
{
parent::__construct($param);
// temp locale
if ($this->_get['domain'])
Lang::load($this->_get['domain']);
$this->typeId = intVal($param);
}
protected function generate() : void
{
$spell = new SpellList([['id', $this->typeId]]);
if ($spell->error)
$this->cacheType = CACHE_TYPE_NONE;
else
{
$tooltip = $spell->renderTooltip(ttSpells: $ttSpells);
$buff = $spell->renderBuff(buffSpells: $bfSpells);
$opts = array(
'name' => $spell->getField('name', true),
'icon' => $spell->getField('iconString'),
'tooltip' => $tooltip,
'spells' => $ttSpells,
'buff' => $buff,
'buffspells' => $bfSpells
);
}
$this->result = new Tooltip(self::POWER_TEMPLATE, $this->typeId, $opts ?? []);
}
}
?>

View File

@@ -6,25 +6,38 @@ if (!defined('AOWOW_REVISION'))
die('illegal access'); die('illegal access');
// menuId 1: Spell g_initPath() class SpellsBaseResponse extends TemplateResponse implements ICache
// tabId 0: Database g_initHeader()
class SpellsPage extends GenericPage
{ {
use TrListPage; use TrListPage, TrCache;
protected $classPanel = false; private const SHORT_FILTER = array(
protected $glyphPanel = false; SKILL_FIRST_AID => [ 6, 7],
SKILL_BLACKSMITHING => [ 2, 4],
SKILL_LEATHERWORKING => [ 8, 1],
SKILL_ALCHEMY => [ 1, 6],
SKILL_COOKING => [ 3, 5],
SKILL_MINING => [ 9, 0],
SKILL_TAILORING => [10, 2],
SKILL_ENGINEERING => [ 5, 3],
SKILL_ENCHANTING => [ 4, 8],
SKILL_FISHING => [ 0, 9],
SKILL_JEWELCRAFTING => [ 7, 10],
SKILL_INSCRIPTION => [15, 0],
);
protected $type = Type::SPELL; protected int $type = Type::SPELL;
protected $tpl = 'spells'; protected int $cacheType = CACHE_TYPE_PAGE;
protected $path = [0, 1];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $scripts = [[SC_JS_FILE, 'js/filters.js']];
protected $_get = ['filter' => ['filter' => FILTER_UNSAFE_RAW]]; protected string $template = 'spells';
protected string $pageName = 'spells';
protected ?int $activeTab = parent::TAB_DATABASE;
protected array $breadcrumb = [0, 1];
protected $validCats = array( protected array $scripts = [[SC_JS_FILE, 'js/filters.js']];
protected array $expectedGET = array(
'filter' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => Filter::PATTERN_PARAM]]
);
protected array $validCats = array(
-2 => array( // Talents: Class => Skill -2 => array( // Talents: Class => Skill
1 => [ 26, 256, 257], 1 => [ 26, 256, 257],
2 => [594, 267, 184], 2 => [594, 267, 184],
@@ -59,7 +72,7 @@ class SpellsPage extends GenericPage
9 => [355, 354, 593], 9 => [355, 354, 593],
11 => [574, 134, 573] 11 => [574, 134, 573]
), ),
9 => SKILLS_TRADE_SECONDARY, // Secondary Skills 9 => [129, 185, 356, 762], // Secondary Skills
11 => array( // Professions: Skill => Spell 11 => array( // Professions: Skill => Spell
SKILL_ALCHEMY => true, SKILL_ALCHEMY => true,
SKILL_BLACKSMITHING => [9788, 9787, 17041, 17040, 17039], SKILL_BLACKSMITHING => [9788, 9787, 17041, 17040, 17039],
@@ -75,42 +88,88 @@ class SpellsPage extends GenericPage
) )
); );
private $shortFilter = array( public bool $classPanel = false;
SKILL_FIRST_AID => [ 6, 7], public bool $glyphPanel = false;
SKILL_BLACKSMITHING => [ 2, 4],
SKILL_LEATHERWORKING => [ 8, 1],
SKILL_ALCHEMY => [ 1, 6],
SKILL_COOKING => [ 3, 5],
SKILL_MINING => [ 9, 0],
SKILL_TAILORING => [10, 2],
SKILL_ENGINEERING => [ 5, 3],
SKILL_ENCHANTING => [ 4, 8],
SKILL_FISHING => [ 0, 9],
SKILL_JEWELCRAFTING => [ 7, 10],
SKILL_INSCRIPTION => [15, 0],
);
public function __construct(string $pageParam)
public function __construct($pageCall, $pageParam)
{ {
$this->getCategoryFromUrl($pageParam); $this->getCategoryFromUrl($pageParam);
parent::__construct($pageCall, $pageParam); parent::__construct($pageParam);
$this->filterObj = new SpellListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
$this->name = Util::ucFirst(Lang::game('spells'));
$this->subCat = $pageParam !== '' ? '='.$pageParam : ''; $this->subCat = $pageParam !== '' ? '='.$pageParam : '';
$this->filter = new SpellListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
$this->filterError = $this->filter->error;
} }
protected function generateContent() protected function generate() : void
{ {
$this->h1 = Util::ucFirst(Lang::game('spells'));
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
$this->filter->evalCriteria();
if ($_ = $this->filter->getConditions())
$conditions[] = $_;
$this->filterError = $this->filter->error; // maybe the evalX() caused something
/*************/
/* Menu Path */
/*************/
foreach ($this->category as $c)
$this->breadcrumb[] = $c;
$fiForm = $this->filter->values;
if (count($this->breadcrumb) == 4 && $this->category[0] == -13 && count($fiForm['gl']) == 1)
$this->breadcrumb[] = $fiForm['gl'];
/**************/
/* Page Title */
/**************/
$foo = [];
$c = $this->category; // shothand
if (isset($c[2]) && $c[0] == 11)
array_unshift($foo, Lang::spell('cat', $c[0], $c[1], $c[2]));
else if (isset($c[1]))
{
$_ = in_array($c[0], [-2, -13, 7]) ? Lang::game('cl') : Lang::spell('cat', $c[0]);
array_unshift($foo, is_array($_[$c[1]]) ? $_[$c[1]][0] : $_[$c[1]]);
}
if (isset($c[0]) && count($foo) < 2)
{
$_ = Lang::spell('cat', $c[0]);
array_unshift($foo, is_array($_) ? $_[0] : $_);
}
if (count($foo) < 2)
array_unshift($foo, $this->h1);
foreach ($foo as $bar)
array_unshift($this->title, $bar);
/****************/
/* Main Content */
/****************/
$visibleCols = []; $visibleCols = [];
$hiddenCols = []; $hiddenCols = [];
$extraCols = []; $extraCols = [];
$tabData = ['data' => []]; $tabData = ['data' => []];
$this->redButtons[BUTTON_WOWHEAD] = true;
if ($fiQuery = $this->filter->buildGETParam())
$this->wowheadLink .= '&filter='.$fiQuery;
// the next lengthy ~250 lines determine $conditions and lvParams // the next lengthy ~250 lines determine $conditions and lvParams
if ($this->category) if ($this->category)
{ {
@@ -140,9 +199,9 @@ class SpellsPage extends GenericPage
$xCond = null; $xCond = null;
for ($i = -2; $i < 0; $i++) for ($i = -2; $i < 0; $i++)
{ {
foreach (Game::$skillLineMask[$i] as $idx => $pair) foreach (Game::$skillLineMask[$i] as $idx => [, $skillLineId])
{ {
if ($pair[1] == $this->category[1]) if ($skillLineId == $this->category[1])
{ {
$xCond = ['AND', ['s.skillLine1', $i], ['s.skillLine2OrMask', 1 << $idx, '&']]; $xCond = ['AND', ['s.skillLine1', $i], ['s.skillLine2OrMask', 1 << $idx, '&']];
break; break;
@@ -186,15 +245,18 @@ class SpellsPage extends GenericPage
{ {
case 1: case 1:
$conditions[] = ['OR', $conditions[] = ['OR',
['AND', ['effect2AuraId', 32], ['effect3AuraId', 207, '!']], ['AND', ['effect2AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED], ['effect3AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, '!']],
['AND', ['effect3AuraId', 32], ['effect2AuraId', 207, '!']] ['AND', ['effect3AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED], ['effect2AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, '!']]
]; ];
break; break;
case 2: case 2:
$conditions[] = ['OR', ['effect2AuraId', 207], ['effect3AuraId', 207]]; $conditions[] = ['OR', ['effect2AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED], ['effect3AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED]];
break; break;
case 3: case 3:
$conditions[] = ['AND', ['effect2AuraId', 32, '!'], ['effect2AuraId', 207, '!'], ['effect3AuraId', 32, '!'],['effect3AuraId', 207, '!']]; $conditions[] = ['AND',
['effect2AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED, '!'], ['effect2AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, '!'],
['effect3AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED, '!'], ['effect3AuraId', SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, '!']
];
break; break;
} }
} }
@@ -211,15 +273,15 @@ class SpellsPage extends GenericPage
{ {
switch ($this->category[1]) // Spells can be used by multiple specs switch ($this->category[1]) // Spells can be used by multiple specs
{ {
case 409: // Tenacity case 409: // TalentTab - Tenacity
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE1, '&']; $conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE1, '&'];
$url = '?pets=1'; $url = '?pets=1';
break; break;
case 410: // Cunning case 410: // TalentTab - Cunning
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE2, '&']; $conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE2, '&'];
$url = '?pets=2'; $url = '?pets=2';
break; break;
case 411: // Ferocity case 411: // TalentTab - Ferocity
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE0, '&']; $conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE0, '&'];
$url = '?pets=0'; $url = '?pets=0';
break; break;
@@ -228,7 +290,7 @@ class SpellsPage extends GenericPage
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")'; $tabData['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
} }
$tabData['_petTalents'] = 1; // not conviced, this is correct, but .. it works $tabData['_petTalents'] = 1;
break; break;
case -11: // Proficiencies ... the subIds are actually SkillLineCategories case -11: // Proficiencies ... the subIds are actually SkillLineCategories
@@ -309,22 +371,22 @@ class SpellsPage extends GenericPage
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->category[1]]] ['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->category[1]]]
]; ];
if (!empty($this->shortFilter[$this->category[1]])) if (!empty(self::SHORT_FILTER[$this->category[1]]))
{ {
$sf = $this->shortFilter[$this->category[1]]; [$crafted, $relItems] = self::SHORT_FILTER[$this->category[1]];
$txt = ''; $txt = '';
if ($sf[0] && $sf[1]) if ($crafted && $relItems)
$txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]) . Lang::spell('relItems', 'link') . sprintf(Lang::spell('relItems', 'recipes'), $sf[1]); $txt = Lang::spell('relItems', 'crafted', [$crafted]) . Lang::spell('relItems', 'link') . Lang::spell('relItems', 'recipes', [$relItems]);
else if ($sf[0]) else if ($crafted)
$txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]); $txt = Lang::spell('relItems', 'crafted', [$crafted]);
else if ($sf[1]) else if ($relItems)
$txt = sprintf(Lang::spell('relItems', 'recipes'), $sf[1]); $txt = Lang::spell('relItems', 'recipes', [$relItems]);
$note = Lang::spell('cat', $this->category[0], $this->category[1]); $note = Lang::spell('cat', $this->category[0], $this->category[1]);
if (is_array($note)) if (is_array($note))
$note = $note[0]; $note = $note[0];
$tabData['note'] = sprintf(Lang::spell('relItems', 'base'), $txt, $note); $tabData['note'] = Lang::spell('relItems', 'base', [$txt, $note]);
$tabData['sort'] = ['skill', 'name']; $tabData['sort'] = ['skill', 'name'];
} }
} }
@@ -349,22 +411,22 @@ class SpellsPage extends GenericPage
{ {
$conditions[] = ['s.skillLine1', $this->category[1]]; $conditions[] = ['s.skillLine1', $this->category[1]];
if (!empty($this->shortFilter[$this->category[1]])) if (!empty(self::SHORT_FILTER[$this->category[1]]))
{ {
$sf = $this->shortFilter[$this->category[1]]; [$crafted, $relItems] = self::SHORT_FILTER[$this->category[1]];
$txt = ''; $txt = '';
if ($sf[0] && $sf[1]) if ($crafted && $relItems)
$txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]) . Lang::spell('relItems', 'link') . sprintf(Lang::spell('relItems', 'recipes'), $sf[1]); $txt = Lang::spell('relItems', 'crafted', [$crafted]) . Lang::spell('relItems', 'link') . Lang::spell('relItems', 'recipes', [$relItems]);
else if ($sf[0]) else if ($crafted)
$txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]); $txt = Lang::spell('relItems', 'crafted', [$crafted]);
else if ($sf[1]) else if ($relItems)
$txt = sprintf(Lang::spell('relItems', 'recipes'), $sf[1]); $txt = Lang::spell('relItems', 'recipes', [$relItems]);
$note = Lang::spell('cat', $this->category[0], $this->category[1]); $note = Lang::spell('cat', $this->category[0], $this->category[1]);
if (is_array($note)) if (is_array($note))
$note = $note[0]; $note = $note[0];
$tabData['note'] = sprintf(Lang::spell('relItems', 'base'), $txt, $note); $tabData['note'] = Lang::spell('relItems', 'base', [$txt, $note]);
$tabData['sort'] = ['skill', 'name']; $tabData['sort'] = ['skill', 'name'];
} }
} }
@@ -383,14 +445,6 @@ class SpellsPage extends GenericPage
} }
} }
if (!User::isInGroup(U_GROUP_EMPLOYEE))
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
$this->filterObj->evalCriteria();
if ($_ = $this->filterObj->getConditions())
$conditions[] = $_;
$spells = new SpellList($conditions, ['calcTotal' => true]); $spells = new SpellList($conditions, ['calcTotal' => true]);
$this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); $this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
@@ -404,27 +458,27 @@ class SpellsPage extends GenericPage
{ {
$lvData[$spellId]['speed'] = 0; $lvData[$spellId]['speed'] = 0;
if (in_array($spells->getField('effect2AuraId'), [32, 207, 58])) if (in_array($spells->getField('effect2AuraId'), [SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED, SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, SPELL_AURA_MOD_INCREASE_SWIM_SPEED]))
$lvData[$spellId]['speed'] = $spells->getField('effect2BasePoints') + 1; $lvData[$spellId]['speed'] = $spells->getField('effect2BasePoints') + 1;
if (in_array($spells->getField('effect3AuraId'), [32, 207, 58])) if (in_array($spells->getField('effect3AuraId'), [SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED, SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, SPELL_AURA_MOD_INCREASE_SWIM_SPEED]))
$lvData[$spellId]['speed'] = max($lvData[$spellId]['speed'], $spells->getField('effect3BasePoints') + 1); $lvData[$spellId]['speed'] = max($lvData[$spellId]['speed'], $spells->getField('effect3BasePoints') + 1);
if (!$lvData[$spellId]['speed'] && ($spells->getField('effect2AuraId') == 4 || $spells->getField('effect3AuraId') == 4)) if (!$lvData[$spellId]['speed'] && ($spells->getField('effect2AuraId') == SPELL_AURA_DUMMY || $spells->getField('effect3AuraId') == SPELL_AURA_DUMMY))
$lvData[$spellId]['speed'] = '?'; $lvData[$spellId]['speed'] = '?';
else else
$lvData[$spellId]['speed'] = '+'.$lvData[$spellId]['speed'].'%'; $lvData[$spellId]['speed'] = '+'.$lvData[$spellId]['speed'].'%';
} }
} }
$tabData['data'] = array_values($lvData); $tabData['data'] = $lvData;
if ($this->filterObj->fiExtraCols) if ($this->filter->fiExtraCols)
$tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)'; $tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
else if ($extraCols) else if ($extraCols)
$tabData['extraCols'] = $extraCols; $tabData['extraCols'] = $extraCols;
// add source to cols if explicitly searching for it // add source to cols if explicitly searching for it
if ($this->filterObj->getSetCriteria(9) && !in_array('source', $visibleCols)) if ($this->filter->getSetCriteria(9) && !in_array('source', $visibleCols))
$visibleCols[] = 'source'; $visibleCols[] = 'source';
// create note if search limit was exceeded; overwriting 'note' is intentional // create note if search limit was exceeded; overwriting 'note' is intentional
@@ -434,10 +488,6 @@ class SpellsPage extends GenericPage
$tabData['_truncated'] = 1; $tabData['_truncated'] = 1;
} }
if ($this->filterObj->error)
$tabData['_errors'] = 1;
$mask = $spells->hasSetFields('skillLines', 'trainingCost', 'reqClassMask', null, 'reagent1', 'reagent2', 'reagent3', 'reagent4', 'reagent5', 'reagent6', 'reagent7', 'reagent8'); $mask = $spells->hasSetFields('skillLines', 'trainingCost', 'reqClassMask', null, 'reagent1', 'reagent2', 'reagent3', 'reagent4', 'reagent5', 'reagent6', 'reagent7', 'reagent8');
if (!($mask & 0x1) && $this->category && !in_array($this->category[0], [9, 11])) if (!($mask & 0x1) && $this->category && !in_array($this->category[0], [9, 11]))
$hiddenCols[] = 'skill'; $hiddenCols[] = 'skill';
@@ -455,10 +505,15 @@ class SpellsPage extends GenericPage
if ($hiddenCols) if ($hiddenCols)
$tabData['hiddenCols'] = array_unique($hiddenCols); $tabData['hiddenCols'] = array_unique($hiddenCols);
$this->lvTabs[] = [SpellList::$brickFile, $tabData]; $this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"]);
$this->lvTabs->addListviewTab(new Listview($tabData, SpellList::$brickFile));
parent::generate();
$this->setOnCacheLoaded([self::class, 'onBeforeDisplay']);
} }
protected function postCache() protected static function onBeforeDisplay() : void
{ {
// sort for dropdown-menus // sort for dropdown-menus
Lang::sort('game', 'ra'); Lang::sort('game', 'ra');
@@ -466,41 +521,6 @@ class SpellsPage extends GenericPage
Lang::sort('game', 'sc'); Lang::sort('game', 'sc');
Lang::sort('game', 'me'); Lang::sort('game', 'me');
} }
protected function generateTitle()
{
$foo = [];
$c = $this->category; // shothand
if (isset($c[2]) && $c[0] == 11)
array_unshift($foo, Lang::spell('cat', $c[0], $c[1], $c[2]));
else if (isset($c[1]))
{
$_ = in_array($c[0], [-2, -13, 7]) ? Lang::game('cl') : Lang::spell('cat', $c[0]);
array_unshift($foo, is_array($_[$c[1]]) ? $_[$c[1]][0] : $_[$c[1]]);
}
if (isset($c[0]) && count($foo) < 2)
{
$_ = Lang::spell('cat', $c[0]);
array_unshift($foo, is_array($_) ? $_[0] : $_);
}
if (count($foo) < 2)
array_unshift($foo, $this->name);
foreach ($foo as $bar)
array_unshift($this->title, $bar);
}
protected function generatePath()
{
foreach ($this->category as $c)
$this->path[] = $c;
$form = $this->filterObj->values;
if (count($this->path) == 4 && $this->category[0] == -13 && count($form['gl']) == 1)
$this->path[] = $form['gl'][0];
}
} }
?> ?>

View File

@@ -463,13 +463,13 @@ abstract class DBTypeList
return null; return null;
} }
public static function makeLink(int $id, int $fmt = Lang::FMT_HTML) : string public static function makeLink(int $id, int $fmt = Lang::FMT_HTML, string $cssClass = '') : string
{ {
if ($n = static::getName($id)) if ($n = static::getName($id))
{ {
return match ($fmt) return match ($fmt)
{ {
Lang::FMT_HTML => '<a href="?'.Type::getFileString(static::$type).'='.$id.'">'.$n.'</a>', Lang::FMT_HTML => '<a href="?'.Type::getFileString(static::$type).'='.$id.'"'.($cssClass ? ' class="'.$cssClass.'"' : '').'>'.$n.'</a>',
Lang::FMT_MARKUP => '[url=?'.Type::getFileString(static::$type).'='.$id.']'.$n.'[/url]', Lang::FMT_MARKUP => '[url=?'.Type::getFileString(static::$type).'='.$id.']'.$n.'[/url]',
default => $n default => $n
}; };
@@ -696,7 +696,7 @@ trait spawnHelper
$info[2] = Lang::game('phases').Lang::main('colon').Util::asHex($s['phaseMask']); $info[2] = Lang::game('phases').Lang::main('colon').Util::asHex($s['phaseMask']);
if ($s['spawnMask'] == 15) if ($s['spawnMask'] == 15)
$info[3] = Lang::game('mode').Lang::main('colon').Lang::game('modes', -1); $info[3] = Lang::game('mode').Lang::game('modes', -1);
else if ($s['spawnMask']) else if ($s['spawnMask'])
{ {
$_ = []; $_ = [];
@@ -704,7 +704,7 @@ trait spawnHelper
if ($s['spawnMask'] & 1 << $i) if ($s['spawnMask'] & 1 << $i)
$_[] = Lang::game('modes', $i); $_[] = Lang::game('modes', $i);
$info[4] = Lang::game('mode').Lang::main('colon').implode(', ', $_); $info[4] = Lang::game('mode').implode(', ', $_);
} }
if ($s['type'] == Type::AREATRIGGER) if ($s['type'] == Type::AREATRIGGER)

View File

@@ -891,8 +891,11 @@ class SpellList extends DBTypeList
$max = $MAX = !$this->interactive ? 'MAX' : sprintf(Util::$dfnString, 'MAX(<span class=\'q1\'>a</span>, <span class=\'q1\'>b</span>)', 'MAX'); $max = $MAX = !$this->interactive ? 'MAX' : sprintf(Util::$dfnString, 'MAX(<span class=\'q1\'>a</span>, <span class=\'q1\'>b</span>)', 'MAX');
$pl = $PL = !$this->interactive ? 'PL' : sprintf(Util::$dfnString, 'LANG.level', 'PL'); $pl = $PL = !$this->interactive ? 'PL' : sprintf(Util::$dfnString, 'LANG.level', 'PL');
// space out operators for better readability
$formula = preg_replace('/(\+|-|\*|\/)/', ' \1 ', $formula);
// note the " ! // note the " !
return eval('return "'.$formula.'";'); return eval('return "('.$formula.')";');
} }
else else
return eval('return '.$formula.';'); return eval('return '.$formula.';');
@@ -2363,13 +2366,13 @@ class SpellListFilter extends Filter
9 => array( // sources index 9 => array( // sources index
1 => true, // Any 1 => true, // Any
2 => false, // None 2 => false, // None
3 => 1, // Crafted 3 => SRC_CRAFTED,
4 => 2, // Drop 4 => SRC_DROP,
6 => 4, // Quest 6 => SRC_QUEST,
7 => 5, // Vendor 7 => SRC_VENDOR,
8 => 6, // Trainer 8 => SRC_TRAINER,
9 => 7, // Discovery 9 => SRC_DISCOVERY,
10 => 9 // Talent 10 => SRC_TALENT
), ),
22 => array( 22 => array(
1 => true, // Weapons 1 => true, // Weapons

View File

@@ -335,15 +335,15 @@ $lang = array(
'duration' => "Dauer", 'duration' => "Dauer",
'eventShort' => "Ereignis: %s", 'eventShort' => "Ereignis: %s",
'flags' => "Flags", 'flags' => "Flags",
'glyphType' => "Glyphenart", 'glyphType' => "Glyphenart: ",
'level' => "Stufe", 'level' => "Stufe",
'mechanic' => "Auswirkung", 'mechanic' => "Auswirkung",
'mechAbbr' => "Ausw.", 'mechAbbr' => "Ausw.: ",
'meetingStone' => "Versammlungsstein", 'meetingStone' => "Versammlungsstein",
'requires' => "Benötigt %s", 'requires' => "Benötigt %s",
'requires2' => "Benötigt", 'requires2' => "Benötigt",
'reqLevel' => "Benötigt Stufe %s", 'reqLevel' => "Benötigt Stufe %s",
'reqSkillLevel' => "Benötigte Fertigkeitsstufe", 'reqSkillLevel' => "Benötigte Fertigkeitsstufe: ",
'school' => "Magieart", 'school' => "Magieart",
'type' => "Art: ", 'type' => "Art: ",
'valueDelim' => " - ", // " bis " 'valueDelim' => " - ", // " bis "
@@ -360,7 +360,7 @@ $lang = array(
'_roles' => ["Heiler", "Nahkampf-DPS", "Distanz-DPS", "Tank"], '_roles' => ["Heiler", "Nahkampf-DPS", "Distanz-DPS", "Tank"],
'phases' => "Phasen", 'phases' => "Phasen",
'mode' => "Modus", 'mode' => "Modus: ",
'modes' => [-1 => "Beliebig", "Normal / Normal 10", "Heroisch / Normal 25", "Heroisch 10", "Heroisch 25"], 'modes' => [-1 => "Beliebig", "Normal / Normal 10", "Heroisch / Normal 25", "Heroisch 10", "Heroisch 25"],
'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"], 'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Stärke", "Beweglichkeit", "Ausdauer", "Intelligenz", "Willenskraft"], 'stats' => ["Stärke", "Beweglichkeit", "Ausdauer", "Intelligenz", "Willenskraft"],
@@ -1481,13 +1481,13 @@ $lang = array(
'_globCD' => "Globale Abklingzeit", '_globCD' => "Globale Abklingzeit",
'_gcdCategory' => "GCD-Kategorie", '_gcdCategory' => "GCD-Kategorie",
'_value' => "Wert", '_value' => "Wert",
'_radius' => "Radius", '_radius' => "Radius: ",
'_interval' => "Interval", '_interval' => "Interval: ",
'_inSlot' => "im Platz", '_inSlot' => "im Platz: ",
'_collapseAll' => "Alle einklappen", '_collapseAll' => "Alle einklappen",
'_expandAll' => "Alle ausklappen", '_expandAll' => "Alle ausklappen",
'_transfer' => 'Dieser Zauber wird mit <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> vertauscht, wenn Ihr zur <span class="icon-%s">%s</span> wechselt.', '_transfer' => 'Dieser Zauber wird mit <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> vertauscht, wenn Ihr zur <span class="icon-%s">%s</span> wechselt.',
'_affected' => "Betroffene Zauber", '_affected' => "Betroffene Zauber: ",
'_seeMore' => "Mehr anzeigen", '_seeMore' => "Mehr anzeigen",
'_rankRange' => "Rang:&nbsp;%d&nbsp;-&nbsp;%d", '_rankRange' => "Rang:&nbsp;%d&nbsp;-&nbsp;%d",
'_showXmore' => "Zeige %d weitere", '_showXmore' => "Zeige %d weitere",
@@ -1499,9 +1499,9 @@ $lang = array(
'currentArea' => '&lt;Momentanes Gebiet&gt;', 'currentArea' => '&lt;Momentanes Gebiet&gt;',
'discovered' => "Durch Geistesblitz erlernt", 'discovered' => "Durch Geistesblitz erlernt",
'ppm' => "(%s Auslösungen pro Minute)", 'ppm' => "(%s Auslösungen pro Minute)",
'procChance' => "Procchance", 'procChance' => "Procchance: ",
'starter' => "Basiszauber", 'starter' => "Basiszauber",
'trainingCost' => "Trainingskosten", 'trainingCost' => "Trainingskosten: ",
'channeled' => "Kanalisiert", 'channeled' => "Kanalisiert",
'range' => "%s Meter Reichweite", 'range' => "%s Meter Reichweite",
'meleeRange' => "Nahkampfreichweite", 'meleeRange' => "Nahkampfreichweite",

View File

@@ -335,15 +335,15 @@ $lang = array(
'duration' => "Duration", 'duration' => "Duration",
'eventShort' => "Event: %s", 'eventShort' => "Event: %s",
'flags' => "Flags", 'flags' => "Flags",
'glyphType' => "Glyph type", 'glyphType' => "Glyph type: ",
'level' => "Level", 'level' => "Level",
'mechanic' => "Mechanic", 'mechanic' => "Mechanic",
'mechAbbr' => "Mech.", 'mechAbbr' => "Mech.: ",
'meetingStone' => "Meeting Stone", 'meetingStone' => "Meeting Stone",
'requires' => "Requires %s", 'requires' => "Requires %s",
'requires2' => "Requires", 'requires2' => "Requires",
'reqLevel' => "Requires Level %s", 'reqLevel' => "Requires Level %s",
'reqSkillLevel' => "Required skill level", 'reqSkillLevel' => "Required skill level: ",
'school' => "School", 'school' => "School",
'type' => "Type: ", 'type' => "Type: ",
'valueDelim' => " to ", 'valueDelim' => " to ",
@@ -360,7 +360,7 @@ $lang = array(
'_roles' => ["Healer", "Melee DPS", "Ranged DPS", "Tank"], '_roles' => ["Healer", "Melee DPS", "Ranged DPS", "Tank"],
'phases' => "Phases", 'phases' => "Phases",
'mode' => "Mode", 'mode' => "Mode: ",
'modes' => [-1 => "Any", "Normal / Normal 10", "Heroic / Normal 25", "Heroic 10", "Heroic 25"], 'modes' => [-1 => "Any", "Normal / Normal 10", "Heroic / Normal 25", "Heroic 10", "Heroic 25"],
'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"], 'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Strength", "Agility", "Stamina", "Intellect", "Spirit"], 'stats' => ["Strength", "Agility", "Stamina", "Intellect", "Spirit"],
@@ -1481,13 +1481,13 @@ $lang = array(
'_globCD' => "Global Cooldown", '_globCD' => "Global Cooldown",
'_gcdCategory' => "GCD category", '_gcdCategory' => "GCD category",
'_value' => "Value", '_value' => "Value",
'_radius' => "Radius", '_radius' => "Radius: ",
'_interval' => "Interval", '_interval' => "Interval: ",
'_inSlot' => "in slot", '_inSlot' => "in slot: ",
'_collapseAll' => "Collapse All", '_collapseAll' => "Collapse All",
'_expandAll' => "Expand All", '_expandAll' => "Expand All",
'_transfer' => 'This spell will be converted to <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> if you transfer to <span class="icon-%s">%s</span>.', '_transfer' => 'This spell will be converted to <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> if you transfer to <span class="icon-%s">%s</span>.',
'_affected' => "Affected Spells", '_affected' => "Affected Spells: ",
'_seeMore' => "See more", '_seeMore' => "See more",
'_rankRange' => "Rank:&nbsp;%d&nbsp;-&nbsp;%d", '_rankRange' => "Rank:&nbsp;%d&nbsp;-&nbsp;%d",
'_showXmore' => "Show %d More", '_showXmore' => "Show %d More",
@@ -1499,9 +1499,9 @@ $lang = array(
'currentArea' => '&lt;current area&gt;', 'currentArea' => '&lt;current area&gt;',
'discovered' => "Learned via discovery", 'discovered' => "Learned via discovery",
'ppm' => "(%s procs per minute)", 'ppm' => "(%s procs per minute)",
'procChance' => "Proc chance", 'procChance' => "Proc chance: ",
'starter' => "Starter spell", 'starter' => "Starter spell",
'trainingCost' => "Training cost", 'trainingCost' => "Training cost: ",
'channeled' => "Channeled", // SPELL_CAST_CHANNELED 'channeled' => "Channeled", // SPELL_CAST_CHANNELED
'range' => "%s yd range", // SPELL_RANGE / SPELL_RANGE_DUAL 'range' => "%s yd range", // SPELL_RANGE / SPELL_RANGE_DUAL
'meleeRange' => "Melee Range", // MELEE_RANGE 'meleeRange' => "Melee Range", // MELEE_RANGE

View File

@@ -335,15 +335,15 @@ $lang = array(
'duration' => "Duración", 'duration' => "Duración",
'eventShort' => "Evento: %s", 'eventShort' => "Evento: %s",
'flags' => "Banderas", 'flags' => "Banderas",
'glyphType' => "Tipo de glifo", 'glyphType' => "Tipo de glifo: ",
'level' => "Nivel", 'level' => "Nivel",
'mechanic' => "Mecanica", 'mechanic' => "Mecanica",
'mechAbbr' => "Mec.", 'mechAbbr' => "Mec.: ",
'meetingStone' => "Roca de encuentro", 'meetingStone' => "Roca de encuentro",
'requires' => "Requiere %s", 'requires' => "Requiere %s",
'requires2' => "Requiere", 'requires2' => "Requiere",
'reqLevel' => "Necesitas ser de nivel %s", 'reqLevel' => "Necesitas ser de nivel %s",
'reqSkillLevel' => "Requiere nivel de habilidad", 'reqSkillLevel' => "Requiere nivel de habilidad: ",
'school' => "Escuela", 'school' => "Escuela",
'type' => "Tipo: ", 'type' => "Tipo: ",
'valueDelim' => " - ", 'valueDelim' => " - ",
@@ -360,7 +360,7 @@ $lang = array(
'_roles' => ["Sanador", "DPS cuerpo", "DPS a distancia", "Tanque"], '_roles' => ["Sanador", "DPS cuerpo", "DPS a distancia", "Tanque"],
'phases' => "Fases", 'phases' => "Fases",
'mode' => "Modo", 'mode' => "Modo: ",
'modes' => [-1 => "Cualquiera", "Normal / Normal 10", "Heroico / Normal 25", "Heróico 10", "Heróico 25"], 'modes' => [-1 => "Cualquiera", "Normal / Normal 10", "Heroico / Normal 25", "Heróico 10", "Heróico 25"],
'expansions' => ["World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"], 'expansions' => ["World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Fuerza", "Agilidad", "Aguante", "Intelecto", "Espíritu"], 'stats' => ["Fuerza", "Agilidad", "Aguante", "Intelecto", "Espíritu"],
@@ -1481,13 +1481,13 @@ $lang = array(
'_globCD' => "Tiempo global de reutilización", '_globCD' => "Tiempo global de reutilización",
'_gcdCategory' => "Categoría GCD", '_gcdCategory' => "Categoría GCD",
'_value' => "Valor", '_value' => "Valor",
'_radius' => "Radio", '_radius' => "Radio: ",
'_interval' => "Intérvalo", '_interval' => "Intérvalo: ",
'_inSlot' => "en la casilla", '_inSlot' => "en la casilla: ",
'_collapseAll' => "Contraer todo", '_collapseAll' => "Contraer todo",
'_expandAll' => "Expandier todo", '_expandAll' => "Expandier todo",
'_transfer' => 'Este hechizo será convertido a <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> si lo transfieres a la <span class="icon-%s">%s</span>.', '_transfer' => 'Este hechizo será convertido a <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> si lo transfieres a la <span class="icon-%s">%s</span>.',
'_affected' => "Hechizos affectados", '_affected' => "Hechizos affectados: ",
'_seeMore' => "Más información", '_seeMore' => "Más información",
'_rankRange' => "Rango:&nbsp;%d&nbsp;-&nbsp;%d", '_rankRange' => "Rango:&nbsp;%d&nbsp;-&nbsp;%d",
'_showXmore' => "Mostrar %d más", '_showXmore' => "Mostrar %d más",
@@ -1499,9 +1499,9 @@ $lang = array(
'currentArea' => '&lt;current area&gt;', 'currentArea' => '&lt;current area&gt;',
'discovered' => "Aprendido via descubrimiento", 'discovered' => "Aprendido via descubrimiento",
'ppm' => "(%s procs por minuto)", 'ppm' => "(%s procs por minuto)",
'procChance' => "Probabilidad de que accione", 'procChance' => "Probabilidad de que accione: ",
'starter' => "Hechizo inicial", 'starter' => "Hechizo inicial",
'trainingCost' => "Costo de enseñanza", 'trainingCost' => "Costo de enseñanza: ",
'channeled' => "Canalizado", 'channeled' => "Canalizado",
'range' => "Alcance de %s m", 'range' => "Alcance de %s m",
'meleeRange' => "Alcance de ataques cuerpo a cuerpo", 'meleeRange' => "Alcance de ataques cuerpo a cuerpo",

View File

@@ -335,15 +335,15 @@ $lang = array(
'duration' => "Durée", 'duration' => "Durée",
'eventShort' => "Évènement : %s", 'eventShort' => "Évènement : %s",
'flags' => "Marqueurs", 'flags' => "Marqueurs",
'glyphType' => "Type de glyphe", 'glyphType' => "Type de glyphe : ",
'level' => "Niveau", 'level' => "Niveau",
'mechanic' => "Mécanique", 'mechanic' => "Mécanique",
'mechAbbr' => "Mécan.", 'mechAbbr' => "Mécan. : ",
'meetingStone' => "Pierre de rencontre", 'meetingStone' => "Pierre de rencontre",
'requires' => "%s requis", 'requires' => "%s requis",
'requires2' => "Requiert", 'requires2' => "Requiert",
'reqLevel' => "Niveau %s requis", 'reqLevel' => "Niveau %s requis",
'reqSkillLevel' => "Niveau de compétence requis", 'reqSkillLevel' => "Niveau de compétence requis : ",
'school' => "École", 'school' => "École",
'type' => "Type : ", 'type' => "Type : ",
'valueDelim' => " - ", 'valueDelim' => " - ",
@@ -360,7 +360,7 @@ $lang = array(
'_roles' => ["Soigneur", "DPS mêlée", "DPS à distance", "Tank"], '_roles' => ["Soigneur", "DPS mêlée", "DPS à distance", "Tank"],
'phases' => "Phases", 'phases' => "Phases",
'mode' => "Mode", 'mode' => "Mode : ",
'modes' => [-1 => "Tout", "Standard / Normal 10", "Héroïque / Normal 25", "10 héroïque", "25 héroïque"], 'modes' => [-1 => "Tout", "Standard / Normal 10", "Héroïque / Normal 25", "10 héroïque", "25 héroïque"],
'expansions' => ["Classique", "The Burning Crusade", "Wrath of the Lich King"], 'expansions' => ["Classique", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Force", "Agilité", "Endurance", "Intelligence", "Esprit"], 'stats' => ["Force", "Agilité", "Endurance", "Intelligence", "Esprit"],
@@ -1481,13 +1481,13 @@ $lang = array(
'_globCD' => "Temps d'attente universel", '_globCD' => "Temps d'attente universel",
'_gcdCategory' => "Catégorie GCD", '_gcdCategory' => "Catégorie GCD",
'_value' => "Valeur", '_value' => "Valeur",
'_radius' => "Rayon", '_radius' => "Rayon : ",
'_interval' => "Intervalle", '_interval' => "Intervalle : ",
'_inSlot' => "dans l'emplacement", '_inSlot' => "dans l'emplacement : ",
'_collapseAll' => "Replier Tout", '_collapseAll' => "Replier Tout",
'_expandAll' => "Déplier Tout", '_expandAll' => "Déplier Tout",
'_transfer' => 'Cet sort sera converti en <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> si vous transférez en <span class="icon-%s">%s</span>.', '_transfer' => 'Cet sort sera converti en <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a> si vous transférez en <span class="icon-%s">%s</span>.',
'_affected' => "Sorts affectés", '_affected' => "Sorts affectés : ",
'_seeMore' => "[See more]", '_seeMore' => "[See more]",
'_rankRange' => "Rang&nbsp;:&nbsp;%d&nbsp;-&nbsp;%d", '_rankRange' => "Rang&nbsp;:&nbsp;%d&nbsp;-&nbsp;%d",
'_showXmore' => "En afficher %d de plus", '_showXmore' => "En afficher %d de plus",
@@ -1499,9 +1499,9 @@ $lang = array(
'currentArea' => '&lt;current area&gt;', 'currentArea' => '&lt;current area&gt;',
'discovered' => "Appris via une découverte", 'discovered' => "Appris via une découverte",
'ppm' => "(%s déclenchements par minute)", 'ppm' => "(%s déclenchements par minute)",
'procChance' => "Chance", 'procChance' => "Chance : ",
'starter' => "Sortilège initiaux", 'starter' => "Sortilège initiaux",
'trainingCost' => "Coût d'entraînement", 'trainingCost' => "Coût d'entraînement : ",
'channeled' => "Canalisée", 'channeled' => "Canalisée",
'range' => "%s m de portée", 'range' => "%s m de portée",
'meleeRange' => "Allonge", 'meleeRange' => "Allonge",

View File

@@ -335,15 +335,15 @@ $lang = array(
'duration' => "Длительность", 'duration' => "Длительность",
'eventShort' => "Игровое событие: %s", 'eventShort' => "Игровое событие: %s",
'flags' => "Метки", 'flags' => "Метки",
'glyphType' => "Тип символа", 'glyphType' => "Тип символа: ",
'level' => "Уровень", 'level' => "Уровень",
'mechanic' => "Механика", 'mechanic' => "Механика",
'mechAbbr' => "Механика", 'mechAbbr' => "Механика: ",
'meetingStone' => "Камень встреч", 'meetingStone' => "Камень встреч",
'requires' => "Требует %s", 'requires' => "Требует %s",
'requires2' => "Требуется:", 'requires2' => "Требуется:",
'reqLevel' => "Требуется уровень: %s", 'reqLevel' => "Требуется уровень: %s",
'reqSkillLevel' => "Требуется уровень навыка", 'reqSkillLevel' => "Требуется уровень навыка: ",
'school' => "Школа", 'school' => "Школа",
'type' => "Тип: ", 'type' => "Тип: ",
'valueDelim' => " - ", 'valueDelim' => " - ",
@@ -360,7 +360,7 @@ $lang = array(
'_roles' => ["Лекарь", "Боец ближнего боя", "Боец дальнего боя", "Танк"], '_roles' => ["Лекарь", "Боец ближнего боя", "Боец дальнего боя", "Танк"],
'phases' => "Фазы", 'phases' => "Фазы",
'mode' => "Режим", 'mode' => "Режим: ",
'modes' => [-1 => "Все", "Обычный / 10-норм.", "Героический / 25-норм.", "10-героич", "25-героич"], 'modes' => [-1 => "Все", "Обычный / 10-норм.", "Героический / 25-норм.", "10-героич", "25-героич"],
'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"), 'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"),
'stats' => array("к силе", "к ловкости", "к выносливости", "к интеллекту", "к духу"), 'stats' => array("к силе", "к ловкости", "к выносливости", "к интеллекту", "к духу"),
@@ -1481,13 +1481,13 @@ $lang = array(
'_globCD' => "Общее время восстановления (GCD)", '_globCD' => "Общее время восстановления (GCD)",
'_gcdCategory' => "Категория ГКД", '_gcdCategory' => "Категория ГКД",
'_value' => "Значение", '_value' => "Значение",
'_radius' => "Радиус действия", '_radius' => "Радиус действия: ",
'_interval' => "Интервал", '_interval' => "Интервал: ",
'_inSlot' => "в слот", '_inSlot' => "в слот: ",
'_collapseAll' => "Свернуть все", '_collapseAll' => "Свернуть все",
'_expandAll' => "Развернуть все", '_expandAll' => "Развернуть все",
'_transfer' => 'Этот предмет превратится в <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a>, если вы перейдете за <span class="icon-%s">%s</span>.', '_transfer' => 'Этот предмет превратится в <a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a>, если вы перейдете за <span class="icon-%s">%s</span>.',
'_affected' => "Влияет на заклинания", '_affected' => "Влияет на заклинания: ",
'_seeMore' => "[See more]", '_seeMore' => "[See more]",
'_rankRange' => "Ранг:&nbsp;%d&nbsp;-&nbsp;%d", '_rankRange' => "Ранг:&nbsp;%d&nbsp;-&nbsp;%d",
'_showXmore' => "Показать на %d больше", '_showXmore' => "Показать на %d больше",
@@ -1499,9 +1499,9 @@ $lang = array(
'currentArea' => '&lt;current area&gt;', 'currentArea' => '&lt;current area&gt;',
'discovered' => "Изучается путём освоения местности", 'discovered' => "Изучается путём освоения местности",
'ppm' => "(Срабатывает %s раз в минуту)", 'ppm' => "(Срабатывает %s раз в минуту)",
'procChance' => "Шанс срабатывания", 'procChance' => "Шанс срабатывания: ",
'starter' => "Начальное заклинание", 'starter' => "Начальное заклинание",
'trainingCost' => "Цена обучения", 'trainingCost' => "Цена обучения: ",
'channeled' => "Направляемое", 'channeled' => "Направляемое",
'range' => "Радиус действия: %s м", 'range' => "Радиус действия: %s м",
'meleeRange' => "Дистанция ближнего боя", 'meleeRange' => "Дистанция ближнего боя",

View File

@@ -334,15 +334,15 @@ $lang = array(
'duration' => "持续时间", 'duration' => "持续时间",
'eventShort' => "事件:%s", 'eventShort' => "事件:%s",
'flags' => "标记", 'flags' => "标记",
'glyphType' => "雕文类型", 'glyphType' => "雕文类型",
'level' => "等级", 'level' => "等级",
'mechanic' => "机制", 'mechanic' => "机制",
'mechAbbr' => "机制", 'mechAbbr' => "机制",
'meetingStone' => "集合石", 'meetingStone' => "集合石",
'requires' => "需要%s", 'requires' => "需要%s",
'requires2' => "需要", 'requires2' => "需要",
'reqLevel' => "需要等级%s", 'reqLevel' => "需要等级%s",
'reqSkillLevel' => "需要技能等级", 'reqSkillLevel' => "需要技能等级",
'school' => "类型", 'school' => "类型",
'type' => "类型:", 'type' => "类型:",
'valueDelim' => "", 'valueDelim' => "",
@@ -359,7 +359,7 @@ $lang = array(
'_roles' => ["治疗者", "近距离伤害输出者", "远距离伤害输出者", "坦克"], '_roles' => ["治疗者", "近距离伤害输出者", "远距离伤害输出者", "坦克"],
'phases' => "阶段", 'phases' => "阶段",
'mode' => "模式", 'mode' => "模式",
'modes' => [-1 => "任何", "普通 / 普通 10人", "英雄 / 普通 25人", "英雄 10人", "英雄 25人"], 'modes' => [-1 => "任何", "普通 / 普通 10人", "英雄 / 普通 25人", "英雄 10人", "英雄 25人"],
'expansions' => ["经典旧世", "燃烧的远征", "巫妖王之怒"], 'expansions' => ["经典旧世", "燃烧的远征", "巫妖王之怒"],
'stats' => ["力量", "敏捷", "耐力", "智力", "精神"], 'stats' => ["力量", "敏捷", "耐力", "智力", "精神"],
@@ -1480,13 +1480,13 @@ $lang = array(
'_globCD' => "公共冷却时间", '_globCD' => "公共冷却时间",
'_gcdCategory' => "GCD类别", '_gcdCategory' => "GCD类别",
'_value' => "", '_value' => "",
'_radius' => "半径", '_radius' => "半径",
'_interval' => "间隔", //Interval '_interval' => "间隔", //Interval
'_inSlot' => "在插槽中", '_inSlot' => "在插槽中",
'_collapseAll' => "折叠全部", '_collapseAll' => "折叠全部",
'_expandAll' => "展开全部", '_expandAll' => "展开全部",
'_transfer' => '这个法术将被转换到<a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a>,如果你转移到<span class="icon-%s">%s</span>。', '_transfer' => '这个法术将被转换到<a href="?spell=%d" class="q%d icontiny tinyspecial" style="background-image: url(STATIC_URL/images/wow/icons/tiny/%s.gif)">%s</a>,如果你转移到<span class="icon-%s">%s</span>。',
'_affected' => "受影响法术", '_affected' => "受影响法术",
'_seeMore' => "[See more]", '_seeMore' => "[See more]",
'_rankRange' => "排名:&nbsp;%d&nbsp;-&nbsp;%d", '_rankRange' => "排名:&nbsp;%d&nbsp;-&nbsp;%d",
'_showXmore' => "[Show %d More]", '_showXmore' => "[Show %d More]",
@@ -1498,9 +1498,9 @@ $lang = array(
'currentArea' => '&lt;当前区域&gt;', 'currentArea' => '&lt;当前区域&gt;',
'discovered' => "通过发现学习", 'discovered' => "通过发现学习",
'ppm' => "%s每分钟触发几率", 'ppm' => "%s每分钟触发几率",
'procChance' => "触发几率", 'procChance' => "触发几率",
'starter' => "初始法术", 'starter' => "初始法术",
'trainingCost' => "训练成本", 'trainingCost' => "训练成本",
'channeled' => "需引导", 'channeled' => "需引导",
'range' => "%s码范围", 'range' => "%s码范围",
'meleeRange' => "近战范围", 'meleeRange' => "近战范围",

View File

@@ -332,9 +332,9 @@ CLISetup::registerSetup("sql", new class extends SetupScript
default: default:
for ($i = -count(Game::$skillLineMask); $i < 0; $i++) for ($i = -count(Game::$skillLineMask); $i < 0; $i++)
{ {
foreach (Game::$skillLineMask[$i] as $k => $pair) foreach (Game::$skillLineMask[$i] as $k => [, $skillLineId])
{ {
if (in_array($pair[1], $lines)) if (in_array($skillLineId, $lines))
{ {
$update['skillLine1'] = $i; $update['skillLine1'] = $i;
$update['skillLine2OrMask'] |= 1 << $k; $update['skillLine2OrMask'] |= 1 << $k;

View File

@@ -1,7 +1,12 @@
<?php namespace Aowow; ?> <?php
namespace Aowow\Template;
<?php $this->brick('header'); ?> use \Aowow\Lang;
$this->brick('header');
$iconOffset = 0;
?>
<div class="main" id="main"> <div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div> <div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents"> <div class="main-contents" id="main-contents">
@@ -18,7 +23,7 @@
<?php $this->brick('redButtons'); ?> <?php $this->brick('redButtons'); ?>
<h1 class="h1-icon"><?=$this->name; ?></h1> <h1 class="h1-icon"><?=$this->h1; ?></h1>
<?php <?php
$this->brick('tooltip'); $this->brick('tooltip');
@@ -28,6 +33,7 @@ if ($this->tools):
endif; endif;
if ($this->reagents[1]): if ($this->reagents[1]):
$iconOffset += count($this->reagents[1]);
$this->brick('reagentList', ['reagents' => $this->reagents[1], 'enhanced' => $this->reagents[0]]); $this->brick('reagentList', ['reagents' => $this->reagents[1], 'enhanced' => $this->reagents[0]]);
endif; endif;
@@ -41,17 +47,15 @@ if ($this->tools):
<h3><?=Lang::spell('tools'); ?></h3> <h3><?=Lang::spell('tools'); ?></h3>
<table class="iconlist"> <table class="iconlist">
<?php <?php
foreach ($this->tools as $i => $t): foreach ($this->tools as $icon):
echo ' <tr><th align="right" id="iconlist-icon'.($i + 1).'"></th><td><span class="q1"><a href="'.$t['url'].'">'.$t['name']."</a></span></td></tr>\n"; echo $icon->renderContainer(20, $iconOffset, true);
endforeach; endforeach;
?> ?>
</table> </table>
<script type="text/javascript"> <script type="text/javascript">
<?php <?php
foreach ($this->tools as $i => $t): foreach ($this->tools as $icon):
if (isset($t['itemId'])): echo $icon->renderJS(20);
echo $this->fmtCreateIcon($i + 1, Type::ITEM, $t['itemId'], 20, 'iconlist-icon', size: 0);
endif;
endforeach; endforeach;
?> ?>
</script> </script>
@@ -63,10 +67,10 @@ endif;
?> ?>
<div class="clear"></div> <div class="clear"></div>
<?php $this->brick('article'); ?>
<?php <?php
if (!empty($this->transfer)): $this->brick('markup', ['markup' => $this->article]);
if ($this->transfer):
echo " <div class=\"pad\"></div>\n ".$this->transfer."\n"; echo " <div class=\"pad\"></div>\n ".$this->transfer."\n";
endif; endif;
?> ?>
@@ -111,7 +115,7 @@ endif;
</tr> </tr>
<tr> <tr>
<th style="border-top: 0"><?=Lang::spell('_cost');?></th> <th style="border-top: 0"><?=Lang::spell('_cost');?></th>
<td style="border-top: 0"><?=(!empty($this->powerCost) ? $this->powerCost : Lang::spell('_none'));?></td> <td style="border-top: 0"><?=($this->powerCost ?: Lang::spell('_none'));?></td>
</tr> </tr>
<tr> <tr>
<th><?=Lang::spell('_range');?></th> <th><?=Lang::spell('_range');?></th>
@@ -139,7 +143,7 @@ if ($this->scaling):
<?php <?php
foreach ($this->scaling as $k => $v): foreach ($this->scaling as $k => $v):
echo ' '.Lang::spell('scaling', $k, [$v * 100])."<br>\n"; echo ' '.Lang::spell('scaling', $k, [$v * 100])."<br />\n";
endforeach; endforeach;
?> ?>
</td> </td>
@@ -175,7 +179,7 @@ foreach ($this->effects as $i => $e):
echo ' '.$e['name']; echo ' '.$e['name'];
if ($e['footer']): if ($e['footer']):
echo "<small><br>".implode("<br>", $e['footer'])."</small>\n"; echo "<small><br />".implode("<br />", $e['footer'])."</small>\n";
endif; endif;
if ($e['markup']): if ($e['markup']):
@@ -185,63 +189,54 @@ $WH.aE(window,\'load\',function(){$WH.ge(\'spelleffectmarkup-'.$i.'\').innerHTML
endif; endif;
if ($e['icon']): if ($e['icon']):
['type' => $ty, 'typeId' => $ti, 'name' => $na, 'quality' => $qu, 'count' => $co] = $e['icon'];
?> ?>
<table class="icontab"> <table class="icontab">
<tr> <tr>
<th id="icontab-icon<?=++$iconTabIdx;?>"></th> <?=$e['icon']->renderContainer(iconIdxOffset: $iconTabIdx); ?>
<?php
if ($qu):
echo ' <td><span class="q'.$qu.'">'.($na ? sprintf('<a href="?item=%d">%s</a>', $ti, $na) : Util::ucFirst(Lang::game('item')).' #'.$ti)."</span></td>\n";
else:
echo ' <td>'.($na ? sprintf('<a href="?spell=%d">%s</a>', $ti, $na) : Util::ucFirst(Lang::game('spell')).' #'.$ti)."</td>\n";
endif;
?>
<th></th><td></td> <th></th><td></td>
</tr> </tr>
</table> </table>
<script type="text/javascript"> <script type="text/javascript">
<?=$this->fmtCreateIcon($iconTabIdx, $ty, $ti, num: $co);?> <?=$e['icon']->renderJS(); ?>
</script> </script>
<?php <?php
endif; endif;
if ($e['perfectItem']): if ($e['perfectItem']):
['spellId' => $si, 'spellName' => $sn, 'itemId' => $ii, 'itemName' => $in, 'quality' => $qu, 'icon' => $ic, 'chance' => $ch] = $e['perfectItem']; ['spellId' => $si, 'spellName' => $sn, 'item' => $it, 'icon' => $ic, 'chance' => $ch] = $e['perfectItem'];
?> ?>
<small><a href="?spell=<?=$si;?>" class="icontiny"><img src="<?=Cfg::get('STATIC_URL');?>/images/wow/icons/tiny/<?=$ic;?>.gif" align="absmiddle"> <small><a href="?spell=<?=$si;?>" class="icontiny"><img src="<?=$this->gStaticUrl;?>/images/wow/icons/tiny/<?=$ic;?>.gif" align="absmiddle">
<span class="tinyicontxt"><?=$sn;?></span></a><?=Lang::main('colon').' '.$ch.'%';?></small><table class="icontab"> <span class="tinyicontxt"><?=$sn;?></span></a><?=Lang::main('colon').' '.$ch.'%';?></small><table class="icontab">
<tr><th id="icontab-icon<?=++$iconTabIdx;?>"></th><td><small><a href="?item=<?=$ii;?>" class="q<?=$qu;?>"><?=$in;?></a></small></td></tr></table> <?=$it->renderContainer(0, $iconTabIdx, true); ?></table>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
<?=$this->fmtCreateIcon($iconTabIdx, Type::ITEM, $ii);?> <?=$it->renderJS(); ?>
//]]></script> //]]></script>
<?php <?php
endif; endif;
if (isset($e['modifies'])): if ($e['modifies']):
?> ?>
<br><small><?=Lang::spell('_affected').Lang::main('colon');?></small> <br /><small><?=Lang::spell('_affected');?></small>
<?php <?php
for ($type = 0; $type < 2; $type++): for ($type = 0; $type < 2; $type++): // [classSpells, miscSpells]
if (!$e['modifies'][$type]) if (!$e['modifies'][$type])
continue; continue;
$folded = false; $folded = false;
$iconData = [];
if ($type && count($e['modifies'][0])) // #effectspells-856451 < the number is ID from SpellEffect.db2 (not available in 3.3.5a, use effectIdx instead) if ($type && count($e['modifies'][0])) // #effectspells-856451 < the number is ID from SpellEffect.db2 (not available in 3.3.5a, use effectIdx instead)
echo '<a href="javascript:" class="disclosure-off" onclick="return g_disclose($(\'#effectspells-'.$i.'\')[0], this);">'.Lang::spell('_seeMore').'</a><div id="effectspells-'.$i.'" style="display: none">'; echo '<a href="javascript:" class="disclosure-off" onclick="return g_disclose($(\'#effectspells-'.$i.'\')[0], this);">'.Lang::spell('_seeMore').'</a><div id="effectspells-'.$i.'" style="display: none">';
echo '<table class="icontab">'; echo '<table class="icontab">';
foreach ($e['modifies'][$type] as $idx => [$id, $name, $minRank, $maxRank]): foreach ($e['modifies'][$type] as $idx => [$icon, $ranks]):
if (!$idx || !($idx % 3)) if (!$idx || !($idx % 3))
echo "<tr".($folded ? ' style="display:none;"' : '').">"; echo "<tr".($folded ? ' style="display:none;"' : '').">";
$iconData[] = [++$iconTabIdx, $id]; $icon->renderContainer(iconIdxOffset: $iconTabIdx); // just to assign iconOffset
echo "<th id=\"icontab-icon".$iconTabIdx."\"></th><td><a href=\"?spell=".$id."\">".($type ? $name : "<b>".$name."</b>")."</a>".($minRank != $maxRank ? "<br><small>(".Lang::spell('_rankRange', [$minRank, $maxRank]).")</small>" : '')."</td>\n"; echo "<th id=\"icontab-icon".$iconTabIdx."\"></th><td><a href=\"?spell=".$icon->typeId."\">".($type ? $icon->text : "<b>".$icon->text."</b>")."</a>".($ranks ? "<br /><small>(".Lang::spell('_rankRange', $ranks).")</small>" : '')."</td>\n";
if ($idx == count($e['modifies'][$type]) - 1 || !(($idx + 1) % 3)) if ($idx == count($e['modifies'][$type]) - 1 || !(($idx + 1) % 3))
echo "</tr>"; echo "</tr>";
@@ -265,8 +260,8 @@ $WH.aE(window,\'load\',function(){$WH.ge(\'spelleffectmarkup-'.$i.'\').innerHTML
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
<?php <?php
foreach ($iconData as [$idx, $spell]) foreach ($e['modifies'][$type] as [$icon, ])
echo $this->fmtCreateIcon($idx, Type::SPELL, $spell, 32, size: 0); echo $icon->renderJS(32);
?> ?>
//]]></script> //]]></script>
@@ -301,7 +296,7 @@ if ($this->attributes):
</div> </div>
<?php <?php
$this->brick('lvTabs', ['relTabs' => true]); $this->brick('lvTabs');
$this->brick('contribute'); $this->brick('contribute');
?> ?>

View File

@@ -1,10 +1,11 @@
<?php namespace Aowow; ?>
<?php <?php
$this->brick('header'); namespace Aowow\Template;
$f = $this->filterObj->values // shorthand
?>
use Aowow\Lang;
$this->brick('header');
$f = $this->filter->values; // shorthand
?>
<div class="main" id="main"> <div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div> <div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents"> <div class="main-contents" id="main-contents">
@@ -12,38 +13,33 @@ $f = $this->filterObj->values // shorthand
<?php <?php
$this->brick('announcement'); $this->brick('announcement');
$this->brick('pageTemplate', ['fiQuery' => $this->filterObj->query, 'fiMenuItem' => [1]]); $this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => [1]]);
?> ?>
<div id="fi" style="display: <?=($this->filter->query ? 'block' : 'none'); ?>;">
<div id="fi" style="display: <?=($this->filterObj->query ? 'block' : 'none'); ?>;">
<form action="?filter=spells<?=$this->subCat; ?>" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?filter=spells<?=$this->subCat; ?>" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="text">
<?php
$this->brick('headIcons');
$this->brick('redButtons');
?>
<h1><?=$this->h1; ?></h1>
</div>
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?=Lang::game('school').Lang::main('colon'); ?></div> <div style="float: left"><?=Lang::game('school').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em"> <select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em">
<?php <?=$this->makeOptionsList(Lang::game('sc') , $f['sc'], 28,); ?>
foreach (Lang::game('sc') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['sc']) && in_array($i, (array)$f['sc']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
</select> </select>
</div> </div>
<?php if ($this->classPanel): ?> <?php if ($this->classPanel): ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?=Util::ucFirst(Lang::game('class')).Lang::main('colon'); ?></div> <div style="float: left"><?=$this->ucFirst(Lang::game('class')).Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818"> <select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818">
<?php <?=$this->makeOptionsList(Lang::game('cl') , $f['cl'], 28, fn($v, $k, &$e) => $v && ($e = ['class' => 'c'.$k])); ?>
foreach (Lang::game('cl') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).' class="c'.$i.'">'.$str."</option>\n";
endif;
endforeach;
?>
</select> </select>
</div> </div>
<?php <?php
@@ -52,76 +48,52 @@ endif;
if ($this->glyphPanel): if ($this->glyphPanel):
?> ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?=Util::ucFirst(Lang::game('glyphType')).Lang::main('colon'); ?></div> <div style="float: left"><?=Lang::game('glyphType'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['gl[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['gl[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em"> <select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em">
<?php <?=$this->makeOptionsList(Lang::game('gl') , $f['gl'], 28); ?>
foreach (Lang::game('gl') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['gl']) && in_array($i, (array)$f['gl']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
</select> </select>
</div> </div>
<?php endif; ?> <?php endif; ?>
<table> <table>
<tr> <tr>
<td><?=Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td> <td><?=$this->ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="2"> <td colspan="2">
<table><tr> <table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?=(isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null); ?>/></td> <td>&nbsp;<input type="text" name="na" size="30" <?=($f['na'] ? 'value="'.$this->escHTML($f['na']).'" ' : ''); ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="spell-ex" <?=(isset($f['ex']) ? 'checked="checked" ' : null); ?>/></td> <td>&nbsp; <input type="checkbox" name="ex" value="on" id="spell-ex" <?=($f['ex'] ? 'checked="checked" ' : ''); ?>/></td>
<td><label for="spell-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedspellsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?=Lang::main('extSearch'); ?></span></label></td> <td><label for="spell-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedspellsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?=Lang::main('extSearch'); ?></span></label></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?=Lang::game('level').Lang::main('colon'); ?></td> <td class="padded"><?=Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?=(isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null); ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?=(isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null); ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?=($f['minle'] ? 'value="'.$f['minle'].'" ' : ''); ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?=($f['maxle'] ? 'value="'.$f['maxle'].'" ' : ''); ?>/></td>
<td class="padded"> <td class="padded">
<table cellpadding="0" cellspacing="0" border="0"><tr> <table cellpadding="0" cellspacing="0" border="0"><tr>
<td>&nbsp;&nbsp;&nbsp;<?=Lang::game('reqSkillLevel').Lang::main('colon'); ?></td> <td>&nbsp;&nbsp;&nbsp;<?=Lang::game('reqSkillLevel'); ?></td>
<td>&nbsp;<input type="text" name="minrs" maxlength="3" class="smalltextbox2" <?=(isset($f['minrs']) ? 'value="'.$f['minrs'].'" ' : null); ?>/> - <input type="text" name="maxrs" maxlength="3" class="smalltextbox2" <?=(isset($f['maxrs']) ? 'value="'.$f['maxrs'].'" ' : null); ?>/></td> <td>&nbsp;<input type="text" name="minrs" maxlength="3" class="smalltextbox2" <?=($f['minrs'] ? 'value="'.$f['minrs'].'" ' : ''); ?>/> - <input type="text" name="maxrs" maxlength="3" class="smalltextbox2" <?=($f['maxrs'] ? 'value="'.$f['maxrs'].'" ' : ''); ?>/></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?=Util::ucFirst(Lang::game('race')).Lang::main('colon'); ?></td> <td class="padded"><?=$this->ucFirst(Lang::game('race')).Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="ra"> <td class="padded">&nbsp;<select name="ra">
<option></option> <option></option>
<?php <?=$this->makeOptionsList(Lang::game('ra') , $f['ra'], 28, fn($v, $k) => $v && $k > 0); ?>
foreach (Lang::game('ra') as $i => $str):
if ($str && $i > 0):
echo ' <option value="'.$i.'"'.(isset($f['ra']) && $f['ra'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
</select></td> </select></td>
<td class="padded"></td> <td class="padded"></td>
</tr><tr> </tr><tr>
<td class="padded"><?=Lang::game('mechAbbr').Lang::main('colon'); ?></td> <td class="padded"><?=Lang::game('mechAbbr'); ?></td>
<td class="padded">&nbsp;<select name="me"> <td class="padded">&nbsp;<select name="me">
<option></option> <option></option>
<?php <?=$this->makeOptionsList(Lang::game('me') , $f['me'], 28); ?>
foreach (Lang::game('me') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['me']) && $f['me'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
</select></td> </select></td>
<td> <td>
<table cellpadding="0" cellspacing="0" border="0"><tr> <table cellpadding="0" cellspacing="0" border="0"><tr>
<td class="padded">&nbsp;&nbsp;&nbsp;<?=Lang::game('dispelType').Lang::main('colon'); ?></td> <td class="padded">&nbsp;&nbsp;&nbsp;<?=Lang::game('dispelType').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="dt"> <td class="padded">&nbsp;<select name="dt">
<option></option> <option></option>
<?php <?=$this->makeOptionsList(Lang::game('dt') , $f['dt'], 28, fn($v, $k) => $v && $k != 7 && $k != 8); ?>
foreach (Lang::game('dt') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['dt']) && $f['dt'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif;
endforeach;
?>
</select></td> </select></td>
</tr></table> </tr></table>
</td> </td>
@@ -132,7 +104,7 @@ endforeach;
<div class="padded2"> <div class="padded2">
<div style="float: right"><?=Lang::main('refineSearch'); ?></div> <div style="float: right"><?=Lang::main('refineSearch'); ?></div>
<?=Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?=(!isset($f['ma']) ? 'checked="checked" ' : null); ?>/><label for="ma-0"><?=Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?=(isset($f['ma']) ? 'checked="checked" ' : null); ?> /><label for="ma-1"><?=Lang::main('oneFilter'); ?></label> <?=Lang::main('match'); ?><input type="radio" name="ma" value="" id="ma-0" <?=(!$f['ma'] ? 'checked="checked" ' : ''); ?>/><label for="ma-0"><?=Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?=($f['ma'] ? 'checked="checked" ' : ''); ?> /><label for="ma-1"><?=Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
@@ -146,7 +118,7 @@ endforeach;
<div class="pad"></div> <div class="pad"></div>
</div> </div>
<?php $this->brick('filter'); ?> <?=$this->renderFilter(12); ?>
<?php $this->brick('lvTabs'); ?> <?php $this->brick('lvTabs'); ?>