* fixed displaying zero value stats as socketbonus
This commit is contained in:
Sarjuuk
2015-08-18 14:43:07 +02:00
parent a7eabb4b9d
commit e825ed84e8

View File

@@ -1206,6 +1206,7 @@ class ItemList extends BaseType
if ($enchantments) if ($enchantments)
{ {
$eStats = DB::Aowow()->select('SELECT *, typeId AS ARRAY_KEY FROM ?_item_stats WHERE `type` = ?d AND typeId IN (?a)', TYPE_ENCHANTMENT, array_keys($enchantments)); $eStats = DB::Aowow()->select('SELECT *, typeId AS ARRAY_KEY FROM ?_item_stats WHERE `type` = ?d AND typeId IN (?a)', TYPE_ENCHANTMENT, array_keys($enchantments));
Util::checkNumeric($eStats);
// and merge enchantments back // and merge enchantments back
foreach ($enchantments as $eId => $items) foreach ($enchantments as $eId => $items)
@@ -1227,8 +1228,6 @@ class ItemList extends BaseType
foreach ($json as $k => $v) foreach ($json as $k => $v)
if (!$v && !in_array($k, ['classs', 'subclass', 'quality', 'side'])) if (!$v && !in_array($k, ['classs', 'subclass', 'quality', 'side']))
unset($this->json[$item][$k]); unset($this->json[$item][$k]);
Util::checkNumeric($this->json);
} }
public function getOnUseStats() public function getOnUseStats()