diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 6964cffe..de51509e 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -1476,6 +1476,10 @@ $lang = array( '_collapseAll' => "Alle einklappen", '_expandAll' => "Alle ausklappen", '_transfer' => 'Dieser Zauber wird mit %s vertauscht, wenn Ihr zur %s wechselt.', + '_affected' => "Betroffene Zauber", + '_seeMore' => "Mehr anzeigen", + '_rankRange' => "Rang: %d - %d", + '_showXmore' => "Zeige %d weitere", 'currentArea' => '<Momentanes Gebiet>', 'discovered' => "Durch Geistesblitz erlernt", 'ppm' => "(%s Auslösungen pro Minute)", diff --git a/localization/locale_enus.php b/localization/locale_enus.php index 6b818e22..c4dd35fb 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -1476,6 +1476,10 @@ $lang = array( '_collapseAll' => "Collapse All", '_expandAll' => "Expand All", '_transfer' => 'This spell will be converted to %s if you transfer to %s.', + '_affected' => "Affected Spells", + '_seeMore' => "See more", + '_rankRange' => "Rank: %d - %d", + '_showXmore' => "Show %d More", 'currentArea' => '<current area>', 'discovered' => "Learned via discovery", 'ppm' => "(%s procs per minute)", diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 3c8bab7e..df178921 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -1476,6 +1476,10 @@ $lang = array( '_collapseAll' => "Contraer todo", '_expandAll' => "Expandier todo", '_transfer' => 'Este hechizo será convertido a %s si lo transfieres a la %s.', + '_affected' => "Hechizos affectados", + '_seeMore' => "[See more]", + '_rankRange' => "Rango: %d - %d", + '_showXmore' => "Mostrar %d más", 'currentArea' => '<current area>', 'discovered' => "Aprendido via descubrimiento", 'ppm' => "(%s procs por minuto)", diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index 8a0f460b..a0739369 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -1476,6 +1476,10 @@ $lang = array( '_collapseAll' => "Replier Tout", '_expandAll' => "Déplier Tout", '_transfer' => 'Cet sort sera converti en %s si vous transférez en %s.', + '_affected' => "Sorts affectés", + '_seeMore' => "[See more]", + '_rankRange' => "Rang : %d - %d", + '_showXmore' => "En afficher %d de plus", 'currentArea' => '<current area>', 'discovered' => "Appris via une découverte", 'ppm' => "(%s déclenchements par minute)", diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index 31468534..dd229443 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -1476,6 +1476,10 @@ $lang = array( '_collapseAll' => "Свернуть все", '_expandAll' => "Развернуть все", '_transfer' => 'Этот предмет превратится в %s, если вы перейдете за %s.', + '_affected' => "Влияет на заклинания", + '_seeMore' => "[See more]", + '_rankRange' => "Ранг: %d - %d", + '_showXmore' => "Показать на %d больше", 'currentArea' => '<current area>', 'discovered' => "Изучается путём освоения местности", 'ppm' => "(Срабатывает %s раз в минуту)", diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php index 5bee11c4..ec1675a7 100644 --- a/localization/locale_zhcn.php +++ b/localization/locale_zhcn.php @@ -1475,6 +1475,10 @@ $lang = array( '_collapseAll' => "折叠全部", '_expandAll' => "展开全部", '_transfer' => '这个法术将被转换到%s,如果你转移到%s。', + '_affected' => "受影响法术", + '_seeMore' => "[See more]", + '_rankRange' => "排名: %d - %d", + '_showXmore' => "[Show %d More]", 'currentArea' => '<当前区域>', 'discovered' => "通过发现学习", 'ppm' => "%s每分钟触发几率", diff --git a/pages/spell.php b/pages/spell.php index 4d4979eb..e0b5e7a0 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -44,10 +44,11 @@ class SpellPage extends GenericPage private $firstRank = 0; private $powerTpl = '$WowheadPower.registerSpell(%d, %d, %s);'; - private static $modAuras = [SPELL_AURA_ADD_FLAT_MODIFIER, SPELL_AURA_ADD_PCT_MODIFIER, SPELL_AURA_NO_REAGENT_USE, - SPELL_AURA_ABILITY_PERIODIC_CRIT, SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL, SPELL_AURA_ABILITY_IGNORE_AURASTATE, - SPELL_AURA_ALLOW_ONLY_ABILITY, SPELL_AURA_IGNORE_MELEE_RESET, SPELL_AURA_ABILITY_CONSUME_NO_AMMO, - SPELL_AURA_MOD_IGNORE_SHAPESHIFT, SPELL_AURA_PERIODIC_HASTE /* SPELL_AURA_DUMMY ? */]; + private static $modAuras = [SPELL_AURA_ADD_FLAT_MODIFIER, SPELL_AURA_ADD_PCT_MODIFIER, SPELL_AURA_NO_REAGENT_USE, + SPELL_AURA_ABILITY_PERIODIC_CRIT, SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL, SPELL_AURA_ABILITY_IGNORE_AURASTATE, + SPELL_AURA_ALLOW_ONLY_ABILITY, SPELL_AURA_IGNORE_MELEE_RESET, SPELL_AURA_ABILITY_CONSUME_NO_AMMO, + SPELL_AURA_MOD_IGNORE_SHAPESHIFT, SPELL_AURA_PERIODIC_HASTE, SPELL_AURA_OVERRIDE_CLASS_SCRIPTS, + SPELL_AURA_MOD_DAMAGE_FROM_CASTER, SPELL_AURA_ADD_TARGET_TRIGGER, /* SPELL_AURA_DUMMY ? */]; public function __construct($pageCall, $id) { @@ -296,7 +297,7 @@ class SpellPage extends GenericPage $this->scaling = $this->createScalingData(); $this->items = $this->createRequiredItems(); $this->tools = $this->createTools(); - $this->effects = $effects; + $this->effects = &$effects; $this->attributes = $this->createAttributesList(); $this->powerCost = $this->subject->createPowerCostForCurrent(); $this->castTime = $this->subject->createCastTimeForCurrent(false, false); @@ -383,12 +384,14 @@ class SpellPage extends GenericPage } // tab: [$this] modifies - $sub = ['OR']; + $sub = []; $conditions = [ ['s.typeCat', [-9], '!'], // GM (-9); also include uncategorized (0), NPC-Spell (-8)?; NPC includes totems, lightwell and others :/ ['s.spellFamilyId', $this->subject->getField('spellFamilyId')], &$sub ]; + $modifiesData = []; + $hideSkillCol = true; for ($i = 1; $i < 4; $i++) { @@ -402,30 +405,58 @@ class SpellPage extends GenericPage if (!$m1 && !$m2 && !$m3) continue; - $sub[] = ['s.spellFamilyFlags1', $m1, '&']; - $sub[] = ['s.spellFamilyFlags2', $m2, '&']; - $sub[] = ['s.spellFamilyFlags3', $m3, '&']; - } + $classSpells = $miscSpells = []; + $this->effects[$i]['modifies'] = [&$classSpells, &$miscSpells]; + + $sub = ['OR', ['s.spellFamilyFlags1', $m1, '&'], ['s.spellFamilyFlags2', $m2, '&'], ['s.spellFamilyFlags3', $m3, '&']]; - if (count($sub) > 1) - { $modSpells = new SpellList($conditions); if (!$modSpells->error) { - $tabData = array( - 'data' => array_values($modSpells->getListviewData()), - 'id' => 'modifies', - 'name' => '$LANG.tab_modifies', - 'visibleCols' => ['level'], - ); + foreach ($modSpells->iterate() as $id => $__) + { + if (in_array($modSpells->getField('typeCat'), [-2, 7])) + $classSpells[$id] = [$id, $modSpells->getField('name', true), 0, 0]; + else + $miscSpells[$id] = [$id, $modSpells->getField('name', true), 0, 0]; + } - if (!$modSpells->hasSetFields(['skillLines'])) - $tabData['hiddenCols'] = ['skill']; + if ($classSpells) + foreach (DB::World()->select('SELECT spell_id AS ARRAY_KEY, first_spell_id AS "0", `rank` AS "1" FROM spell_ranks WHERE spell_id IN (?a)', array_keys($classSpells)) as $spellId => [$firstSpellId, $rank]) + { + $classSpells[$firstSpellId][2] = min($classSpells[$firstSpellId][2] ?: $rank, $rank); + $classSpells[$firstSpellId][3] = max($classSpells[$firstSpellId][3], $rank); - $this->lvTabs[] = [SpellList::$brickFile, $tabData]; + if ($spellId != $firstSpellId) + unset($classSpells[$spellId]); + } + + $modifiesData += $modSpells->getListviewData(); + if ($modSpells->hasSetFields(['skillLines'])) + $hideSkillCol = false; $this->extendGlobalData($modSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED)); } + + $classSpells = array_values($classSpells); + $miscSpells = array_values($miscSpells); + + unset($classSpells, $miscSpells); + } + + if ($modifiesData) + { + $tabData = array( + 'data' => array_values($modifiesData), + 'id' => 'modifies', + 'name' => '$LANG.tab_modifies', + 'visibleCols' => ['level'], + ); + + if ($hideSkillCol) + $tabData['hiddenCols'] = ['skill']; + + $this->lvTabs[] = [SpellList::$brickFile, $tabData]; } // tab: [$this is] modified by diff --git a/static/css/aowow.css b/static/css/aowow.css index 6d8e4243..1cce0ba0 100644 --- a/static/css/aowow.css +++ b/static/css/aowow.css @@ -1494,6 +1494,14 @@ span.icon-instance8 { margin-top: 4px; } +.icontab.show-all tr { + display: table-row !important; +} + +.icontab.show-all tr.icontab-revealer { + display: none !important; +} + .icontab tr { background: none !important; } @@ -1532,6 +1540,19 @@ span.icon-instance8 { border-radius: 3px; } +.icontab-revealer a { + color: inherit; + display: block; + font-size: 14px; + height: 44px; + line-height: 44px; + text-align: center +} + +.icontab-revealer a:hover { + color: #fff; +} + .lightbox-outer { position: fixed; left: 50%; diff --git a/template/pages/spell.tpl.php b/template/pages/spell.tpl.php index e63e1443..29d395d4 100644 --- a/template/pages/spell.tpl.php +++ b/template/pages/spell.tpl.php @@ -251,6 +251,63 @@ $WH.aE(window,\'load\',function(){$WH.ge(\'spelleffectmarkup-'.$i.'\').innerHTML +
+'.Lang::spell('_seeMore').'