removing smarty - part X

readded spell/spells
- changes to Lang, since it can no longer access the template
- set required php-version to 5.5.0 (generators were added and are essential to aowow)
- display stats in footer to staff only
This commit is contained in:
Sarjuuk
2014-07-02 00:21:25 +02:00
parent 775b12d64c
commit ec5589f323
17 changed files with 2601 additions and 2487 deletions

View File

@@ -161,7 +161,7 @@ class AchievementList extends BaseType
{
// link to title - todo (low): crosslink
case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE:
$crtName = Util::ucFirst(Lang::$game['title']).Lang::$colon.$crtName;
$crtName = Util::ucFirst(Lang::$game['title']).Lang::$main['colon'].$crtName;
break;
// link to quest
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:

View File

@@ -718,13 +718,25 @@ class ItemList extends BaseType
$x .= Lang::$item['durability'].' '.$dur.' / '.$dur.'<br />';
// required classes
if ($classes = Lang::getClassString($this->curTpl['requiredClass']))
if ($classes = Lang::getClassString($this->curTpl['requiredClass'], $jsg, $__, $interactive))
{
foreach ($jsg as $js)
if (empty($this->jsGlobals[TYPE_CLASS][$js]))
$this->jsGlobals[TYPE_CLASS][$js] = $js;
$x .= Lang::$game['classes'].Lang::$main['colon'].$classes.'<br />';
}
// required races
if ($races = Lang::getRaceString($this->curTpl['requiredRace']))
if ($races = Lang::getRaceString($this->curTpl['requiredRace'], $__, $jsg, $__, $interactive))
{
foreach ($jsg as $js)
if (empty($this->jsGlobals[TYPE_RACE][$js]))
$this->jsGlobals[TYPE_RACE][$js] = $js;
if ($races != Lang::$game['ra'][0]) // not "both", but display combinations like: troll, dwarf
$x .= Lang::$game['races'].Lang::$main['colon'].$races.'<br />';
}
// required honorRank (not used anymore)
if ($rhr = $this->curTpl['requiredHonorRank'])

View File

@@ -332,10 +332,10 @@ class QuestList extends BaseType
if ($_ = $this->getField('rewardOrReqMoney'))
if ($_ < 0)
$xReq .= '<br /> - '.Lang::$quest['money'].Lang::$colon.Util::formatMoney(abs($_));
$xReq .= '<br /> - '.Lang::$quest['money'].Lang::$main['colon'].Util::formatMoney(abs($_));
if ($xReq)
$x .= '<br /><br /><span class="q">'.Lang::$quest['requirements'].Lang::$colon.'</span>'.$xReq;
$x .= '<br /><br /><span class="q">'.Lang::$quest['requirements'].Lang::$main['colon'].'</span>'.$xReq;
$x .= '</td></tr></table>';

View File

@@ -373,6 +373,15 @@ class SpellList extends BaseType
$tools = [];
for ($i = 1; $i <= 2; $i++)
{
// TotemCategory
if ($_ = $this->curTpl['toolCategory'.$i])
{
$tc = DB::Aowow()->selectRow('SELECT * FROM ?_totemcategory WHERE id = ?d', $_);
$tools[$i + 1] = array(
'id' => $_,
'name' => Util::localizedString($tc, 'name'));
}
// Tools
if (!$this->curTpl['tool'.$i])
continue;
@@ -390,15 +399,6 @@ class SpellList extends BaseType
break;
}
// TotemCategory
if ($_ = $this->curTpl['toolCategory'.$i])
{
$tc = DB::Aowow()->selectRow('SELECT * FROM ?_totemcategory WHERE id = ?d', $_);
$tools[$i + 1] = array(
'id' => $_,
'name' => Util::localizedString($tc, 'name'));
}
}
$this->tools = array_reverse($tools);
@@ -1533,7 +1533,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
if ($cId != $this->curTpl['effect'.$idx.'CreateItemId'])
continue;
$createItem = $this->relItems->renderTooltip([], true, $this->id);
$createItem = $this->relItems->renderTooltip(true, $this->id);
break 2;
}
}

View File

@@ -1288,9 +1288,10 @@ class Util
return [];
}
// note: omits required spell and chance in skill_discovery_template
$data = array_merge(
DB::Aowow()->selectCol('SELECT spellId FROM spell_learn_spell WHERE entry IN (?a)', $lookup),
DB::Aowow()->selectCol('SELECT spellId FROM skill_discovery_template WHERE reqSpell IN (?a)', $lookup), // note: omits required spell and chance
DB::Aowow()->selectCol('SELECT spellId FROM skill_discovery_template WHERE reqSpell IN (?a)', $lookup),
$extraIds
);

View File

@@ -12,10 +12,10 @@ if (!file_exists('config/config.php'))
// include all necessities, set up basics
require 'includes/kernel.php';
if (version_compare(PHP_VERSION, '5.4.0') <= 0)
if (version_compare(PHP_VERSION, '5.5.0') <= 0)
{
if (User::isInGroup(U_GROUP_EMPLOYEE))
Util::addNote(U_GROUP_EMPLOYEE, 'PHP Version 5.4.0 or higher required! Your version is '.PHP_VERSION."[br]Core functions are unavailable!");
Util::addNote(U_GROUP_EMPLOYEE, 'PHP Version 5.5.0 or higher required! Your version is '.PHP_VERSION."[br]Core functions are unavailable!");
else
(new GenericPage)->maintenance();
}

View File

