mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- setup can now be run from CLI. Use "> php index.php --help" to start off - updated logging for use with CLI - added generators for client imagery (icons, maps, talents, ect) DBC: - parsed DBCs are now expected in the Aowow-DB, prefixed with dbc_* (they are joined with these tables, so its easier to have them here altogether) - setup/db_setup_3.zip may be reapplied (optionally) - alternatively aowow will now extract you own DBCs alongside your textures. They will be parsed and saved to DB, as needed. Misc: * HOST_URL and STATIC_URL will now be determined automaticly once and * then saved to ?_config (setup by CLI requires these to be set) Spell: * added glyph-symbol to infobox for glyph-related spells
72 lines
2.0 KiB
PHP
72 lines
2.0 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
// Create 'profile_all.js'-file in static/js;
|
|
// this script requires all realms in use to be defined in auth.realmlist
|
|
// battlegroups has to be set in config file
|
|
|
|
/* Example
|
|
var mn_profiles = [
|
|
["us","US & Oceanic",,[
|
|
["bloodlust","Bloodlust",,[
|
|
["amanthul","Aman'Thul"],
|
|
["barthilas","Barthilas"]
|
|
]],
|
|
["cyclone","Cyclone",,[
|
|
["azjol-nerub","Azjol-Nerub"],
|
|
["bloodscalp","Bloodscalp"]
|
|
]]
|
|
]],
|
|
["eu","Europe",,[
|
|
["blackout","Blackout",,[
|
|
["agamaggan","Agamaggan"],
|
|
["aggramar","Aggramar"]
|
|
]],
|
|
["blutdurst","Blutdurst",,[
|
|
["aegwynn","Aegwynn"],
|
|
["destromath","Destromath"]
|
|
]]
|
|
]]
|
|
];
|
|
*/
|
|
|
|
function realmMenu()
|
|
{
|
|
$subEU = [];
|
|
$subUS = [];
|
|
$menu = [
|
|
['us', 'US & Oceanic', null,[[Util::urlize(CFG_BATTLEGROUP), CFG_BATTLEGROUP, null, &$subEU]]],
|
|
['eu', 'Europe', null,[[Util::urlize(CFG_BATTLEGROUP), CFG_BATTLEGROUP, null, &$subUS]]]
|
|
];
|
|
|
|
$rows = DB::Auth()->select('SELECT name, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0');
|
|
$set = 0x0;
|
|
|
|
foreach ($rows as $row)
|
|
{
|
|
if ($row['region'] == 'eu')
|
|
{
|
|
$set |= 0x1;
|
|
$subEU[] = [Util::urlize($row['name']), $row['name']];
|
|
}
|
|
else if ($row['region'] == 'us')
|
|
{
|
|
$set |= 0x2;
|
|
$subUS[] = [Util::urlize($row['name']), $row['name']];
|
|
}
|
|
}
|
|
|
|
if (!($set & 0x1))
|
|
array_shift($menu);
|
|
|
|
if (!($set & 0x2))
|
|
array_pop($menu);
|
|
|
|
return Util::toJSON($menu);
|
|
}
|
|
|
|
?>
|