mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Spells/Effects
* also list affected spells directly in the spell effect * allow more spell auras to display affected spells
This commit is contained in:
@@ -1476,6 +1476,10 @@ $lang = array(
|
||||
'_collapseAll' => "Alle einklappen",
|
||||
'_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.',
|
||||
'_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)",
|
||||
|
||||
@@ -1476,6 +1476,10 @@ $lang = array(
|
||||
'_collapseAll' => "Collapse 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>.',
|
||||
'_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)",
|
||||
|
||||
@@ -1476,6 +1476,10 @@ $lang = array(
|
||||
'_collapseAll' => "Contraer 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>.',
|
||||
'_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)",
|
||||
|
||||
@@ -1476,6 +1476,10 @@ $lang = array(
|
||||
'_collapseAll' => "Replier 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>.',
|
||||
'_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)",
|
||||
|
||||
@@ -1476,6 +1476,10 @@ $lang = array(
|
||||
'_collapseAll' => "Свернуть все",
|
||||
'_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>.',
|
||||
'_affected' => "Влияет на заклинания",
|
||||
'_seeMore' => "[See more]",
|
||||
'_rankRange' => "Ранг: %d - %d",
|
||||
'_showXmore' => "Показать на %d больше",
|
||||
'currentArea' => '<current area>',
|
||||
'discovered' => "Изучается путём освоения местности",
|
||||
'ppm' => "(Срабатывает %s раз в минуту)",
|
||||
|
||||
@@ -1475,6 +1475,10 @@ $lang = array(
|
||||
'_collapseAll' => "折叠全部",
|
||||
'_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>。',
|
||||
'_affected' => "受影响法术",
|
||||
'_seeMore' => "[See more]",
|
||||
'_rankRange' => "排名: %d - %d",
|
||||
'_showXmore' => "[Show %d More]",
|
||||
'currentArea' => '<当前区域>',
|
||||
'discovered' => "通过发现学习",
|
||||
'ppm' => "%s每分钟触发几率",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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%;
|
||||
|
||||
@@ -251,6 +251,63 @@ $WH.aE(window,\'load\',function(){$WH.ge(\'spelleffectmarkup-'.$i.'\').innerHTML
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if (isset($e['modifies'])):
|
||||
?>
|
||||
<br><small><?=Lang::spell('_affected').Lang::main('colon');?></small>
|
||||
<?php
|
||||
for ($type = 0; $type < 2; $type++):
|
||||
if (!$e['modifies'][$type])
|
||||
continue;
|
||||
|
||||
$folded = false;
|
||||
$iconData = [];
|
||||
|
||||
if ($type && count($e['modifies'][0]))
|
||||
echo '<a href="javascript:" class="disclosure-off" onclick="return g_disclose($(\'#effectspells-85645'.($i - 1).'\')[0], this);">'.Lang::spell('_seeMore').'</a><div id="effectspells-85645'.($i - 1).'" style="display: none">';
|
||||
|
||||
echo '<table class="icontab">';
|
||||
|
||||
foreach ($e['modifies'][$type] as $idx => [$id, $name, $minRank, $maxRank]):
|
||||
if (!$idx || !($idx % 3))
|
||||
echo "<tr".($folded ? ' style="display:none;"' : '').">";
|
||||
|
||||
$iconData[] = [++$iconTabIdx, $id];
|
||||
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";
|
||||
|
||||
if ($idx == count($e['modifies'][$type]) - 1 || !(($idx + 1) % 3))
|
||||
echo "</tr>";
|
||||
|
||||
if ($idx == 17 && count($e['modifies'][$type]) > 21):
|
||||
$folded = true;
|
||||
?>
|
||||
<tr class="icontab-revealer">
|
||||
<td colspan="6">
|
||||
<a onclick="$(this).closest('table').addClass('show-all')">
|
||||
<?=Lang::spell('_showXmore', [count($e['modifies'][$type]) - 18]); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($iconData as [$icon, $spell])
|
||||
echo sprintf(" \$WH.ge('icontab-icon%d').appendChild(g_spells.createIcon(%d, 0, \"0\"));\n", $icon, $spell);
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
<?php
|
||||
if ($type && count($e['modifies'][0]))
|
||||
echo '</div>';
|
||||
|
||||
endfor;
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user