@@ -217,7 +217,7 @@ class Lang
return implode(', ', $tmp);
}
public static function getClassString($classMask, $asHTML = true, &$n = 0)
public static function getClassString($classMask, &$ids = [], &$n = 0, $asHTML = true)
{
$classMask &= CLASS_MASK_ALL; // clamp to available classes..
@@ -227,26 +227,25 @@ class Lang
$tmp = [];
$i = 1;
$base = $asHTML ? '<a href="?class=%d" class="c%1$d">%2$s</a>' : '[class=%d]';
$br = $asHTML ? '' : '\n';
$br = $asHTML ? '' : '[br]';
while ($classMask)
{
if ($classMask & (1 << ($i - 1)))
{
$tmp[] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['cl'][$i]);
$tmp[$i] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['cl'][$i]);
$classMask &= ~(1 << ($i - 1));
if (!$asHTML)
Util::$pageTemplate->extendGlobalIds(TYPE_CLASS, $i);
}
$i++;
}
$n = count($tmp);
$n = count($tmp);
$ids = array_keys($tmp);
return implode(', ', $tmp);
}
public static function getRaceString($raceMask, &$side = 0, $asHTML = true, &$n = 0)
public static function getRaceString($raceMask, &$side = 0, &$ids = [], &$n = 0, $asHTML = true)
{
$raceMask &= RACE_MASK_ALL; // clamp to available races..
@@ -256,7 +255,7 @@ class Lang
$tmp = [];
$i = 1;
$base = $asHTML ? '<a href="?race=%d" class="q1">%s</a>' : '[race=%d]';
$br = $asHTML ? '' : '\n';
$br = $asHTML ? '' : '[br]';
if (!$raceMask)
{
@@ -280,16 +279,15 @@ class Lang
{
if ($raceMask & (1 << ($i - 1)))
{
$tmp[] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['ra'][$i]);
$tmp[$i] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['ra'][$i]);
$raceMask &= ~(1 << ($i - 1));
if (!$asHTML)
Util::$pageTemplate->extendGlobalIds(TYPE_RACE, $i);
}
$i++;
}
$n = count($tmp);
$n = count($tmp);
$ids = array_keys($tmp);
return implode(', ', $tmp);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,374 +4,347 @@ if (!defined('AOWOW_REVISION'))
die('illegal access');
$cats = Util::extractURLParams($pageParam);
$path = [0, 1];
$title = [Lang::$game['spells']]; // display max 2 cats, remove this base if nesecary
$filter = ['classPanel' => false, 'glyphPanel' => false];
$filterHash = !empty($_GET['filter']) ? '#'.sha1(serialize($_GET['filter'])) : null;
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_SPELL, -1, implode('.', $cats).$filterHash, User::$localeId]);
$validCats = array(
-2 => array( // Talents: Class => Skill
1 => [ 26, 256, 257],
2 => [594, 267, 184],
3 => [ 50, 163, 51],
4 => [253, 38, 39],
5 => [613, 56, 78],
6 => [770, 771, 772],
7 => [375, 373, 374],
8 => [237, 8, 6],
9 => [355, 354, 593],
11 => [574, 134, 573]
),
-3 => [782, 270, 653, 210, 655, 211, 213, 209, 780, 787, 214, 212, 781, 763, 215, 654, 775, 764, 217, 767, 786, 236, 768, 783, 203, 788, 765, 218, 251, 766, 785, 656, 208, 784, 761, 189, 188, 205, 204], // Pet Spells => Skill
-4 => true, // Racial Traits
-5 => true, // Mounts
-6 => true, // Companions
-7 => [409, 410, 411], // PetTalents => TalentTabId
-8 => true, // NPC Abilities
-9 => true, // GM Abilities
-11 => [6, 8, 10], // Proficiencies [Weapon, Armor, Language]
-13 => [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], // Glyphs => Class (GlyphType via filter)
0 => true, // Uncategorized
7 => array( // Abilities: Class => Skill
1 => [ 26, 256, 257],
2 => [594, 267, 184],
3 => [ 50, 163, 51],
4 => [253, 38, 39],
5 => [613, 56, 78],
6 => [770, 771, 772, 776],
7 => [375, 373, 374],
8 => [237, 8, 6],
9 => [355, 354, 593],
11 => [574, 134, 573]
),
9 => [129, 185, 356, 762], // Secondary Skills
11 => array( // Professions: Skill => Spell
171 => true,
164 => [9788, 9787, 17041, 17040, 17039],
333 => true,
202 => [20219, 20222],
182 => true,
773 => true,
755 => true,
165 => [10656, 10658, 10660],
186 => true,
393 => true,
197 => [26798, 26801, 26797],
)
);
$shortFilter = array(
129 => [ 6, 7], // First Aid
164 => [ 2, 4], // Blacksmithing
165 => [ 8, 1], // Leatherworking
171 => [ 1, 6], // Alchemy
185 => [ 3, 5], // Cooking
186 => [ 9, 0], // Mining
197 => [10, 2], // Tailoring
202 => [ 5, 3], // Engineering
333 => [ 4, 8], // Enchanting
356 => [ 0, 9], // Fishing
755 => [ 7, 10], // Jewelcrafting
773 => [15, 0], // Inscription
);
if (!Util::isValidPage($validCats, $cats))
$smarty->error();
if (!$smarty->loadCache($cacheKey, $pageData, $filter))
// menuId 1: Spell g_initPath()
// tabId 0: Database g_initHeader()
class SpellsPage extends GenericPage
{
$conditions = [];
$visibleCols = [];
$hiddenCols = [];
$lv = array(
'file' => 'spell',
'data' => [],
'params' => []
use ListPage;
protected $type = TYPE_SPELL;
protected $tpl = 'spells';
protected $path = [0, 1];
protected $tabId = 0;
protected $mode = CACHETYPE_PAGE;
protected $js = ['filters.js'];
protected $validCats = array(
-2 => array( // Talents: Class => Skill
1 => [ 26, 256, 257],
2 => [594, 267, 184],
3 => [ 50, 163, 51],
4 => [253, 38, 39],
5 => [613, 56, 78],
6 => [770, 771, 772],
7 => [375, 373, 374],
8 => [237, 8, 6],
9 => [355, 354, 593],
11 => [574, 134, 573]
),
-3 => [782, 270, 653, 210, 655, 211, 213, 209, 780, 787, 214, 212, 781, 763, 215, 654, 775, 764, 217, 767, 786, 236, 768, 783, 203, 788, 765, 218, 251, 766, 785, 656, 208, 784, 761, 189, 188, 205, 204], // Pet Spells => Skill
-4 => true, // Racial Traits
-5 => true, // Mounts
-6 => true, // Companions
-7 => [409, 410, 411], // PetTalents => TalentTabId
-8 => true, // NPC Abilities
-9 => true, // GM Abilities
-11 => [6, 8, 10], // Proficiencies [Weapon, Armor, Language]
-13 => [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], // Glyphs => Class (GlyphType via filter)
0 => true, // Uncategorized
7 => array( // Abilities: Class => Skill
1 => [ 26, 256, 257],
2 => [594, 267, 184],
3 => [ 50, 163, 51],
4 => [253, 38, 39],
5 => [613, 56, 78],
6 => [770, 771, 772, 776],
7 => [375, 373, 374],
8 => [237, 8, 6],
9 => [355, 354, 593],
11 => [574, 134, 573]
),
9 => [129, 185, 356, 762], // Secondary Skills
11 => array( // Professions: Skill => Spell
171 => true,
164 => [9788, 9787, 17041, 17040, 17039],
333 => true,
202 => [20219, 20222],
182 => true,
773 => true,
755 => true,
165 => [10656, 10658, 10660],
186 => true,
393 => true,
197 => [26798, 26801, 26797],
)
);
// reconstruct path & title
$path = array_merge($path, $cats);
private $shortFilter = array(
129 => [ 6, 7], // First Aid
164 => [ 2, 4], // Blacksmithing
165 => [ 8, 1], // Leatherworking
171 => [ 1, 6], // Alchemy
185 => [ 3, 5], // Cooking
186 => [ 9, 0], // Mining
197 => [10, 2], // Tailoring
202 => [ 5, 3], // Engineering
333 => [ 4, 8], // Enchanting
356 => [ 0, 9], // Fishing
755 => [ 7, 10], // Jewelcrafting
773 => [15, 0], // Inscription
);
if ($cats)
public function __construct($pageCall, $pageParam)
{
if (isset($cats[1]))
array_pop($title);
$this->getCategoryFromUrl($pageParam);;
$x = @Lang::$spell['cat'][$cats[0]];
if (is_array($x))
parent::__construct();
$this->name = Util::ucFirst(Lang::$game['spells']);
$this->subCat = $pageParam ? '='.$pageParam : '';
$this->filter = ['classPanel' => false, 'glyphPanel' => false];
}
protected function generateContent()
{
$conditions = [];
$visibleCols = [];
$hiddenCols = [];
$this->lvData = array(
'file' => 'spell',
'data' => [],
'params' => []
);
// the next lengthy ~250 lines determine $conditions and lvParams
if ($this->category)
{
if (is_array($x[0]))
array_unshift($title, $x[0][0]);
else
array_unshift($title, $x[0]);
}
else if ($x !== null)
array_unshift($title, $x);
switch ($this->category[0])
{
case -2: // Character Talents
$this->filter['classPanel'] = true;
switch($cats[0])
{
case -2: // Character Talents
$filter['classPanel'] = true;
array_push($visibleCols, 'singleclass', 'level', 'schools', 'tier');
array_push($visibleCols, 'singleclass', 'level', 'schools', 'tier');
$conditions[] = ['s.typeCat', -2];
$conditions[] = ['s.typeCat', -2];
// i will NOT redefine those class2skillId ... reusing
if (isset($this->category[2]))
$conditions[] = ['s.skillLine1', $this->category[2]];
else if (isset($this->category[1]))
$conditions[] = ['s.skillLine1', $this->validCats[-2][$this->category[1]]];
if (isset($cats[1]))
array_unshift($title, Lang::$game['cl'][$cats[1]]);
break;
case -3: // Pet Spells
array_push($visibleCols, 'level', 'schools');
if (isset($cats[1]) && empty($cats[2])) // i will NOT redefine those class2skillId ... reusing
$conditions[] = ['s.skillLine1', $validCats[-2][$cats[1]]];
else if (isset($cats[1]))
$conditions[] = ['s.skillLine1', $cats[2]];
$conditions[] = ['s.typeCat', -3];
break;
case -3: // Pet Spells
array_push($visibleCols, 'level', 'schools');
$conditions[] = ['s.typeCat', -3];
if (isset($cats[1]))
{
$xCond = null;
for ($i = -2; $i < 0; $i++)
if (isset($this->category[1]))
{
foreach (Util::$skillLineMask[$i] as $idx => $pair)
$xCond = null;
for ($i = -2; $i < 0; $i++)
{
if ($pair[1] == $cats[1])
foreach (Util::$skillLineMask[$i] as $idx => $pair)
{
$xCond = ['AND', ['s.skillLine1', $i], ['s.skillLine2OrMask', 1 << $idx, '&']];
break;
if ($pair[1] == $this->category[1])
{
$xCond = ['AND', ['s.skillLine1', $i], ['s.skillLine2OrMask', 1 << $idx, '&']];
break;
}
}
}
$conditions[] = [
'OR',
$xCond,
['s.skillLine1', $this->category[1]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->category[1]]]
];
}
else
{
$conditions[] = [
'OR',
['s.skillLine1', [-1, -2]],
['s.skillLine1', $this->validCats[-3]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->validCats[-3]]]
];
}
break;
case -4: // Racials
array_push($visibleCols, 'classes');
$conditions[] = ['s.typeCat', -4];
break;
case -8: // NPC-Spells
case -9: // GM Spells
array_push($visibleCols, 'level');
case -5: // Mounts
case -6: // Companions
$conditions[] = ['s.typeCat', $this->category[0]];
break;
case -7: // Pet Talents
array_push($visibleCols, 'level', 'tier');
$conditions[] = ['s.typeCat', -7];
if (isset($this->category[1]))
{
switch ($this->category[1]) // Spells can be used by multiple specs
{
case 409: // Tenacity
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE1, '&'];
$url = '?pets=1';
break;
case 410: // Cunning
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE2, '&'];
$url = '?pets=2';
break;
case 411: // Ferocity
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE0, '&'];
$url = '?pets=0';
break;
}
$this->lvData['params']['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
}
$this->lvData['params']['_petTalents'] = 1; // not conviced, this is correct, but .. it works
break;
case -11: // Proficiencies ... the subIds are actually SkillLineCategories
if (!isset($this->category[1]) || $this->category[1] != 10)
array_push($visibleCols, 'classes');
$conditions[] = ['s.typeCat', -11];
if (isset($this->category[1]))
{
if ($this->category[1] == 6) // todo (med): we know Weapon(6) includes spell Shoot(3018), that has a mask; but really, ANY proficiency or petSkill should be in that mask so there is no need to differenciate
$conditions[] = ['OR', ['s.skillLine1', SpellList::$skillLines[$this->category[1]]], ['s.skillLine1', -3]];
else
$conditions[] = ['s.skillLine1', SpellList::$skillLines[$this->category[1]]];
}
break;
case -13: // Glyphs
$this->filter['classPanel'] = true;
$this->filter['glyphPanel'] = true;
array_push($visibleCols, 'singleclass', 'glyphtype');
$conditions[] = ['s.typeCat', -13];
if (isset($this->category[1]))
$conditions[] = ['s.reqClassMask', 1 << ($this->category[1] - 1), '&'];
break;
case 7: // Abilities
$this->filter['classPanel'] = true;
array_push($visibleCols, 'level', 'singleclass', 'schools');
$conditions[] = ['s.typeCat', [7, -2]];
$conditions[] = [['s.cuFlags', (SPELL_CU_TRIGGERED | SPELL_CU_TALENT | CUSTOM_EXCLUDE_FOR_LISTVIEW), '&'], 0];
// Runeforging listed multiple times, exclude from explicit skill-listing
// if (isset($this->category[1]) && $this->category[1] == 6 && isset($this->category[2]) && $this->category[2] != 776)
// $conditions[] = [['s.attributes0', 0x80, '&'], 0];
// else
// $conditions[] = [
// [['s.attributes0', 0x80, '&'], 0], // ~SPELL_ATTR0_HIDDEN_CLIENTSIDE
// ['s.attributes0', 0x20, '&'], // SPELL_ATTR0_TRADESPELL (DK: Runeforging)
// 'OR'
// ];
if (isset($this->category[2]))
{
$conditions[] = [
'OR',
['s.skillLine1', $this->category[2]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->category[2]]]
];
}
else if (isset($this->category[1]))
{
$conditions[] = [
'OR',
['s.skillLine1', $this->validCats[7][$this->category[1]]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->validCats[7][$this->category[1]]]]
];
}
break;
case 9: // Secondary Skills
array_push($visibleCols, 'source');
$conditions[] = ['s.typeCat', 9];
if (isset($this->category[1]))
{
$conditions[] = [
'OR',
['s.skillLine1', $this->category[1]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $this->category[1]]]
];
if ($sf = @$this->shortFilter[$this->category[1]])
{
$txt = '';
if ($sf[0] && $sf[1])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
else if ($sf[0])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
else if ($sf[1])
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
$note = Lang::$spell['cat'][$this->category[0]][$this->category[1]];
if (is_array($note))
$note = $note[0];
$this->lvData['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$this->lvData['params']['sort'] = "$['skill', 'name']";
}
}
$conditions[] = [
'OR',
$xCond,
['s.skillLine1', $cats[1]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[1]]]
];
break;
case 11: // Professions
array_push($visibleCols, 'source');
array_unshift($title, Lang::$spell['cat'][-3][$cats[1]]);
}
else
{
$conditions[] = [
'OR',
['s.skillLine1', [-1, -2]],
['s.skillLine1', $validCats[-3]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $validCats[-3]]]
];
}
$conditions[] = ['s.typeCat', 11];
break;
case -4: // Racials
array_push($visibleCols, 'classes');
$conditions[] = ['s.typeCat', -4];
break;
case -8: // NPC-Spells
case -9: // GM Spells
array_push($visibleCols, 'level');
case -5: // Mounts
case -6: // Companions
$conditions[] = ['s.typeCat', $cats[0]];
break;
case -7: // Pet Talents
array_push($visibleCols, 'level', 'tier');
$conditions[] = ['s.typeCat', -7];
if (isset($cats[1]))
{
array_unshift($title, Lang::$spell['cat'][-7][$cats[1]]);
switch($cats[1]) // Spells can be used by multiple specs
if (isset($this->category[2]))
{
case 409: // Tenacity
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE1, '&'];
$url = '?pets=1';
break;
case 410: // Cunning
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE2, '&'];
$url = '?pets=2';
break;
case 411: // Ferocity
$conditions[] = ['s.cuFlags', SPELL_CU_PET_TALENT_TYPE0, '&'];
$url = '?pets=0';
break;
if ($this->category[2] == 9787) // general weaponsmithing
$conditions[] = ['s.reqSpellId', [9787, 17039, 17040, 17041]];
else
$conditions[] = ['s.reqSpellId', $this->category[2]];
}
else if (isset($this->category[1]))
$conditions[] = ['s.skillLine1', $this->category[1]];
if (isset($this->category[1]))
{
$conditions[] = ['s.skillLine1', $this->category[1]];
if ($sf = @$this->shortFilter[$this->category[1]])
{
$txt = '';
if ($sf[0] && $sf[1])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
else if ($sf[0])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
else if ($sf[1])
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
$note = Lang::$spell['cat'][$this->category[0]][$this->category[1]];
if (is_array($note))
$note = $note[0];
$this->lvData['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$this->lvData['params']['sort'] = "$['skill', 'name']";
}
}
$lv['params']['note'] = '$$WH.sprintf(LANG.lvnote_pettalents, "'.$url.'")';
}
break;
case 0: // misc. Spells
array_push($visibleCols, 'level');
$lv['params']['_petTalents'] = 1; // not conviced, this is correct, but .. it works
break;
case -11: // Proficiencies ... the subIds are actually SkillLineCategories
if (!isset($cats[1]) || $cats[1] != 10)
array_push($visibleCols, 'classes');
$conditions[] = ['s.typeCat', -11];
if (isset($cats[1]))
{
if ($cats[1] == 6) // todo (med): we know Weapon(6) includes spell Shoot(3018), that has a mask; but really, ANY proficiency or petSkill should be in that mask so there is no need to differenciate
$conditions[] = ['OR', ['s.skillLine1', SpellList::$skillLines[$cats[1]]], ['s.skillLine1', -3]];
else
$conditions[] = ['s.skillLine1', SpellList::$skillLines[$cats[1]]];
array_unshift($title, Lang::$spell['cat'][-11][$cats[1]]);
}
break;
case -13: // Glyphs
$filter['classPanel'] = true;
$filter['glyphPanel'] = true;
array_push($visibleCols, 'singleclass', 'glyphtype');
$conditions[] = ['s.typeCat', -13];
if (isset($cats[1]))
{
array_unshift($title, Lang::$game['cl'][$cats[1]]);
$conditions[] = ['s.reqClassMask', 1 << ($cats[1] - 1), '&'];
}
break;
case 7: // Abilities
$filter['classPanel'] = true;
array_push($visibleCols, 'level', 'singleclass', 'schools');
if (isset($cats[1]))
array_unshift($title, Lang::$game['cl'][$cats[1]]);
$conditions[] = ['s.typeCat', [7, -2]];
$conditions[] = [['s.cuFlags', (SPELL_CU_TRIGGERED | SPELL_CU_TALENT | CUSTOM_EXCLUDE_FOR_LISTVIEW), '&'], 0];
// Runeforging listed multiple times, exclude from explicit skill-listing
// if (isset($cats[1]) && $cats[1] == 6 && isset($cats[2]) && $cats[2] != 776)
// $conditions[] = [['s.attributes0', 0x80, '&'], 0];
// else
// $conditions[] = [
// [['s.attributes0', 0x80, '&'], 0], // ~SPELL_ATTR0_HIDDEN_CLIENTSIDE
// ['s.attributes0', 0x20, '&'], // SPELL_ATTR0_TRADESPELL (DK: Runeforging)
// 'OR'
// ];
if (isset($cats[2]))
{
$conditions[] = [
'OR',
['s.skillLine1', $cats[2]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[2]]]
];
}
else if (isset($cats[1]))
{
$conditions[] = [
'OR',
['s.skillLine1', $validCats[7][$cats[1]]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $validCats[7][$cats[1]]]]
];
}
break;
case 9: // Secondary Skills
array_push($visibleCols, 'source');
$conditions[] = ['s.typeCat', 9];
if (isset($cats[1]))
{
array_unshift($title, Lang::$spell['cat'][9][$cats[1]]);
$conditions[] = [
'OR',
['s.skillLine1', $cats[1]],
['AND', ['s.skillLine1', 0, '>'], ['s.skillLine2OrMask', $cats[1]]]
];
if ($sf = @$shortFilter[$cats[1]])
{
$txt = '';
if ($sf[0] && $sf[1])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
else if ($sf[0])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
else if ($sf[1])
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
$note = Lang::$spell['cat'][$cats[0]][$cats[1]];
if (is_array($note))
$note = $note[0];
$lv['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$lv['params']['sort'] = "$['skill', 'name']";
}
}
break;
case 11: // Professions
array_push($visibleCols, 'source');
$conditions[] = ['s.typeCat', 11];
if (isset($cats[2]))
{
array_unshift($title, Lang::$spell['cat'][11][$cats[1]][$cats[2]]);
if ($cats[2] == 9787) // general weaponsmithing
$conditions[] = ['s.reqSpellId', [9787, 17039, 17040, 17041]];
else
$conditions[] = ['s.reqSpellId', $cats[2]];
}
else if (isset($cats[1]))
{
$x = Lang::$spell['cat'][11][$cats[1]];
if (is_array($x))
array_unshift($title, $x[0]);
else
array_unshift($title, $x);
$conditions[] = ['s.skillLine1', $cats[1]];
}
if (isset($cats[1]))
{
$conditions[] = ['s.skillLine1', $cats[1]];
if ($sf = @$shortFilter[$cats[1]])
{
$txt = '';
if ($sf[0] && $sf[1])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
else if ($sf[0])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]);
else if ($sf[1])
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]);
$note = Lang::$spell['cat'][$cats[0]][$cats[1]];
if (is_array($note))
$note = $note[0];
$lv['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note);
$lv['params']['sort'] = "$['skill', 'name']";
}
}
break;
case 0: // misc. Spells
array_push($visibleCols, 'level');
if ($cats[0] !== null) // !any Spell (php loose comparison: (null == 0) is true)
{
$conditions[] = array(
'OR',
['s.typeCat', 0],
@@ -379,91 +352,91 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter))
);
break;
}
}
}
$spellFilter = new SpellListFilter();
if ($_ = $spellFilter->getConditions())
$conditions[] = $_;
$spells = new SpellList($conditions);
$this->extendGlobalData($spells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
$this->lvData['data'] = $spells->getListviewData();
// recreate form selection
$this->filter = array_merge($spellFilter->getForm('form'), $this->filter);
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
$this->filter['fi'] = $spellFilter->getForm();
if (!empty($this->filter['fi']['extraCols']))
$this->lvData['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
// create note if search limit was exceeded; overwriting 'note' is intentional
if ($spells->getMatches() > CFG_SQL_LIMIT_DEFAULT)
{
$this->lvData['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_spellsfound', $spells->getMatches(), CFG_SQL_LIMIT_DEFAULT);
$this->lvData['params']['_truncated'] = 1;
}
if ($spellFilter->error)
$this->lvData['params']['_errors'] = '$1';
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
if ($mask & 0x1)
$visibleCols[] = 'reagents';
if (!($mask & 0x2) && $this->category && !in_array($this->category[0], [9, 11]))
$hiddenCols[] = 'skill';
if (($mask & 0x4))
$visibleCols[] = 'trainingcost';
if ($visibleCols)
$this->lvData['params']['visibleCols'] = '$'.json_encode($visibleCols);
if ($hiddenCols)
$this->lvData['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
// sort for dropdown-menus
asort(Lang::$game['ra']);
asort(Lang::$game['cl']);
asort(Lang::$game['sc']);
asort(Lang::$game['me']);
}
$spellFilter = new SpellListFilter();
if ($_ = $spellFilter->getConditions())
$conditions[] = $_;
$spells = new SpellList($conditions);
$spells->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED);
$lv['data'] = $spells->getListviewData();
// recreate form selection
$filter = array_merge($spellFilter->getForm('form'), $filter);
$filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
$filter['fi'] = $spellFilter->getForm();
if (isset($filter['gl']) && !is_array($filter['gl']))
protected function generateTitle()
{
while (count($path) < 4)
$path[] = 0;
$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]]);
}
$path[] = $filter['gl'];
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);
}
if (!empty($filter['fi']['extraCols']))
$lv['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
// create note if search limit was exceeded; overwriting 'note' is intentional
if ($spells->getMatches() > CFG_SQL_LIMIT_DEFAULT)
protected function generatePath()
{
$lv['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_spellsfound', $spells->getMatches(), CFG_SQL_LIMIT_DEFAULT);
$lv['params']['_truncated'] = 1;
foreach ($this->category as $c)
$this->path[] = $c;
$form = (new SpellListFilter())->getForm('form');
if (count($this->path) == 4 && $this->category[0] == -13 && isset($form['gl']) && !is_array($form['gl']))
$this->path[] = $form['gl'];
}
if ($spellFilter->error)
$lv['params']['_errors'] = '$1';
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
if ($mask & 0x1)
$visibleCols[] = 'reagents';
if (!($mask & 0x2) && $cats && $cats[0] != 9 && $cats[0] != 11)
$hiddenCols[] = 'skill';
if (($mask & 0x4) || $spells->getField('trainingCost'))
$visibleCols[] = 'trainingcost';
if ($visibleCols)
$lv['params']['visibleCols'] = '$'.json_encode($visibleCols);
if ($hiddenCols)
$lv['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
// menuId 1: Spell g_initPath()
// tabId 0: Database g_initHeader()
$pageData = array(
'page' => array(
'title' => implode(" - ", $title),
'path' => json_encode($path, JSON_NUMERIC_CHECK),
'tab' => 0,
'subCat' => $pageParam !== null ? '='.$pageParam : '',
'reqJS' => array(
STATIC_URL.'/js/filters.js'
)
),
'lv' => $lv
);
$smarty->saveCache($cacheKey, $pageData, $filter);
}
// sort for dropdown-menus
asort(Lang::$game['ra']);
asort(Lang::$game['cl']);
asort(Lang::$game['sc']);
asort(Lang::$game['me']);
$smarty->updatePageVars($pageData['page']);
$smarty->assign('filter', $filter);
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$achievement, ['colon' => Lang::$colon]));
$smarty->assign('lvData', $pageData['lv']);
// load the page
$smarty->display('spells.tpl');
?>

