mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
updated every other windows-sepecific path
thx @zackbcom
This commit is contained in:
@@ -1526,7 +1526,7 @@ class Util
|
|||||||
|
|
||||||
public static function alphaMapCheck($areaId, array &$coords)
|
public static function alphaMapCheck($areaId, array &$coords)
|
||||||
{
|
{
|
||||||
$file = 'cache\\alphaMaps\\'.$areaId.'.png';
|
$file = 'cache/alphaMaps/'.$areaId.'.png';
|
||||||
if (!file_exists($file))
|
if (!file_exists($file))
|
||||||
{
|
{
|
||||||
self::addNote(U_GROUP_STAFF, 'Util::alphaMapCheck no suitable alphaMap found for area '.$areaId.'. Positional check omitted!');
|
self::addNote(U_GROUP_STAFF, 'Util::alphaMapCheck no suitable alphaMap found for area '.$areaId.'. Positional check omitted!');
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
$enchIds = [];
|
$enchIds = [];
|
||||||
foreach ($enchantSpells->iterate() as $__)
|
foreach ($enchantSpells->iterate() as $__)
|
||||||
@@ -212,7 +212,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$toFile = "var g_enchants = ";
|
$toFile = "var g_enchants = ";
|
||||||
$toFile .= json_encode($enchantsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
$toFile .= json_encode($enchantsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
||||||
$toFile .= ";";
|
$toFile .= ";";
|
||||||
$file = 'datasets\\'.User::$localeString.'\\enchants';
|
$file = 'datasets/'.User::$localeString.'/enchants';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
fWrite($handle, $toFile);
|
fWrite($handle, $toFile);
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
$enchIds = [];
|
$enchIds = [];
|
||||||
foreach ($gems as $pop)
|
foreach ($gems as $pop)
|
||||||
@@ -88,7 +88,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$toFile = "var g_gems = ";
|
$toFile = "var g_gems = ";
|
||||||
$toFile .= json_encode($gemsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
$toFile .= json_encode($gemsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
||||||
$toFile .= ";";
|
$toFile .= ";";
|
||||||
$file = 'datasets\\'.User::$localeString.'\\gems';
|
$file = 'datasets/'.User::$localeString.'/gems';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
fWrite($handle, $toFile);
|
fWrite($handle, $toFile);
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
echo "script set up in ".Util::execTime()."<br>\n";
|
echo "script set up in ".Util::execTime()."<br>\n";
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$toFile = "var g_glyphs = ";
|
$toFile = "var g_glyphs = ";
|
||||||
$toFile .= json_encode($glyphsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
$toFile .= json_encode($glyphsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
||||||
$toFile .= ";";
|
$toFile .= ";";
|
||||||
$file = 'datasets\\'.User::$localeString.'\\glyphs';
|
$file = 'datasets/'.User::$localeString.'/glyphs';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
fWrite($handle, $toFile);
|
fWrite($handle, $toFile);
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
echo "script set up in ".Util::execTime()."<br>\n";
|
echo "script set up in ".Util::execTime()."<br>\n";
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$toFile = "var g_itemsets = ";
|
$toFile = "var g_itemsets = ";
|
||||||
$toFile .= json_encode($itemsetOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
$toFile .= json_encode($itemsetOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
||||||
$toFile .= ";";
|
$toFile .= ";";
|
||||||
$file = 'datasets\\'.User::$localeString.'\\itemsets';
|
$file = 'datasets/'.User::$localeString.'/itemsets';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
fWrite($handle, $toFile);
|
fWrite($handle, $toFile);
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
echo "script set up in ".Util::execTime()."<br>\n";
|
echo "script set up in ".Util::execTime()."<br>\n";
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$toFile = "var g_pets = ";
|
$toFile = "var g_pets = ";
|
||||||
$toFile .= json_encode($petsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
$toFile .= json_encode($petsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
||||||
$toFile .= ";";
|
$toFile .= ";";
|
||||||
$file = 'datasets\\'.User::$localeString.'\\pets';
|
$file = 'datasets/'.User::$localeString.'/pets';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
fWrite($handle, $toFile);
|
fWrite($handle, $toFile);
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
echo "script set up in ".Util::execTime()."<br><br>\n\n";
|
echo "script set up in ".Util::execTime()."<br><br>\n\n";
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
User::useLocale($l);
|
User::useLocale($l);
|
||||||
Lang::load(Util::$localeStrings[$l]);
|
Lang::load(Util::$localeStrings[$l]);
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-quests', "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-quests', "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create quests file '.$l);
|
die('could not create quests file '.$l);
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
{
|
{
|
||||||
User::useLocale($l);
|
User::useLocale($l);
|
||||||
Lang::load(Util::$localeStrings[$l]);
|
Lang::load(Util::$localeStrings[$l]);
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-achievements', "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-achievements', "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create achievements file '.$l);
|
die('could not create achievements file '.$l);
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
{
|
{
|
||||||
User::useLocale($l);
|
User::useLocale($l);
|
||||||
Lang::load(Util::$localeStrings[$l]);
|
Lang::load(Util::$localeStrings[$l]);
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-titles-'.$g, "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-titles-'.$g, "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create titles file '.$l.' '.$g);
|
die('could not create titles file '.$l.' '.$g);
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
{
|
{
|
||||||
User::useLocale($l);
|
User::useLocale($l);
|
||||||
Lang::load(Util::$localeStrings[$l]);
|
Lang::load(Util::$localeStrings[$l]);
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-mounts', "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-mounts', "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create mounts file '.$l);
|
die('could not create mounts file '.$l);
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
{
|
{
|
||||||
User::useLocale($l);
|
User::useLocale($l);
|
||||||
Lang::load(Util::$localeStrings[$l]);
|
Lang::load(Util::$localeStrings[$l]);
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-companions', "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-companions', "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create companions file '.$l);
|
die('could not create companions file '.$l);
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
{
|
{
|
||||||
User::useLocale($l);
|
User::useLocale($l);
|
||||||
Lang::load(Util::$localeStrings[$l]);
|
Lang::load(Util::$localeStrings[$l]);
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-factions', "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-factions', "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create factions file '.$l);
|
die('could not create factions file '.$l);
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-recipes-'.$file, "w");
|
$handle = fOpen('datasets/'.User::$localeString.'/p-recipes-'.$file, "w");
|
||||||
if (!$handle)
|
if (!$handle)
|
||||||
die('could not create '.$file.' file '.$l);
|
die('could not create '.$file.' file '.$l);
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
return preg_replace('/[^\d\w\-]/', '', strtr(strToLower($str), $pairs));
|
return preg_replace('/[^\d\w\-]/', '', strtr(strToLower($str), $pairs));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists('config\\profile_all.js.in'))
|
if (!file_exists('config/profile_all.js.in'))
|
||||||
die('profile_all source file is missing; cannot create realm file');
|
die('profile_all source file is missing; cannot create realm file');
|
||||||
|
|
||||||
$menu = [
|
$menu = [
|
||||||
@@ -85,7 +85,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$rows = DB::Auth()->select('SELECT id AS ARRAY_KEY, name, ? AS battlegroup, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0', CFG_BATTLEGROUP);
|
$rows = DB::Auth()->select('SELECT id AS ARRAY_KEY, name, ? AS battlegroup, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0', CFG_BATTLEGROUP);
|
||||||
$str = 'var g_realms = '.json_encode($rows, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE).';';
|
$str = 'var g_realms = '.json_encode($rows, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE).';';
|
||||||
|
|
||||||
$handle = fOpen('datasets\\realms', "w");
|
$handle = fOpen('datasets/realms', "w");
|
||||||
fWrite($handle, $str);
|
fWrite($handle, $str);
|
||||||
fClose($handle);
|
fClose($handle);
|
||||||
|
|
||||||
@@ -110,8 +110,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
if (!($set & 0x2))
|
if (!($set & 0x2))
|
||||||
array_shift($menu);
|
array_shift($menu);
|
||||||
|
|
||||||
$file = file_get_contents('config\\profile_all.js.in');
|
$file = file_get_contents('config/profile_all.js.in');
|
||||||
$dest = fOpen('template\\js\\profile_all.js', "w");
|
$dest = fOpen('template/js/profile_all.js', "w");
|
||||||
|
|
||||||
fWrite($dest, str_replace('[/*setup:realms*/]', json_encode($menu, JSON_UNESCAPED_UNICODE), $file));
|
fWrite($dest, str_replace('[/*setup:realms*/]', json_encode($menu, JSON_UNESCAPED_UNICODE), $file));
|
||||||
fClose($dest);
|
fClose($dest);
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$json = json_encode($out, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
$json = json_encode($out, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
||||||
$json = preg_replace('/"\$([^$"]+)"/', '\1', $json);
|
$json = preg_replace('/"\$([^$"]+)"/', '\1', $json);
|
||||||
|
|
||||||
$handle = fOpen('datasets\\statistics', "w");
|
$handle = fOpen('datasets/statistics', "w");
|
||||||
fWrite($handle, 'g_statistics = '.$json.';');
|
fWrite($handle, 'g_statistics = '.$json.';');
|
||||||
fClose($handle);
|
fClose($handle);
|
||||||
|
|
||||||
|
|||||||
@@ -180,8 +180,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
if (!is_dir('datasets\\'.$dir))
|
if (!is_dir('datasets/'.$dir))
|
||||||
mkdir('datasets\\'.$dir, 0755, true);
|
mkdir('datasets/'.$dir, 0755, true);
|
||||||
|
|
||||||
$tSpellIds = DB::Aowow()->selectCol('SELECT rank1 FROM dbc.talent UNION SELECT rank2 FROM dbc.talent UNION SELECT rank3 FROM dbc.talent UNION SELECT rank4 FROM dbc.talent UNION SELECT rank5 FROM dbc.talent');
|
$tSpellIds = DB::Aowow()->selectCol('SELECT rank1 FROM dbc.talent UNION SELECT rank2 FROM dbc.talent UNION SELECT rank3 FROM dbc.talent UNION SELECT rank4 FROM dbc.talent UNION SELECT rank5 FROM dbc.talent');
|
||||||
$tSpells = new SpellList(array(['s.id', $tSpellIds], CFG_SQL_LIMIT_NONE));
|
$tSpells = new SpellList(array(['s.id', $tSpellIds], CFG_SQL_LIMIT_NONE));
|
||||||
@@ -199,7 +199,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
set_time_limit(20);
|
set_time_limit(20);
|
||||||
|
|
||||||
$cId = log($cMask, 2) + 1;
|
$cId = log($cMask, 2) + 1;
|
||||||
$file = 'datasets\\'.User::$localeString.'\\talents-'.$cId;
|
$file = 'datasets/'.User::$localeString.'/talents-'.$cId;
|
||||||
$toFile = '$WowheadTalentCalculator.registerClass('.$cId.', '.json_encode($buildTree($cId), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK).')';
|
$toFile = '$WowheadTalentCalculator.registerClass('.$cId.', '.json_encode($buildTree($cId), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK).')';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
@@ -218,7 +218,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
$toFile = "var g_pet_icons = ".$petIcons."\n\n";
|
$toFile = "var g_pet_icons = ".$petIcons."\n\n";
|
||||||
$toFile .= 'var g_pet_talents = '.json_encode($buildTree(0), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
$toFile .= 'var g_pet_talents = '.json_encode($buildTree(0), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK);
|
||||||
$file = 'datasets\\'.User::$localeString.'\\pet-talents';
|
$file = 'datasets/'.User::$localeString.'/pet-talents';
|
||||||
|
|
||||||
$handle = fOpen($file, "w");
|
$handle = fOpen($file, "w");
|
||||||
fWrite($handle, $toFile);
|
fWrite($handle, $toFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user