Spells/Misc

* display dbc definitions before articles on detail pages
 * fixed logic when displaying skill step numbers
 * made custom spell columns for linked spells and stack rules localizable
This commit is contained in:
Sarjuuk
2020-04-17 00:39:12 +02:00
parent 08c98bc8ee
commit 92a1016a0f
9 changed files with 173 additions and 52 deletions

View File

@@ -11812,7 +11812,7 @@ Listview.templates = {
}));
/* Aowow - we do not use FA
/* Aowow - we do not use FontAwesome
$WH.ae(ovlName, $WH.g_createButton(null, null, {
'class': 'fa fa-fw fa-clipboard',
'float': false,
@@ -12816,12 +12816,10 @@ Listview.templates = {
return Listview.funcBox.assocArrCmp(a.skill, b.skill, g_spell_skills);
}
},
/* aowow
todo: localize he next three cols
*/
/* AoWoW: custom start */
{
id: 'stackRules',
name: 'Behaviour',
name: LANG.asr_behaviour,
type: 'text',
width: '20%',
hidden: true,
@@ -12836,15 +12834,15 @@ Listview.templates = {
switch (spell.stackRule) {
case 3:
buff2 = '(strongest effect is applied)';
buff2 = LANG.asr_strongest_effect;
case 0:
buff = 'coexist'; // without condition
buff = LANG.asr_coexist; // without condition
break;
case 2:
case 4:
buff2 = spell.stackRule == 2 ? '(from same caster)' : '(strongest effect is applied)';
buff2 = spell.stackRule == 2 ? LANG.asr_same_owner : LANG.asr_strongest_effect;
case 1:
buff = 'exclusive'; // without condition
buff = LANG.asr_exclusive; // without condition
break;
}
@@ -12873,14 +12871,14 @@ Listview.templates = {
var buff = '';
switch (spell.stackRule) {
case 3:
buff += '(strongest effect is applied)';
buff += LANG.asr_strongest_effect;
case 0:
buff += ' coexist';
buff += ' ' + LANG.asr_coexist;
break;
case 2:
buff += '(from same caster)';
buff += LANG.asr_same_owner;
case 1:
buff += ' exclusive';
buff += ' ' + LANG.asr_exclusive;
break;
}
@@ -12892,7 +12890,7 @@ Listview.templates = {
},
{
id: 'linkedTrigger',
name: 'Triggers',
name: LANG.ls_trigger,
type: 'text',
width: '50%',
hidden: true,
@@ -12907,13 +12905,13 @@ Listview.templates = {
switch (spell.linked[2]) {
case 0:
buff = trigger > 0 ? 'When Spell is casted' : 'When Aura is removed';
buff = trigger > 0 ? LANG.ls_onCast : LANG.ls_onAuraRemove;
break;
case 1:
buff = 'When Spell hits the target(s)';
buff = LANG.ls_onSpellHit;
break;
case 2:
buff = 'When Aura is applied and removed';
buff = LANG.ls_onAuraApply;
break;
}
@@ -12925,7 +12923,7 @@ Listview.templates = {
a.href = '?spell=' + Math.abs(trigger);
if (g_pageInfo.typeId == Math.abs(trigger)) { // ponts to self
a.className = 'q1';
$WH.st(a, 'This');
$WH.st(a, LANG.ls_self);
}
else {
var item = g_spells[Math.abs(trigger)];
@@ -12952,7 +12950,7 @@ Listview.templates = {
buff = '';
if (g_pageInfo.typeId == Math.abs(trigger)) {
buff += 'This';
buff += LANG.ls_self;
}
else {
buff += g_spells[Math.abs(trigger)]['name_' + Locale.getName()];
@@ -12960,13 +12958,13 @@ Listview.templates = {
switch (spell.linked[2]) {
case 0:
buff += trigger > 0 ? ' When Spell is casted' : ' When Aura is removed';
buff += trigger > 0 ? ' ' + LANG.ls_onCast : ' ' + LANG.ls_onAuraRemove;
break;
case 1:
buff += ' When Spell hits the target(s)';
buff += ' ' + LANG.ls_onSpellHit;
break;
case 2:
buff += ' When Aura is applied and removed';
buff += ' ' + LANG.ls_onAuraApply;
break;
}
@@ -12999,7 +12997,7 @@ Listview.templates = {
},
{
id: 'linkedEffect',
name: 'Effects',
name: LANG.ls_effects,
type: 'text',
width: '50%',
hidden: true,
@@ -13015,10 +13013,10 @@ Listview.templates = {
switch (spell.linked[2]) {
case 0:
case 1:
buff = effect > 0 ? 'Spell is triggered' : 'Spells Auras are removed';
buff = effect > 0 ? LANG.ls_onTrigger : LANG.ls_onAuraRemove;
break;
case 2:
buff = effect > 0 ? 'Spells Auras are applied or removed' : 'Immunity against Spell is applied or cleared ';
buff = effect > 0 ? LANG.ls_onAuraApply : LANG.ls_onImmune;
break;
}
@@ -13030,7 +13028,7 @@ Listview.templates = {
a.href = '?spell=' + Math.abs(effect);
if (g_pageInfo.typeId == Math.abs(effect)) { // ponts to self
a.className = 'q1';
$WH.st(a, 'This');
$WH.st(a, LANG.ls_self);
}
else {
var item = g_spells[Math.abs(effect)];
@@ -13057,7 +13055,7 @@ Listview.templates = {
buff = '';
if (g_pageInfo.typeId == Math.abs(effect)) {
buff += 'This';
buff += LANG.ls_self;
}
else {
buff += g_spells[Math.abs(effect)]['name_' + Locale.getName()];
@@ -13066,10 +13064,10 @@ Listview.templates = {
switch (spell.linked[2]) {
case 0:
case 1:
buff += effect > 0 ? ' Spell is triggered' : ' Spells Auras are removed';
buff += effect > 0 ? ' ' + LANG.ls_onTrigger : ' ' + LANG.ls_onAuraRemove;
break;
case 2:
buff += effect > 0 ? ' Spells Auras are applied or removed' : ' Immunity against Spell is applied or cleared ';
buff += effect > 0 ? ' ' + LANG.ls_onAuraApply : ' ' + LANG.ls_onImmune;
break;
}
@@ -13100,6 +13098,7 @@ Listview.templates = {
return 0;
}
}
/* AoWoW: custom end */
],
getItemLink: function(spell) {