View File

@@ -1,22 +1,22 @@
<div id="footer">
<?php
if ($this->time || isset($this->mysql) || $this->isCached):
echo "<table style=\"margin:auto;\">\n";
if (User::isInGroup(U_GROUP_EMPLOYEE) && ($this->time || isset($this->mysql) || $this->isCached)):
echo " <table style=\"margin:auto;\">\n";
if (isset($this->mysql)):
echo '<tr><td style="text-align:left;">'.Lang::$main['numSQL'] .'</td><td>'.$this->mysql['count']."</td></tr>\n";
echo '<tr><td style="text-align:left;">'.Lang::$main['timeSQL'].'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</td></tr>\n";
echo ' <tr><td style="text-align:left;">'.Lang::$main['numSQL'] .'</td><td>'.$this->mysql['count']."</td></tr>\n";
echo ' <tr><td style="text-align:left;">'.Lang::$main['timeSQL'].'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</td></tr>\n";
endif;
if ($this->time):
echo '<tr><td style="text-align:left;">Page generated in</td><td>'.Util::formatTime($this->time * 1000, true)."</td></tr>\n";
echo ' <tr><td style="text-align:left;">Page generated in</td><td>'.Util::formatTime($this->time * 1000, true)."</td></tr>\n";
endif;
if ($this->isCached):
echo "<tr><td style=\"text-align:left;\">(rebuild from cache)</td><td></td></tr>\n";
echo " <tr><td style=\"text-align:left;\">(rebuild from cache)</td><td></td></tr>\n";
endif;
echo "</table>\n";
echo " </table>\n";
endif;
?>
</div>

