$vendors = WoW_Items::GetVendorsSource(); if (is_array($vendors)) { foreach ($vendors as $vendor) { if (isset($vendor['ext_cost_items']) && is_array($vendor['ext_cost_items'])) { foreach ($vendor['ext_cost_items'] as $item) { echo sprintf('_[%d]={name_enus:\'%d\',icon:[\'%s\',\'%s\']};', $item['entry'], WoW_Locale::GetLocaleID() != LOCALE_EN && isset($item['name_loc']) && $item['name_loc'] != null ? $item['name_loc'] : $item['name'], $item['icon'], $item['icon']); } } } } ?> //_[395]={name_enus:'Очки справедливости',icon:['pvecurrency-justice','pvecurrency-justice']}; //_[241]={name_enus:'Печать чемпиона',icon:['ability_paladin_artofwar','ability_paladin_artofwar']}; $.extend(true, g_gatheredcurrencies, _); <?php $achievementsCriteria = WoW_Items::GetAchievementsCriteria(); if (is_array($achievementsCriteria)) { echo 'var _ = {};'; foreach ($achievementsCriteria as $achievement) { echo sprintf('_[%d]={name_enus:\'%s\',icon:\'%s\'};', $achievement['id'], str_replace("'", "\\'", $achievement['name']), str_replace("'", "\\'", $achievement['icon'])); } echo ' $.extend(true, g_achievements, _); _ = g_achievements;'; } ?> //]]></script> <table class="infobox"> <tr><th id="infobox-quick-facts"><?php echo WoW_Locale::GetString('template_item_quick_facts'); ?>