Files
aowow/setup/tools/filegen/realms.func.php
Sarjuuk 11584a68d6 Profiler preparations
* Setup
   - accessing realm info by way of Util function
   - added table ?_talents
 * Lists
   - added support for querying multiple databases with the same structure at once (read: realms)
   - added support for exact string matches and forcing collate of fields to ci
 * JS
   - renamed occurences of 'subregion' to 'battlegroup' to be in line with other scripts (the usage is the same)
2015-08-11 15:03:42 +02:00

45 lines
1.1 KiB
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
if (!CLI)
die('not in cli mode');
// Create 'realms'-file in datasets
// this script requires all realms in use to be defined in auth.realmlist
// battlegroups has to be set in aowow.aowow_config
/* seems to be unused, was located in the same file as g_realms
var g_regions = {
us => 'www.wowarmory.com',
eu => 'eu.wowarmory.com'
};
*/
/* Examples
1 => {
name:'Eldre\'Thalas',
battlegroup:'Reckoning',
region:'us'
},
*/
function realms()
{
$realms = Util::getRealms();
if (!$realms)
CLISetup::log(' - realms: Auth-DB not set up .. static data g_realms will be empty', CLISetup::LOG_WARN);
else
foreach ($realms as &$r)
$r['battlegroup'] = CFG_BATTLEGROUP;
$toFile = "var g_realms = ".Util::toJSON($realms).";";
$file = 'datasets/realms';
return CLISetup::writeFile($file, $toFile);
}
?>