mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Spells/Tooltips
* implemented 'know'-parameter (modifies tooltips based on known spells) * displayed on spell detail page * usale as urlParam (&know=<spellId>) or rel-attribute (rel="know=<spellId>)
This commit is contained in:
@@ -1489,7 +1489,7 @@ $WH.g_setTooltipLevel = function(tooltip, level) {
|
||||
$WH.g_setTooltipSpells = function(tooltip, spells, spellData, position) {
|
||||
var
|
||||
known = {},
|
||||
regex = '<!--sp([0-9]+):[01]-->.+?<!--sp\\1-->',
|
||||
regex = '<!--sp([0-9]+):[01]-->.*?<!--sp\\1-->',
|
||||
effects;
|
||||
|
||||
if (spells == null) {
|
||||
@@ -1521,7 +1521,7 @@ $WH.g_setTooltipSpells = function(tooltip, spells, spellData, position) {
|
||||
}
|
||||
|
||||
var effect = spellData[spellId][position[spellId]][known[spellId]];
|
||||
effect = $WH.g_setTooltipSpells(effect, spells, spellData, position);
|
||||
effect = $WH.g_setTooltipSpells(effect.toString(), spells, spellData, position);
|
||||
|
||||
tooltip = tooltip.replace(effects[i], '<!--sp' + spellId + ':' + known[spellId] + '-->' + effect + '<!--sp' + spellId + '-->');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user