View File

@@ -1,7 +1,7 @@
<h3><?php echo Lang::$main['reagents']; ?></h3>
<h3><?php echo Lang::$spell['reagents']; ?></h3>
<?php
if ($this->reagents['enhanced']):
if ($enhanced):
?>
<style type="text/css">
.iconlist-col { float: left; width: 31%; margin-right: 2%; }
@@ -163,36 +163,36 @@ endif;
<table class="iconlist" id="reagent-list-generic">
<?php
if ($this->reagents['enhanced']):
if ($enhanced):
?>
<tr>
<th></th>
<th align="left">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',true);" value="{$lang._expandAll}">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',false);" value="{$lang._collapseAll}">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',true);" value="<?php echo Lang::$spell['_expandAll']; ?>">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',false);" value="<?php echo Lang::$spell['_collapseAll']; ?>">
</th>
</tr>
<?php
endif;
foreach ($this->reagents['data'] as $k => $itr):
foreach ($reagents as $k => $itr):
echo '<tr id="reagent-list-generic.'.$itr['path'].'"'.($itr['level'] ? ' style="display: none"' : null).'><th align="right" id="iconlist-icon'.$k.'"></th>' .
'<td'.($itr['level'] ? ' style="padding-left: '.$itr['level'].'em"' : null);
'<td'.($itr['level'] ? ' style="padding-left: '.$itr['level'].'em"' : null).'>';
if (!empty($itr['final']) && $this->reagents['enhanced']):
if (!empty($itr['final']) && $enhanced):
echo '<div class="iconlist-tree" style="width: 15px; float: left">&nbsp;</div>';
elseif ($this->reagents['enhanced']):
elseif ($enhanced):
echo '<div class="iconlist-tree disclosure-off" onclick="iconlist_showhide(this);" style="padding-left: 0; cursor: pointer; width: 15px; float: left" id="spn.reagent-list-generic.'.$itr['path'].'">&nbsp;</div>';
endif;
echo '<span class="q'.($itr['type'] == TYPE_ITEM) ? $itr['quality'] : null).'"><a href="?'.$itr['typeStr'].'='.$itr['typeId'].'">'.$itr['name'].'</a></span>'.($itr['qty'] > 1 ? '&nbsp;('.$itr['qty'].')' : null)."</td></tr>\n";
echo '<span class="q'.($itr['type'] == TYPE_ITEM ? $itr['quality'] : null).'"><a href="?'.$itr['typeStr'].'='.$itr['typeId'].'">'.$itr['name'].'</a></span>'.($itr['qty'] > 1 ? '&nbsp;('.$itr['qty'].')' : null)."</td></tr>\n";
endforeach;
?>
</table>
<script type="text/javascript">//<![CDATA[
<?php
foreach ($this->reagents['data'] as $k => $itr):
foreach ($reagents as $k => $itr):
echo "\$WH.ge('iconlist-icon".$k."').appendChild(g_".$itr['typeStr']."s.createIcon(".$itr['typeId'].", 0, ".$itr['qty']."));\n";
endforeach;
?>

