getListviewData(ITEMINFO_MODEL); foreach ($dataz as $i => $d) { if (isset($d['quality'])) // whoever thought of prepending quality to the name may burn in hell! { $d['name'] = $d['quality'].$d['name']; unset($d['quality']); } echo $glob.'['.$i.'] = '.json_encode($d, JSON_NUMERIC_CHECK).";\n"; } if ($data == 'recipes') // todo: skip adding reagents foreach ($list->relItems->iterate() as $iId => $tpl) echo "g_items.add(".$iId.", {'icon':'".$tpl['iconString']."'});\n"; /* issue: when we load onDemand, the jScript tries to generate the catg-tree before the it is initialized it cant be initialized, without loading the data as empty catg are omitted loading the data triggers the generation of the catg-tree obviously only, if we have no initial data set yay .. either way, we loose */ echo "\n\$WowheadProfiler.loadOnDemand('".$data."', ".$catg.");\n"; break; // locale independant case 'zones': case 'weight-presets': case 'item-scaling': case 'realms': case 'statistics': if (file_exists('datasets/'.$data)) echo file_get_contents('datasets/'.$data); else if (CFG_DEBUG) echo "alert('could not fetch static data: ".$data."');"; echo "\n\n"; break; case 'user': // todo (high): structure probably lost; probably sent basic char stats // g_user = { id: 0, name: '', roles: 0, permissions: 0, ads: true, cookies: {} }; break; // localized case 'talents': if (isset($_GET['class'])) $params .= "-".intVal($_GET['class']); case 'pet-talents': case 'glyphs': case 'gems': case 'enchants': case 'itemsets': case 'pets': if (file_exists('datasets/'.User::$localeString.'/'.$data.$params)) echo file_get_contents('datasets/'.User::$localeString.'/'.$data.$params); else if (file_exists('datasets/enus/'.$data.$params)) echo file_get_contents('datasets/enus/'.$data.$params); else if (file_exists('datasets/'.$data.$params)) echo file_get_contents('datasets/'.$data.$params); else if (CFG_DEBUG) echo "alert('could not fetch static data: ".$data.$params." for locale: ".User::$localeString."');"; echo "\n\n"; break; case 'quick-excludes': // generated per character in profiler default: break; } } ?>