mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- source:discovery in infobox for spells
- implemented search for crafted items (requires sql)
This commit is contained in:
@@ -22,11 +22,9 @@ class ItemList extends BaseType
|
||||
|
||||
protected $queryBase = 'SELECT i.*, i.id AS ARRAY_KEY FROM ?_items i';
|
||||
protected $queryOpts = array(
|
||||
'is' => [ 's' => ', 1 as score', 'j' => '?_item_stats AS `is` ON `is`.`id` = `i`.`id`', 'h' => 'score > 0', 'o' => 'score DESC'],
|
||||
// 'iet' => [['ire'], 'j' => 'item_enchantment_template AS `iet` ON IF (`ire`.`id` > 0, `iet`.`entry` = `i`.`randomProperty`, `iet`.`entry` = `i`.`randomSuffix`)'],
|
||||
// 'ire' => [['iet'], 'j' => '?_itemrandomenchant AS `ire` ON ABS(ire.id) = iet.ench'],
|
||||
// 'idi' => ['s' => itemDisplayInfo]
|
||||
'i' => [ 'o' => 'i.quality DESC, i.itemLevel DESC']
|
||||
'is' => ['s' => ', 1 as score', 'j' => '?_item_stats AS `is` ON `is`.`id` = `i`.`id`', 'h' => 'score > 0', 'o' => 'score DESC'],
|
||||
's' => ['j' => ['?_spell AS `s` ON s.effect1CreateItemId = i.id', true], 'g' => 'i.id'],
|
||||
'i' => ['o' => 'i.quality DESC, i.itemLevel DESC']
|
||||
);
|
||||
|
||||
public function __construct($conditions = [], $applyFilter = false, $miscData = null)
|
||||
@@ -871,7 +869,7 @@ class ItemList extends BaseType
|
||||
{
|
||||
for ($j = $i; $j < count($setSpells); $j++)
|
||||
{
|
||||
if($setSpells[$j]['bonus'] >= $setSpells[$i]['bonus'])
|
||||
if ($setSpells[$j]['bonus'] >= $setSpells[$i]['bonus'])
|
||||
continue;
|
||||
|
||||
$tmp = $setSpells[$i];
|
||||
@@ -1425,7 +1423,7 @@ class ItemListFilter extends Filter
|
||||
// usable-by - limit weapon/armor selection per CharClass - itemClass => available itemsubclasses
|
||||
private $ubFilter = [];
|
||||
protected $enums = array(
|
||||
99 => array( // profession
|
||||
99 => array( // profession | recycled for 86, 87
|
||||
null, 171, 164, 185, 333, 202, 129, 755, 165, 186, 197, true, false, 356, 182, 773
|
||||
),
|
||||
66 => array( // profession specialization
|
||||
@@ -1445,23 +1443,6 @@ class ItemListFilter extends Filter
|
||||
14 => -1,
|
||||
15 => -1
|
||||
),
|
||||
87 => array( // reagent for profession
|
||||
1 => 171,
|
||||
2 => 164,
|
||||
3 => 185,
|
||||
4 => 333,
|
||||
5 => 202,
|
||||
6 => 129,
|
||||
7 => 755,
|
||||
8 => 165,
|
||||
9 => 186,
|
||||
10 => 197,
|
||||
11 => true,
|
||||
12 => false,
|
||||
13 => 356,
|
||||
14 => 182,
|
||||
15 => 773,
|
||||
),
|
||||
152 => array( // class-specific
|
||||
null, 1, 2, 3, 4, 5, 6, 7, 8, 9, null, 11, true, false
|
||||
),
|
||||
@@ -1719,8 +1700,14 @@ class ItemListFilter extends Filter
|
||||
|
||||
$this->formData['extraCols'][] = $cr[0];
|
||||
return ['AND', ['armordamagemodifier', $cr[2], $cr[1]], ['class', ITEM_CLASS_ARMOR]];
|
||||
case 86: // craftedprof [profession]
|
||||
/* todo */ return [1];
|
||||
case 86: // craftedprof [enum]
|
||||
$_ = @$this->enums[99][$cr[1]]; // recycled enum
|
||||
if (is_bool($_))
|
||||
return ['i.source', '1:', $_ ? null : '!'];
|
||||
else if (is_int($_))
|
||||
return ['s.skillLine1', $_];
|
||||
|
||||
break;
|
||||
case 16: // dropsin [zone]
|
||||
/* todo */ return [1];
|
||||
case 105: // dropsinnormal [heroicdungeon-any]
|
||||
@@ -1801,7 +1788,7 @@ class ItemListFilter extends Filter
|
||||
case 85: // objectivequest [side]
|
||||
/* todo */ return [1];
|
||||
case 87: // reagentforability [enum]
|
||||
$_ = @$this->enums[$cr[0]][$cr[1]];
|
||||
$_ = @$this->enums[99][$cr[1]]; // recycled enum
|
||||
if ($_ !== null)
|
||||
{
|
||||
$ids = [];
|
||||
|
||||
@@ -375,6 +375,7 @@ $lang = array(
|
||||
'_collapseAll' => "Alle einklappen",
|
||||
'_expandAll' => "Alle ausklappen",
|
||||
|
||||
'discovered' => "Durch Geistesblitz erlernt",
|
||||
'ppm' => "%s Auslösungen pro Minute",
|
||||
'procChance' => "Procchance",
|
||||
'starter' => "Basiszauber",
|
||||
@@ -409,7 +410,7 @@ $lang = array(
|
||||
'base' => "<small>%s im Zusammenhang mit <b>%s</b> anzeigen</small>",
|
||||
'link' => " oder ",
|
||||
'recipes' => "<a href=\"?items=9.%s\">Rezeptgegenstände</a>",
|
||||
'crafted' => "<a href=\"?items&filter=cr=86;crs=%s\">Hergestellte Gegenstände</a>"
|
||||
'crafted' => "<a href=\"?items&filter=cr=86;crs=%s;crv=0\">Hergestellte Gegenstände</a>"
|
||||
),
|
||||
'cat' => array(
|
||||
7 => "Klassenfertigkeiten",
|
||||
|
||||
@@ -362,6 +362,7 @@ $lang = array(
|
||||
'_collapseAll' => "Collapse All",
|
||||
'_expandAll' => "Expand All",
|
||||
|
||||
'discovered' => "Learned via discovery",
|
||||
'ppm' => "%s procs per minute",
|
||||
'procChance' => "Proc chance",
|
||||
'starter' => "Starter spell",
|
||||
|
||||
@@ -333,6 +333,7 @@ $lang = array(
|
||||
'_collapseAll' => "Contraer todo",
|
||||
'_expandAll' => "Expandier todo",
|
||||
|
||||
'discovered' => "Aprendido via descubrimiento",
|
||||
'ppm' => "%s procs por minuto",
|
||||
'procChance' => "Probabilidad de que accione",
|
||||
'starter' => "Hechizo inicial",
|
||||
@@ -367,7 +368,7 @@ $lang = array(
|
||||
'base' => "<small>Muestra %s relacionados con <b>%s</b></small>",
|
||||
'link' => " u ",
|
||||
'recipes' => "<a href=\"?items=9.%s\">objetos de receta</a>",
|
||||
'crafted' => "<a href=\"?items&filter=cr=86;crs=%s\">objetos fabricados</a>"
|
||||
'crafted' => "<a href=\"?items&filter=cr=86;crs=%s;crv=0\">objetos fabricados</a>"
|
||||
),
|
||||
'cat' => array(
|
||||
7 => "Habilidades",
|
||||
|
||||
@@ -333,6 +333,7 @@ $lang = array(
|
||||
'_collapseAll' => "Replier Tout",
|
||||
'_expandAll' => "Déplier Tout",
|
||||
|
||||
'discovered' => "Appris via une découverte",
|
||||
'ppm' => "%s déclenchements par minute",
|
||||
'procChance' => "Chance",
|
||||
'starter' => "Sortilège initiaux",
|
||||
@@ -367,7 +368,7 @@ $lang = array(
|
||||
'base' => "<small>Montre %s reliés à <b>%s</b></small>",
|
||||
'link' => " ou ",
|
||||
'recipes' => "les <a href=\"?items=9.%s\">recettes</a>",
|
||||
'crafted' => "les <a href=\"?items&filter=cr=86;crs=%s\">objets fabriqués</a>"
|
||||
'crafted' => "les <a href=\"?items&filter=cr=86;crs=%s;crv=0\">objets fabriqués</a>"
|
||||
),
|
||||
'cat' => array(
|
||||
7 => "Techniques",
|
||||
|
||||
@@ -333,6 +333,7 @@ $lang = array(
|
||||
'_collapseAll' => "[Collapse All]",
|
||||
'_expandAll' => "[Expand All]",
|
||||
|
||||
'discovered' => "Изучается путём освоения местности",
|
||||
'ppm' => "Срабатывает %s раз в минуту",
|
||||
'procChance' => "Шанс срабатывания",
|
||||
'starter' => "Начальное заклинание",
|
||||
@@ -367,7 +368,7 @@ $lang = array(
|
||||
'base' => "<small>Показать %s, относящиеся к профессии <b>%s</b></small>",
|
||||
'link' => " или ",
|
||||
'recipes' => "<a href=\"?items=9.%s\">рецепты</a>",
|
||||
'crafted' => "<a href=\"?items&filter=cr=86;crs=%s\">производимые предметы</a>"
|
||||
'crafted' => "<a href=\"?items&filter=cr=86;crs=%s;crv=0\">производимые предметы</a>"
|
||||
),
|
||||
'cat' => array(
|
||||
7 => "Способности",
|
||||
|
||||
@@ -223,9 +223,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// flag starter spell
|
||||
if (isset($spell->sources[$spell->id]) && array_key_exists(10, $spell->sources[$spell->id]))
|
||||
// accquisition..
|
||||
if ($_ = @$spell->sources[$spell->id])
|
||||
{
|
||||
if (array_key_exists(10, $_)) // ..starter spell
|
||||
$infobox[] = '[li]'.Lang::$spell['starter'].'[/li]';
|
||||
else if (array_key_exists(7, $_)) // ..discovery
|
||||
$infobox[] = '[li]'.Lang::$spell['discovered'].'[/li]';
|
||||
}
|
||||
|
||||
// training cost
|
||||
if ($cost = DB::Aowow()->selectCell('SELECT spellcost FROM npc_trainer WHERE spell = ?d', $spell->id))
|
||||
|
||||
Reference in New Issue
Block a user