View File

@@ -9,7 +9,8 @@ foreach ($vars as $id => $data):
endforeach;
if (isset($this->typeId) && !empty($extra[$this->typeId])):
echo '_['.$extra[$this->typeId]['id'].'].tooltip_'.User::$localeString.' = \''.Util::jsEscape($extra[$this->typeId]['tooltip']).'\';';
echo '_['.$extra[$this->typeId]['id'].'].spells_'.User::$localeString.' = '.json_encode($extra[$this->typeId]['spells'], JSON_NUMERIC_CHECK).';';
$x = $extra[$this->typeId];
echo "\n_[".$x['id'].'].tooltip_'.User::$localeString.' = \''.Util::jsEscape($x['tooltip'])."';";
echo "\n_[".$x['id'].'].spells_'.User::$localeString.' = '.json_encode($x['spells'], JSON_NUMERIC_CHECK).';';
endif;
?>

View File

@@ -7,10 +7,11 @@ foreach ($vars as $id => $data):
'};';
endforeach;
if ($extra):
echo '_['.$extra['id'].'].tooltip_'.User::$localeString.' = \''.$extra['tooltip'].'\'';
echo '_['.$extra['id'].'].buff_'.User::$localeString.' = \''.$extra['buff'].'\'';
echo '_['.$extra['id'].'].spells_'.User::$localeString.' = {'.json_encode($extra['spells'], JSON_NUMERIC_CHECK).'};';
echo '_['.$extra['id'].'].buffspells_'.User::$localeString.' = {'.json_encode($extra['buffspells'], JSON_NUMERIC_CHECK).'};';
if (isset($this->typeId) && !empty($extra[$this->typeId])):
$x = $extra[$this->typeId];
echo "\n_[".$x['id'].'].tooltip_'.User::$localeString.' = \''.$x['tooltip']."';";
echo "\n_[".$x['id'].'].buff_'.User::$localeString.' = \''.$x['buff']."';";
echo "\n_[".$x['id'].'].spells_'.User::$localeString.' = '.json_encode($x['spells'], JSON_NUMERIC_CHECK).';';
echo "\n_[".$x['id'].'].buffspells_'.User::$localeString.' = '.json_encode($x['buffspells'], JSON_NUMERIC_CHECK).';';
endif;
?>

