Misc/Fixups

* fixed file generators involving ?_icons table
 * known spells onspell detail page should have a localized tooltip
 * fixed numer formating in spell tooltips for locales with a ',' as decimal
 * fixed php-tag in contribute template, causing parse error
This commit is contained in:
Sarjuuk
2017-04-06 23:40:25 +02:00
parent b74b03151b
commit 0360f6f600
7 changed files with 10 additions and 10 deletions

View File

@@ -1471,12 +1471,12 @@ class SpellList extends BaseType
}
list($formOutVal, $formOutStr, $ratingId) = $this->resolveFormulaString($formOutStr, $formPrecision ?: ($topLevel ? 0 : 10), $scaling);
if ($ratingId && is_numeric($formOutVal) && $this->interactive)
if ($ratingId && Util::checkNumeric($formOutVal) && $this->interactive)
$resolved = sprintf($formOutStr, $ratingId, abs($formOutVal), sprintf(Util::$setRatingLevelString, $this->charLevel, $ratingId, abs($formOutVal), Util::setRatingLevel($this->charLevel, $ratingId, abs($formOutVal))));
else if ($ratingId && is_numeric($formOutVal))
else if ($ratingId && Util::checkNumeric($formOutVal))
$resolved = sprintf($formOutStr, $ratingId, abs($formOutVal), Util::setRatingLevel($this->charLevel, $ratingId, abs($formOutVal)));
else
$resolved = sprintf($formOutStr, is_numeric($formOutVal) ? abs($formOutVal) : $formOutVal);
$resolved = sprintf($formOutStr, Util::checkNumeric($formOutVal) ? abs($formOutVal) : $formOutVal);
$data = substr_replace($data, $resolved, $formStartPos, ($formCurPos - $formStartPos));
}

View File

@@ -65,7 +65,7 @@ if (!CLI)
effect1MiscValue,
equippedItemClass, equippedItemInventoryTypeMask, equippedItemSubClassMask,
skillLine1,
IFNULL(i.iconString, "inv_misc_questionmark") AS iconString,
IFNULL(i.name, "inv_misc_questionmark") AS iconString,
name_loc0, name_loc2, name_loc3, name_loc6, name_loc8
FROM
?_spell s

View File

@@ -33,11 +33,11 @@ if (!CLI)
i.name_loc0, i.name_loc2, i.name_loc3, i.name_loc6, i.name_loc8,
IF (i.id < 36000 OR i.itemLevel < 70, 1 , 2) AS expansion,
i.quality,
ic.iconString AS icon,
ic.name AS icon,
i.gemEnchantmentId AS enchId,
i.gemColorMask AS colors
FROM ?_items i
JOIN ?_icons ic ON ic.id = -i.displayId
JOIN ?_icons ic ON ic.id = i.iconId
WHERE i.gemEnchantmentId <> 0
ORDER BY i.id DESC');
$success = true;

View File

@@ -32,7 +32,7 @@ if (!CLI)
i.subclass AS classs,
i.requiredLevel AS level,
s1.Id AS glyphSpell,
ic.iconString AS icon,
ic.name AS icon,
s1.skillLine1 AS skillId,
s2.Id AS glyphEffect,
s2.Id AS ARRAY_KEY

View File

@@ -15,7 +15,7 @@ if (!CLI)
function talentIcons()
{
$success = true;
$query = 'SELECT ic.iconString FROM ?_icons ic JOIN dbc_spell s ON s.iconId = ic.Id JOIN dbc_talent t ON t.rank1 = s.Id JOIN dbc_talenttab tt ON tt.Id = t.tabId WHERE tt.?# = ?d AND tt.tabNumber = ?d ORDER BY t.row, t.column, t.petCategory1 ASC';
$query = 'SELECT ic.name AS iconString FROM ?_icons ic JOIN ?_spell s ON s.iconId = ic.Id JOIN dbc_talent t ON t.rank1 = s.id JOIN dbc_talenttab tt ON tt.Id = t.tabId WHERE tt.?# = ?d AND tt.tabNumber = ?d ORDER BY t.row, t.column, t.petCategory1 ASC';
$dims = 36; //v-pets
$filenames = ['icons', 'warrior', 'paladin', 'hunter', 'rogue', 'priest', 'deathknight', 'shaman', 'mage', 'warlock', null, 'druid'];

View File

@@ -1627,7 +1627,7 @@ $WH.g_enhanceTooltip = function(tooltip, isStatic, useGets, showSlider, buff, kn
$(chooseSpells)
.append('<input type="checkbox" id="known-' + i + '" />')
.append('<label for="known-' + i + '"><a rel="spell=' + i + '&know=' + i + '">' + g_spells[i]['name_' + Locale.getName()] + (g_spells[i]['rank_' + Locale.getName()] ? ' (' + g_spells[i]['rank_' + Locale.getName()] + ')' : '') + '</a></label>')
.append('<label for="known-' + i + '"><a rel="spell=' + i + '&know=' + i + '&domain=' + Locale.current.domain + '">' + g_spells[i]['name_' + Locale.getName()] + (g_spells[i]['rank_' + Locale.getName()] ? ' (' + g_spells[i]['rank_' + Locale.getName()] + ')' : '') + '</a></label>')
.append('<br />');
$('#known-' + i).change($WH.g_tooltipSpellsChange.bind(this));

View File

@@ -29,4 +29,4 @@ if (!empty($this->contribute)):
?>
tabsContribute.flush();
</script>
<? endif; ?>
<?php endif; ?>