- fixed some typos

- fixed a forgotten query to use ?_icons

rerun 'php aowow --sql=item_stats' to generate the missing stats for gems
This commit is contained in:
Sarjuuk
2015-06-06 09:17:47 +02:00
parent c93b08f333
commit 618217b970
4 changed files with 10 additions and 4 deletions

View File

@@ -711,7 +711,13 @@ class ItemList extends BaseType
// Sockets w/ Gems
if (!empty($enhance['g']))
{
$gems = DB::Aowow()->select('SELECT i.id AS ARRAY_KEY, i.iconString, ae.*, i.gemColorMask AS colorMask FROM ?_items i JOIN ?_itemenchantment ae ON ae.id = i.gemEnchantmentId WHERE i.id IN (?a)', $enhance['g']);
$gems = DB::Aowow()->select('
SELECT it.id AS ARRAY_KEY, ic.iconString, ae.*, it.gemColorMask AS colorMask
FROM ?_items it
JOIN ?_itemenchantment ae ON ae.id = it.gemEnchantmentId
JOIN ?_icons ic ON ic.id = -it.displayId
WHERE it.id IN (?a)',
$enhance['g']);
foreach ($enhance['g'] as $k => $v)
if ($v && !in_array($v, array_keys($gems))) // 0 is valid
unset($enhance['g'][$k]);

View File

@@ -489,7 +489,7 @@ class ObjectPage extends GenericPage
public function notFound()
{
if ($this->mode != CACHE_TYPE_TOOLTIP)
return parent::notFound(Lang::game('gameObject'), Lang:gameObject('notFound'));
return parent::notFound(Lang::game('gameObject'), Lang::gameObject('notFound'));
header('Content-type: application/x-javascript; charset=utf-8');
echo $this->generateTooltip(true);

View File

@@ -99,7 +99,7 @@ class ItemStatSetup extends ItemList
if ($item > 0) // apply socketBonus
$this->json[$item]['socketbonusstat'] = $stats;
else /* if ($item < 0) */ // apply gemEnchantment
Util::arraySumByKey($this->json[-$item][$mod], $stats);
Util::arraySumByKey($this->json[-$item], $stats);
}
}
}

View File

@@ -120,7 +120,7 @@ function taxi() // path & nodes
continue;
$dist = pow($c['posX'] - $n['origPosX'], 2) + pow($c['posY'] - $n['origPosY'], 2);
if ($dist > 1000)
if ($dist > 1000)
continue;
if (!isset($n['dist']) || $n['dist'] < $dist)