View File

@@ -1,188 +0,0 @@
{include file='header.tpl'}
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
{if !empty($announcements)}
{foreach from=$announcements item=item}
{include file='bricks/announcement.tpl' an=$item}
{/foreach}
{/if}
<script type="text/javascript">//<![CDATA[
{include file='bricks/community.tpl'}
var g_pageInfo = {ldelim}type: {$type}, typeId: {$typeId}, name: '{$name|escape:"quotes"}'{rdelim};
g_initPath({$path});
//]]></script>
{include file='bricks/infobox.tpl'}
<div class="text">
{*include file='bricks/headIcons.tpl'*}
{include file='bricks/redButtons.tpl'}
<h1 class="h1-icon">{$name}</h1>
{include file='bricks/tooltip.tpl'}
{if $reagents[0]}
{if $tools}<div style="float: left; margin-right: 75px">{/if}
{include file='bricks/reagentList.tpl' reagents=$reagents[1] enhanced=$reagents[0]}
{if $tools}</div>{/if}
{/if}
{if $tools}
{if $reagents[0]}<div style="float: left">{/if}
<h3>{$lang.tools}</h3>
<table class="iconlist">
{section name=i loop=$tools}
<tr><th align="right" id="iconlist-icon{$iconlist1++}"></th><td><span class="q1"><a href="{$tools[i].url}">{$tools[i].name}</a></span></td></tr>
{/section}
</table>
<script type="text/javascript">
{section name=i loop=$tools}{if isset($tools[i].itemId)}
$WH.ge('iconlist-icon{$iconlist2++}').appendChild(g_items.createIcon({$tools[i].itemId}, 0, 1));
{/if}{/section}
</script>
{if $reagents[0]}</div>{/if}
{/if}
<div class="clear"></div>
{include file='bricks/article.tpl'}
{*
if !empty($transfer)}
<div class="pad"></div>
{$lang._transfer|sprintf:$transfer.id:´´:$transfer.icon:$transfer.name:$transfer.facInt:$transfer.facName}
{/if}
*}
{if isset($unavailable)}
<div class="pad"></div>
<b style="color: red">{$lang._unavailable}</b>
{/if}
<h3>{$lang._spellDetails}</h3>
<table class="grid" id="spelldetails">
<colgroup>
<col width="8%" />
<col width="42%" />
<col width="50%" />
</colgroup>
<tr>
<td colspan="2" style="padding: 0; border: 0; height: 1px"></td>
<td rowspan="6" style="padding: 0; border-left: 3px solid #404040">
<table class="grid" style="border: 0">
<tr>
<td style="height: 0; padding: 0; border: 0" colspan="2"></td>
</tr>
<tr>
<th style="border-left: 0; border-top: 0">{$lang.duration}</th>
<td width="100%" style="border-top: 0">{if !empty($duration)}{$duration}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
</tr>
<tr>
<th style="border-left: 0">{$lang.school}</th>
<td>{$school}</td>
</tr>
<tr>
<th style="border-left: 0">{$lang.mechanic}</th>
<td width="100%" style="border-top: 0">{if $mechanic}{$mechanic}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
</tr>
<tr>
<th style="border-left: 0">{$lang.dispelType}</th>
<td width="100%" style="border-top: 0">{if $dispel}{$dispel}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
</tr>
<tr>
<th style="border-bottom: 0; border-left: 0">{$lang._gcdCategory}</th>
<td style="border-bottom: 0">{if $gcdCat}{$gcdCat}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="border-top: 0">{$lang._cost}</th>
<td style="border-top: 0">{if !empty($powerCost)}{$powerCost}{else}{$lang._none}{/if}</td>
</tr>
<tr>
<th>{$lang._range}</th>
<td>{$range} {$lang._distUnit} <small>({$rangeName})</small></td>
</tr>
<tr>
<th>{$lang._castTime}</th>
<td>{$castTime}</td>
</tr>
<tr>
<th>{$lang._cooldown}</th>
<td>{if !empty($cooldown)}{$cooldown}{else}<span class="q0">{$lang.n_a}</span>{/if}</td>
</tr>
<tr>
<th><dfn title="{$lang._globCD}">{$lang._gcd}</dfn></th>
<td>{$gcd}</td>
</tr>
{if !empty($scaling)}
<tr>
<th>{$lang._scaling}</th>
<td colspan="3">{$scaling}</td>
</tr>
{/if}
{if !empty($stances)}
<tr>
<th>{$lang._forms}</th>
<td colspan="3">{$stances}</td>
</tr>
{/if}
{if !empty($items)}
<tr>
<th>{$lang.requires2}</th>
<td colspan="3">{$items}</td>
</tr>
{/if}
{section name=i loop=$effect}
<tr>
<th>{$lang._effect} #{$smarty.section.i.index+1}</th>
<td colspan="3" style="line-height: 17px">
{$effect[i].name}
<small>
{if isset($effect[i].value)}<br>{$lang._value}{$lang.colon}{$effect[i].value}{/if}
{if isset($effect[i].radius)}<br>{$lang._radius}{$lang.colon}{$effect[i].radius} {$lang._distUnit}{/if}
{if isset($effect[i].interval)}<br>{$lang._interval}{$lang.colon}{$effect[i].interval}{/if}
{if isset($effect[i].mechanic)}<br>{$lang.mechanic}{$lang.colon}{$effect[i].mechanic}{/if}
{if isset($effect[i].procData)}<br>{if $effect[i].procData[0] < 0}{$lang.ppm|sprintf:$effect[i].procData[0]*-1}{else}{$lang.procChance}{$lang.colon}{$effect[i].procData[0]}%{/if}{if $effect[i].procData[1]} ({$lang.cooldown|sprintf:$effect[i].procData[1]}){/if}{/if}
</small>
{if isset($effect[i].icon)}
<table class="icontab">
<tr>
<th id="icontab-icon{$smarty.section.i.index}"></th>
{if isset($effect[i].icon.quality)}
<td><span class="q{$effect[i].icon.quality}"><a href="?item={$effect[i].icon.id}">{$effect[i].icon.name}</a></span></td>
{else}
<td>{if !$effect[i].icon.name|strpos:"#"}<a href="?spell={$effect[i].icon.id}">{/if}{$effect[i].icon.name}{if !$effect[i].icon.name|strpos:"#"}</a>{/if}</td>
{/if}
<th></th><td></td>
</tr>
</table>
<script type="text/javascript">
$WH.ge('icontab-icon{$smarty.section.i.index}').appendChild({if isset($effect[i].icon.quality)}g_items{else}g_spells{/if}.createIcon({$effect[i].icon.id}, 1, {$effect[i].icon.count}));
</script>
{/if}
</td>
</tr>
{/section}
</table>
<h2 class="clear">{$lang.related}</h2>
</div>
{include file='bricks/tabsRelated.tpl' tabs=$lvData}
{include file='bricks/contribute.tpl'}
</div><!-- main-contents -->
</div><!-- main -->
{include file='footer.tpl'}

View File

@@ -0,0 +1,242 @@
<?php $this->brick('header'); ?>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
<script type="text/javascript">//<![CDATA[
<?php
$this->brick('community');
echo " var g_pageInfo = ".json_encode($this->gPageInfo, JSON_NUMERIC_CHECK).";\n" .
" g_initPath(".json_encode($this->path, JSON_NUMERIC_CHECK).");\n";
?>
//]]></script>
<?php $this->brick('infobox'); ?>
<div class="text">
<?php $this->brick('redButtons'); ?>
<h1 class="h1-icon"><?php echo $this->name; ?></h1>
<?php
$this->brick('tooltip');
if ($this->reagents[0]):
if ($this->tools):
echo " <div style=\"float: left; margin-right: 75px\">\n";
endif;
$this->brick('reagentList', ['reagents' => $this->reagents[1], 'enhanced' => $this->reagents[0]]);
if ($this->tools):
echo " </div>\n";
endif;
if ($this->tools):
if ($this->reagents[0]):
echo " <div style=\"float: left\">\n";
endif;
?>
<h3><?php echo Lang::$spell['tools']; ?></h3>
<table class="iconlist">
<?php
foreach ($this->tools as $i => $t):
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";
endforeach;
?>
</table>
<script type="text/javascript">
<?php
foreach ($this->tools as $i => $t):
if (isset($t['itemId'])):
echo " $WH.ge('iconlist-icon.".($i + 1)."').appendChild(g_items.createIcon(".$t['itemId'].", 0, 1));\n";
endif;
endforeach;
?>
</script>
<?php
if ($this->reagents[0]):
echo " </div>\n";
endif;
endif;
endif;
?>
<div class="clear"></div>
<?php $this->brick('article'); ?>
<?php /*
if !empty($transfer)}
<div class="pad"></div>
{$lang._transfer|sprintf:$transfer.id:´´:$transfer.icon:$transfer.name:$transfer.facInt:$transfer.facName}
{/if}
*/
?>
<h3><?php echo Lang::$spell['_spellDetails']; ?></h3>
<table class="grid" id="spelldetails">
<colgroup>
<col width="8%" />
<col width="42%" />
<col width="50%" />
</colgroup>
<tr>
<td colspan="2" style="padding: 0; border: 0; height: 1px"></td>
<td rowspan="6" style="padding: 0; border-left: 3px solid #404040">
<table class="grid" style="border: 0">
<tr>
<td style="height: 0; padding: 0; border: 0" colspan="2"></td>
</tr>
<tr>
<th style="border-left: 0; border-top: 0"><?php echo Lang::$game['duration']; ?></th>
<td width="100%" style="border-top: 0"><?php echo !empty($this->duration) ? $this->duration : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td>
</tr>
<tr>
<th style="border-left: 0"><?php echo Lang::$game['school']; ?></th>
<td><?php echo User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, $this->school[0], $this->school[1]) : $this->school[1]; ?></td>
</tr>
<tr>
<th style="border-left: 0"><?php echo Lang::$game['mechanic']; ?></th>
<td width="100%" style="border-top: 0"><?php echo !empty($this->mechanic) ? $this->mechanic : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td>
</tr>
<tr>
<th style="border-left: 0"><?php echo Lang::$game['dispelType']; ?></th>
<td width="100%" style="border-top: 0"><?php echo !empty($this->dispel) ? $this->dispel : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td>
</tr>
<tr>
<th style="border-bottom: 0; border-left: 0"><?php echo Lang::$spell['_gcdCategory']; ?></th>
<td style="border-bottom: 0"><?php echo !empty($this->gcdCat) ? $this->gcdCat : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="border-top: 0"><?php echo Lang::$spell['_cost']; ?></th>
<td style="border-top: 0"><?php echo !empty($this->powerCost) ? $this->powerCost : Lang::$spell['_none']; ?></td>
</tr>
<tr>
<th><?php echo Lang::$spell['_range']; ?></th>
<td><?php echo $this->range.' '.Lang::$spell['_distUnit'].' <small>('.$this->rangeName; ?>)</small></td>
</tr>
<tr>
<th><?php echo Lang::$spell['_castTime']; ?></th>
<td><?php echo $this->castTime; ?></td>
</tr>
<tr>
<th><?php echo Lang::$spell['_cooldown']; ?></th>
<td><?php echo !empty($this->cooldown) ? $this->cooldown : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td>
</tr>
<tr>
<th><dfn title="<?php echo Lang::$spell['_globCD'].'">'.Lang::$spell['_gcd']; ?></dfn></th>
<td><?php echo $this->gcd; ?></td>
</tr>
<?php
if (array_values($this->scaling) != [-1, -1, 0, 0]): // not default values
?>
<tr>
<th><?php echo Lang::$spell['_scaling']; ?></th>
<td colspan="3">
<?php
foreach ($this->scaling as $k => $s):
if ($s > 0):
echo ' '.sprintf(Lang::$spell['scaling'][$k], $s * 100)."<br>\n";
endif;
endforeach;
?>
</td>
</tr>
<?php
endif;
if (!empty($this->stances)):
?>
<tr>
<th><?php echo Lang::$spell['_forms']; ?></th>
<td colspan="3"><?php echo $this->stances; ?></td>
</tr>
<?php
endif;
if (!empty($this->items)):
?>
<tr>
<th><?php echo Lang::$game['requires2']; ?></th>
<td colspan="3"><?php echo User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, implode(' | ', $this->items[0]), $this->items[1]) : $this->items[1]; ?></td>
</tr>
<?php
endif;
foreach ($this->effects as $i => $e):
?>
<tr>
<th><?php echo Lang::$spell['_effect'].' #'.($i + 1); ?></th>
<td colspan="3" style="line-height: 17px">
<?php
echo ' '.$e['name'].'<small>' .
(isset($e['value']) ? '<br>'.Lang::$spell['_value'] .Lang::$main['colon'].$e['value'] : null) .
(isset($e['radius']) ? '<br>'.Lang::$spell['_radius'] .Lang::$main['colon'].$e['radius'].' '.Lang::$spell['_distUnit'] : null) .
(isset($e['interval']) ? '<br>'.Lang::$spell['_interval'].Lang::$main['colon'].$e['interval'] : null) .
(isset($e['mechanic']) ? '<br>'.Lang::$game['mechanic'] .Lang::$main['colon'].$e['mechanic'] : null);
if (isset($e['procData'])):
echo '<br>';
if ($e['procData'][0] < 0):
echo sprintf(Lang::$spell['ppm'], $e['procData'][0] * -1);
else:
echo Lang::$spell['procChance'].Lang::$main['colon'].$e['procData'][0].'%';
endif;
if ($e['procData'][1]):
echo sprintf(Lang::$spell['cooldown'], $e['procData'][1]);
endif;
endif;
echo "</small>\n";
if (isset($e['icon'])):
?>
<table class="icontab">
<tr>
<th id="icontab-icon<?php echo $i; ?>"></th>
<?php
if (isset($e['icon']['quality'])):
echo ' <td><span class="q'.$e['icon']['quality'].'"><a href="?item='.$e['icon']['id'].'">'.$e['icon']['name']."</a></span></td>\n";
else:
echo ' <td>'.(strpos($e['icon']['name'], '#') ? $e['icon']['name'] : sprintf('<a href="?spell=%d">%s</a>', $e['icon']['id'], $e['icon']['name']))."</td>\n";
endif;
?>
<th></th><td></td>
</tr>
</table>
<script type="text/javascript">
<?php echo '$WH.ge(\'icontab-icon'.$i.'\').appendChild('.(isset($e['icon']['quality']) ? 'g_items' : 'g_spells').'.createIcon('.$e['icon']['id'].', 1, '.$e['icon']['count']."));\n"; ?>
</script>
<?php
endif;
?>
</td>
</tr>
<?php
endforeach;
?>
</table>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
</div>
<?php
$this->brick('tabsRelated');
$this->brick('contribute');
?>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>

View File

@@ -1,141 +0,0 @@
{include file='header.tpl'}
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
{if !empty($announcements)}
{foreach from=$announcements item=item}
{include file='bricks/announcement.tpl' an=$item}
{/foreach}
{/if}
<script type="text/javascript">
g_initPath({$path}, {if empty($filter.query)} 0 {else} 1 {/if});
{if !empty($filter.query)}
Menu.modifyUrl(Menu.findItem(mn_database, [1]), {ldelim} filter: '+={$filter.query|escape:'quotes'}' {rdelim}, {ldelim} onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [1])) {rdelim});
{/if}
</script>
<div id="fi" style="display: {if empty($filter.query)}none{else}block{/if};">
<form action="?spells{$subCat}&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel">
<div style="float: left">{$lang.school}{$lang.colon}</div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false">{$lang.clear}</a></small>
<div class="clear"></div>
<select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em">
{foreach from=$lang.sc key=i item=str}{if $str}
<option value="{$i}" {if isset($filter.sc) && in_array($i, (array)$filter.sc)}selected{/if}>{$str}</option>
{/if}{/foreach}
</select>
</div>
{if $filter.classPanel}
<div class="rightpanel2">
<div style="float: left">{$lang.class|ucfirst}{$lang.colon}</div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false">{$lang.clear}</a></small>
<div class="clear"></div>
<select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818">
{foreach from=$lang.cl key=i item=str}{if $str}
<option value="{$i}"{if isset($filter.cl) && in_array($i, (array)$filter.cl)} selected{/if} class="c{$i}">{$str}</option>
{/if}{/foreach}
</select>
</div>
{/if}
{if $filter.glyphPanel}
<div class="rightpanel2">
<div style="float: left">{$lang.glyphType|ucfirst}{$lang.colon}</div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['gl[]'].selectedIndex = -1; return false" onmousedown="return false">{$lang.clear}</a></small>
<div class="clear"></div>
<select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em">
{foreach from=$lang.gl key=i item=str}{if $str}
<option value="{$i}"{if isset($filter.gl) && in_array($i, (array)$filter.gl)} selected{/if}>{$str}</option>
{/if}{/foreach}
</select>
</div>
{/if}
<table>
<tr>
<td>{$lang.name|ucFirst}{$lang.colon}</td>
<td colspan="2">
<table><tr>
<td>&nbsp;<input type="text" name="na" size="30" {if isset($filter.na)}value="{$filter.na|escape:'html'}" {/if}/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="spell-ex" {if isset($filter.ex)}checked="checked" {/if}/></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.extSearch}</span></label></td>
</tr></table>
</td>
</tr><tr>
<td class="padded">{$lang.level}{$lang.colon}</td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" {if isset($filter.minle)}value="{$filter.minle}" {/if}/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" {if isset($filter.maxle)}value="{$filter.maxle}" {/if}/></td>
<td class="padded">
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td>&nbsp;&nbsp;&nbsp;{$lang.reqSkillLevel}{$lang.colon}</td>
<td>&nbsp;<input type="text" name="minrs" maxlength="3" class="smalltextbox2" {if isset($filter.minrs)}value="{$filter.minrs}" {/if}/> - <input type="text" name="maxrs" maxlength="3" class="smalltextbox2" {if isset($filter.maxrs)}value="{$filter.maxrs}" {/if}/></td>
</tr></table>
</td>
</tr><tr>
<td class="padded">{$lang.race|ucfirst}{$lang.colon}</td>
<td class="padded">&nbsp;<select name="ra">
<option></option>
{foreach from=$lang.ra key=i item=str}{if $str}{if $i > 0}
<option value="{$i}"{if isset($filter.ra) && $filter.ra == $i} selected{/if}>{$str}</option>
{/if}{/if}{/foreach}
</select></td>
<td class="padded"></td>
</tr><tr>
<td class="padded">{$lang.mechAbbr}{$lang.colon}</td>
<td class="padded">&nbsp;<select name="me">
<option></option>
{foreach from=$lang.me key=i item=str}{if $str}
<option value="{$i}"{if isset($filter.me) && $filter.me == $i} selected{/if}>{$str}</option>
{/if}{/foreach}
</select></td>
<td>
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td>&nbsp;&nbsp;&nbsp;{$lang.dispelType}{$lang.colon}</td>
<td>&nbsp;<select name="dt">
<option></option>
{foreach from=$lang.dt key=i item=str}{if $str}
<option value="{$i}"{if isset($filter.dt) && $filter.dt == $i} selected{/if}>{$str}</option>
{/if}{/foreach}
</select></td>
</tr></table>
</td>
</tr>
</table>
<div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false">{$lang.addFilter}</a></div>
<div class="padded2">
<div style="float: right">{$lang.refineSearch}</div>
{$lang.match}{$lang.colon}<input type="radio" name="ma" value="" id="ma-0" {if !isset($filter.ma)}checked="checked" {/if}/><label for="ma-0">{$lang.allFilter}</label><input type="radio" name="ma" value="1" id="ma-1" {if isset($filter.ma)}checked="checked" {/if}/><label for="ma-1">{$lang.oneFilter}</label>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="{$lang.applyFilter}" />
<input type="reset" value="{$lang.resetForm}" />
</div>
</form>
<div class="pad"></div>
</div>
<script type="text/javascript">//<![CDATA[
fi_init('spells');
{foreach from=$filter.fi item=str}
{$str}
{/foreach}
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
{include file='listviews/spell.tpl' data=$lvData.data params=$lvData.params}
//]]></script>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->
{include file='footer.tpl'}

View File

@@ -0,0 +1,173 @@
<?php
$this->brick('header');
$f = $this->filter; // shorthand
?>
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
<?php $this->brick('announcement'); ?>
<script type="text/javascript">
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
<?php
if (!empty($f['query'])):
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [1]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [1])) });
endif;
?>
</script>
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?spells<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel">
<div style="float: left"><?php echo Lang::$game['school'].Lang::$main['colon']; ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small>
<div class="clear"></div>
<select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em">
<?php
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>
</div>
<?php if ($f['classPanel']): ?>
<div class="rightpanel2">
<div style="float: left"><?php echo Util::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"><?php echo Lang::$main['clear']; ?></a></small>
<div class="clear"></div>
<select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818">
<?php
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>
</div>
<?php
endif;
if ($f['glyphPanel']):
?>
<div class="rightpanel2">
<div style="float: left"><?php echo Util::ucFirst(Lang::$game['glyphType']).Lang::$main['colon']; ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['gl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small>
<div class="clear"></div>
<select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em">
<?php
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>
</div>
<?php endif; ?>
<table>
<tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td>
<td colspan="2">
<table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="spell-ex" <?php echo isset($f['ex']) ? 'checked="checked" ' : null; ?>/></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()"><?php echo Lang::$main['extSearch']; ?></span></label></td>
</tr></table>
</td>
</tr><tr>
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
<td class="padded">
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$game['reqSkillLevel'].Lang::$main['colon']; ?></td>
<td>&nbsp;<input type="text" name="minrs" maxlength="3" class="smalltextbox2" <?php echo isset($f['minrs']) ? 'value="'.$f['minrs'].'" ' : null; ?>/> - <input type="text" name="maxrs" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxrs']) ? 'value="'.$f['maxrs'].'" ' : null; ?>/></td>
</tr></table>
</td>
</tr><tr>
<td class="padded"><?php echo Util::ucFirst(Lang::$game['race']).Lang::$main['colon']; ?></td>
<td class="padded">&nbsp;<select name="ra">
<option></option>
<?php
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>
<td class="padded"></td>
</tr><tr>
<td class="padded"><?php echo Lang::$game['mechAbbr'].Lang::$main['colon']; ?></td>
<td class="padded">&nbsp;<select name="me">
<option></option>
<?php
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>
<td>
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::$game['dispelType'].Lang::$main['colon']; ?></td>
<td class="padded">&nbsp;<select name="dt">
<option></option>
<?php
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>
</tr></table>
</td>
</tr>
</table>
<div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div>
<div class="padded2">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
</div>
</form>
<div class="pad"></div>
</div>
<script type="text/javascript">//<![CDATA[
fi_init('spells');
<?php
foreach ($f['fi'] as $str):
echo ' '.$str."\n";
endforeach;
?>
//]]></script>
<div id="lv-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
<?php
$this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]);
?>
//]]></script>
<div class="clear"></div>
</div><!-- main-contents -->
</div><!-- main -->
<?php $this->brick('footer'); ?>