mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
taking babysteps in the direction of profiles
This commit is contained in:
@@ -57,5 +57,6 @@ $AoWoWconf['register'] = true; // Allow acc
|
||||
$AoWoWconf['limit'] = 300; // Limit of some SQL queries
|
||||
$AoWoWconf['debug'] = true; // Disable cache, show smarty console panel, enable sql-errors
|
||||
$AoWoWconf['map_grouping'] = 0; // Map object grouping factor. Meters = 10^param. 0:disabled; 1|2|3:enabled (1:recommended)
|
||||
$AoWoWconf['battlegroup'] = 'Pure Pwnage'; // pretend, we belong to a battlegroup to satisfy profiler-related Jscripts; region can be determined from realmlist.timezone
|
||||
|
||||
?>
|
||||
|
||||
7
config/profile_all.js.in
Normal file
7
config/profile_all.js.in
Normal file
@@ -0,0 +1,7 @@
|
||||
var mn_profiles = [/*setup:realms*/];
|
||||
|
||||
var mn_guilds = $.extend(true,[],mn_profiles);
|
||||
var mn_arenateams = $.extend(true,[],mn_profiles);
|
||||
Menu.fixUrls(mn_profiles,"?profiles=",{useSimpleIdsAfter:1});
|
||||
Menu.fixUrls(mn_guilds,"?guilds=",{useSimpleIdsAfter:1});
|
||||
Menu.fixUrls(mn_arenateams,"?arena-teams=",{useSimpleIdsAfter:1});
|
||||
23
data.php
23
data.php
@@ -17,18 +17,17 @@ foreach ($datasets as $data)
|
||||
{
|
||||
// locale independant
|
||||
case 'zones':
|
||||
if (file_exists('datasets/zones'))
|
||||
echo file_get_contents('datasets/zones');
|
||||
else
|
||||
echo "/* could not fetch multi-level areas */\n\Mapper.multiLevelZones = {};";
|
||||
case 'weight-presets':
|
||||
case 'realms':
|
||||
if (file_exists('datasets/'.$data))
|
||||
echo file_get_contents('datasets/'.$data);
|
||||
else if ($AoWoWconf['debug'])
|
||||
echo "/* could not fetch static data: ".$data." */";
|
||||
echo "\n\n";
|
||||
break;
|
||||
case 'weight-presets':
|
||||
if (file_exists('datasets/weight-presets'))
|
||||
echo file_get_contents('datasets/weight-presets');
|
||||
else
|
||||
echo "/* could not fetch weight-presets */\n\var wt_presets = {};";
|
||||
echo "\n\n";
|
||||
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':
|
||||
@@ -46,8 +45,8 @@ foreach ($datasets as $data)
|
||||
echo file_get_contents('datasets/enus/'.$data.$params);
|
||||
else if (file_exists('datasets/'.$data.$params))
|
||||
echo file_get_contents('datasets/'.$data.$params);
|
||||
else
|
||||
echo "/* could not fetch ".$data.$params." for locale ".User::$localeString." */";
|
||||
else if ($AoWoWconf['debug'])
|
||||
echo "/* could not fetch static data: ".$data.$params." for locale: ".User::$localeString." */";
|
||||
echo "\n\n";
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
/* FILE ARCHIVED ON 9:47:44 Dez 27, 2009 */
|
||||
var wt_presets = {
|
||||
1: {
|
||||
pve: {
|
||||
fury: {exprtng:100,str:82,critstrkrtng:66,agi:53,armorpenrtng:52,hitrtng:48,hastertng:36,atkpwr:31,armor:5},
|
||||
prot: {sta:100,dodgertng:90,defrtng:86,block:81,agi:67,parryrtng:67,blockrtng:48,str:48,exprtng:19,hitrtng:10,armorpenrtng:10,critstrkrtng:7,armor:6,hastertng:1,atkpwr:1}
|
||||
// arms: {__icon:'ability_warrior_savageblow'},
|
||||
fury: {__icon:'ability_warrior_innerrage',exprtng:100,str:82,critstrkrtng:66,agi:53,armorpenrtng:52,hitrtng:48,hastertng:36,atkpwr:31,armor:5},
|
||||
prot: {__icon:'ability_warrior_defensivestance',sta:100,dodgertng:90,defrtng:86,block:81,agi:67,parryrtng:67,blockrtng:48,str:48,exprtng:19,hitrtng:10,armorpenrtng:10,critstrkrtng:7,armor:6,hastertng:1,atkpwr:1}
|
||||
}
|
||||
},
|
||||
2: {
|
||||
pve: {
|
||||
holy: {int:100,manargn:88,splpwr:58,critstrkrtng:46,hastertng:35},
|
||||
prot: {sta:100,dodgertng:94,block:86,defrtng:86,exprtng:79,agi:76,parryrtng:76,hitrtng:58,blockrtng:52,str:50,armor:6,atkpwr:6,splpwr:4,critstrkrtng:3},
|
||||
retrib: {mledps:470,hitrtng:100,str:80,exprtng:66,critstrkrtng:40,atkpwr:34,agi:32,hastertng:30,armorpenrtng:22,splpwr:9}
|
||||
holy: {__icon:'spell_holy_holybolt',int:100,manargn:88,splpwr:58,critstrkrtng:46,hastertng:35},
|
||||
prot: {__icon:'ability_paladin_shieldofthetemplar',sta:100,dodgertng:94,block:86,defrtng:86,exprtng:79,agi:76,parryrtng:76,hitrtng:58,blockrtng:52,str:50,armor:6,atkpwr:6,splpwr:4,critstrkrtng:3},
|
||||
retrib: {__icon:'spell_holy_auraoflight',mledps:470,hitrtng:100,str:80,exprtng:66,critstrkrtng:40,atkpwr:34,agi:32,hastertng:30,armorpenrtng:22,splpwr:9}
|
||||
}
|
||||
},
|
||||
3: {
|
||||
pve: {
|
||||
beast: {rgddps:213,hitrtng:100,agi:58,critstrkrtng:40,int:37,atkpwr:30,armorpenrtng:28,hastertng:21},
|
||||
marks: {rgddps:379,hitrtng:100,agi:74,critstrkrtng:57,armorpenrtng:40,int:39,atkpwr:32,hastertng:24},
|
||||
surv: {rgddps:181,hitrtng:100,agi:76,critstrkrtng:42,int:35,hastertng:31,atkpwr:29,armorpenrtng:26}
|
||||
beast: {__icon:'ability_hunter_bestialdiscipline',rgddps:213,hitrtng:100,agi:58,critstrkrtng:40,int:37,atkpwr:30,armorpenrtng:28,hastertng:21},
|
||||
marks: {__icon:'ability_hunter_focusedaim',rgddps:379,hitrtng:100,agi:74,critstrkrtng:57,armorpenrtng:40,int:39,atkpwr:32,hastertng:24},
|
||||
surv: {__icon:'ability_hunter_camouflage',rgddps:181,hitrtng:100,agi:76,critstrkrtng:42,int:35,hastertng:31,atkpwr:29,armorpenrtng:26}
|
||||
}
|
||||
},
|
||||
4: {
|
||||
pve: {
|
||||
assas: {mledps:170,agi:100,exprtng:87,hitrtng:83,critstrkrtng:81,atkpwr:65,armorpenrtng:65,hastertng:64,str:55},
|
||||
combat: {mledps:220,armorpenrtng:100,agi:100,exprtng:82,hitrtng:80,critstrkrtng:75,hastertng:73,str:55,atkpwr:50},
|
||||
subtle: {mledps:228,exprtng:100,agi:100,hitrtng:80,armorpenrtng:75,critstrkrtng:75,hastertng:75,str:55,atkpwr:50}
|
||||
assas: {__icon:'ability_rogue_eviscerate',mledps:170,agi:100,exprtng:87,hitrtng:83,critstrkrtng:81,atkpwr:65,armorpenrtng:65,hastertng:64,str:55},
|
||||
combat: {__icon:'ability_backstab',mledps:220,armorpenrtng:100,agi:100,exprtng:82,hitrtng:80,critstrkrtng:75,hastertng:73,str:55,atkpwr:50},
|
||||
subtle: {__icon:'ability_stealth',mledps:228,exprtng:100,agi:100,hitrtng:80,armorpenrtng:75,critstrkrtng:75,hastertng:75,str:55,atkpwr:50}
|
||||
}
|
||||
},
|
||||
5: {
|
||||
pve: {
|
||||
disc: {splpwr:100,manargn:67,int:65,hastertng:59,critstrkrtng:48,spi:22},
|
||||
holy: {manargn:100,int:69,splpwr:60,spi:52,critstrkrtng:38,hastertng:31},
|
||||
shadow: {hitrtng:100,shasplpwr:76,splpwr:76,critstrkrtng:54,hastertng:50,spi:16,int:16}
|
||||
disc: {__icon:'spell_holy_powerwordshield',splpwr:100,manargn:67,int:65,hastertng:59,critstrkrtng:48,spi:22},
|
||||
holy: {__icon:'spell_holy_guardianspirit',manargn:100,int:69,splpwr:60,spi:52,critstrkrtng:38,hastertng:31},
|
||||
shadow: {__icon:'spell_shadow_shadowwordpain',hitrtng:100,shasplpwr:76,splpwr:76,critstrkrtng:54,hastertng:50,spi:16,int:16}
|
||||
}
|
||||
},
|
||||
6: {
|
||||
pve: {
|
||||
blooddps: {mledps:360,armorpenrtng:100,str:99,hitrtng:91,exprtng:90,critstrkrtng:57,hastertng:55,atkpwr:36,armor:1},
|
||||
frostdps: {mledps:337,hitrtng:100,str:97,exprtng:81,armorpenrtng:61,critstrkrtng:45,atkpwr:35,hastertng:28,armor:1},
|
||||
frosttank: {mledps:419,parryrtng:100,hitrtng:97,str:96,defrtng:85,exprtng:69,dodgertng:61,agi:61,sta:61,critstrkrtng:49,atkpwr:41,armorpenrtng:31,armor:5},
|
||||
unholydps: {mledps:209,str:100,hitrtng:66,exprtng:51,hastertng:48,critstrkrtng:45,atkpwr:34,armorpenrtng:32,armor:1}
|
||||
blooddps: {__icon:'spell_deathknight_bloodpresence',mledps:360,armorpenrtng:100,str:99,hitrtng:91,exprtng:90,critstrkrtng:57,hastertng:55,atkpwr:36,armor:1},
|
||||
frostdps: {__icon:'spell_deathknight_frostpresence',mledps:337,hitrtng:100,str:97,exprtng:81,armorpenrtng:61,critstrkrtng:45,atkpwr:35,hastertng:28,armor:1},
|
||||
frosttank: {__icon:'spell_deathknight_frostpresence',mledps:419,parryrtng:100,hitrtng:97,str:96,defrtng:85,exprtng:69,dodgertng:61,agi:61,sta:61,critstrkrtng:49,atkpwr:41,armorpenrtng:31,armor:5},
|
||||
unholydps: {__icon:'spell_deathknight_unholypresence',mledps:209,str:100,hitrtng:66,exprtng:51,hastertng:48,critstrkrtng:45,atkpwr:34,armorpenrtng:32,armor:1}
|
||||
}
|
||||
},
|
||||
7: {
|
||||
pve: {
|
||||
elem: {hitrtng:100,splpwr:60,hastertng:56,critstrkrtng:40,int:11},
|
||||
enhance: {mledps:135,hitrtng:100,exprtng:84,agi:55,int:55,critstrkrtng:55,hastertng:42,str:35,atkpwr:32,splpwr:29,armorpenrtng:26},
|
||||
resto: {manargn:100,int:85,splpwr:77,critstrkrtng:62,hastertng:35}
|
||||
elem: {__icon:'spell_nature_lightning',hitrtng:100,splpwr:60,hastertng:56,critstrkrtng:40,int:11},
|
||||
enhance: {__icon:'spell_shaman_improvedstormstrike',mledps:135,hitrtng:100,exprtng:84,agi:55,int:55,critstrkrtng:55,hastertng:42,str:35,atkpwr:32,splpwr:29,armorpenrtng:26},
|
||||
resto: {__icon:'spell_nature_magicimmunity',manargn:100,int:85,splpwr:77,critstrkrtng:62,hastertng:35}
|
||||
}
|
||||
},
|
||||
8: {
|
||||
pve: {
|
||||
arcane: {hitrtng:100,hastertng:54,arcsplpwr:49,splpwr:49,critstrkrtng:37,int:34,frosplpwr:24,firsplpwr:24,spi:14},
|
||||
fire: {hitrtng:100,hastertng:53,firsplpwr:46,splpwr:46,critstrkrtng:43,frosplpwr:23,arcsplpwr:23,int:13},
|
||||
frost: {hitrtng:100,hastertng:42,frosplpwr:39,splpwr:39,arcsplpwr:19,firsplpwr:19,critstrkrtng:19,int:6}
|
||||
arcane: {__icon:'spell_holy_magicalsentry',hitrtng:100,hastertng:54,arcsplpwr:49,splpwr:49,critstrkrtng:37,int:34,frosplpwr:24,firsplpwr:24,spi:14},
|
||||
fire: {__icon:'spell_fire_firebolt02',hitrtng:100,hastertng:53,firsplpwr:46,splpwr:46,critstrkrtng:43,frosplpwr:23,arcsplpwr:23,int:13},
|
||||
frost: {__icon:'spell_frost_frostbolt02',hitrtng:100,hastertng:42,frosplpwr:39,splpwr:39,arcsplpwr:19,firsplpwr:19,critstrkrtng:19,int:6}
|
||||
}
|
||||
},
|
||||
9: {
|
||||
pve: {
|
||||
afflic: {hitrtng:100,shasplpwr:72,splpwr:72,hastertng:61,critstrkrtng:38,firsplpwr:36,spi:34,int:15},
|
||||
demo: {hitrtng:100,hastertng:50,firsplpwr:45,shasplpwr:45,splpwr:45,critstrkrtng:31,spi:29,int:13},
|
||||
destro: {hitrtng:100,firsplpwr:47,splpwr:47,hastertng:46,spi:26,shasplpwr:23,critstrkrtng:16,int:13}
|
||||
afflic: {__icon:'spell_shadow_deathcoil',hitrtng:100,shasplpwr:72,splpwr:72,hastertng:61,critstrkrtng:38,firsplpwr:36,spi:34,int:15},
|
||||
demo: {__icon:'spell_shadow_metamorphosis',hitrtng:100,hastertng:50,firsplpwr:45,shasplpwr:45,splpwr:45,critstrkrtng:31,spi:29,int:13},
|
||||
destro: {__icon:'spell_shadow_rainoffire',hitrtng:100,firsplpwr:47,splpwr:47,hastertng:46,spi:26,shasplpwr:23,critstrkrtng:16,int:13}
|
||||
}
|
||||
},
|
||||
11: {
|
||||
pve: {
|
||||
balance: {hitrtng:100,splpwr:66,hastertng:54,critstrkrtng:43,spi:22,int:22},
|
||||
feraldps: {agi:100,armorpenrtng:90,str:80,critstrkrtng:55,exprtng:50,hitrtng:50,feratkpwr:40,atkpwr:40,hastertng:35},
|
||||
feraltank: {agi:100,sta:75,dodgertng:65,defrtng:60,exprtng:16,str:10,armor:10,hitrtng:8,hastertng:5,atkpwr:4,feratkpwr:4,critstrkrtng:3},
|
||||
resto: {splpwr:100,manargn:73,hastertng:57,int:51,spi:32,critstrkrtng:11}
|
||||
balance: {__icon:'spell_nature_starfall',hitrtng:100,splpwr:66,hastertng:54,critstrkrtng:43,spi:22,int:22},
|
||||
feraldps: {__icon:'ability_druid_catform',agi:100,armorpenrtng:90,str:80,critstrkrtng:55,exprtng:50,hitrtng:50,feratkpwr:40,atkpwr:40,hastertng:35},
|
||||
feraltank: {__icon:'ability_racial_bearform',agi:100,sta:75,dodgertng:65,defrtng:60,exprtng:16,str:10,armor:10,hitrtng:8,hastertng:5,atkpwr:4,feratkpwr:4,critstrkrtng:3},
|
||||
resto: {__icon:'spell_nature_healingtouch',splpwr:100,manargn:73,hastertng:57,int:51,spi:32,critstrkrtng:11}
|
||||
}
|
||||
}
|
||||
};
|
||||
120
setup/tools/dataset-assembler/realms.php
Normal file
120
setup/tools/dataset-assembler/realms.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
// Create 'realms'-file in datasets; update profile_all with real realms
|
||||
// this script requires all realms in use to be defined in auth.realmlist
|
||||
// battlegroups has to be set in config file
|
||||
|
||||
/* 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'
|
||||
},
|
||||
|
||||
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 urlize($str)
|
||||
{
|
||||
$pairs = [
|
||||
"ß" => "ss",
|
||||
"á" => "a", "ä" => "a", "à" => "a", "â" => "a",
|
||||
"è" => "e", "ê" => "e", "é" => "e", "ë" => "e",
|
||||
"í" => "i", "î" => "i", "ì" => "i", "ï" => "i",
|
||||
"ñ" => "n",
|
||||
"ò" => "o", "ó" => "o", "ö" => "o", "ô" => "o",
|
||||
"ú" => "u", "ü" => "u", "û" => "u", "ù" => "u",
|
||||
"œ" => "oe",
|
||||
"Á" => "A", "Ä" => "A", "À" => "A", "Â" => "A",
|
||||
"È" => "E", "Ê" => "E", "É" => "E", "Ë" => "E",
|
||||
"Í" => "I", "Î" => "I", "Ì" => "I", "Ï" => "I",
|
||||
"Ñ" => "N",
|
||||
"Ò" => "O", "Ó" => "O", "Ö" => "O", "Ô" => "O",
|
||||
"Ú" => "U", "Ü" => "U", "Û" => "U", "Ù" => "U",
|
||||
"œ" => "Oe",
|
||||
" " => "-"
|
||||
];
|
||||
|
||||
return preg_replace('/[^\d\w\-]/', '', strtr(strToLower($str), $pairs));
|
||||
}
|
||||
|
||||
if (!file_exists('config\\profile_all.js.in'))
|
||||
die('profile_all source file is missing; cannot create realm file');
|
||||
|
||||
$menu = [
|
||||
["us","US & Oceanic", null,[
|
||||
[urlize($AoWoWconf['battlegroup']),$AoWoWconf['battlegroup'],null,[]]
|
||||
]],
|
||||
["eu","Europe", null,[
|
||||
[urlize($AoWoWconf['battlegroup']),$AoWoWconf['battlegroup'],null,[]]
|
||||
]]
|
||||
];
|
||||
|
||||
$rows = DB::Auth()->select('SELECT id AS ARRAY_KEY, name, ?s AS battlegroup, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0', $AoWoWconf['battlegroup']);
|
||||
$str = 'var g_realms = '.json_encode($rows, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE).';';
|
||||
|
||||
$handle = fOpen('datasets\\realms', "w");
|
||||
fWrite($handle, $str);
|
||||
fClose($handle);
|
||||
|
||||
$set = 0x0;
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
if ($row['region'] == 'eu')
|
||||
{
|
||||
$set |= 0x1;
|
||||
$menu[1][3][0][3][] = [urlize($row['name']),$row['name']];
|
||||
}
|
||||
else if ($row['region'] == 'us')
|
||||
{
|
||||
$set |= 0x2;
|
||||
$menu[0][3][0][3][] = [urlize($row['name']),$row['name']];
|
||||
}
|
||||
}
|
||||
|
||||
if (!($set & 0x1))
|
||||
array_pop($menu);
|
||||
|
||||
if (!($set & 0x2))
|
||||
array_shift($menu);
|
||||
|
||||
$file = file_get_contents('config\\profile_all.js.in');
|
||||
$dest = fOpen('template\\js\\profile_all.js', "w");
|
||||
|
||||
fWrite($dest, str_replace('[/*setup:realms*/]', json_encode($menu, JSON_UNESCAPED_UNICODE), $file));
|
||||
fClose($dest);
|
||||
|
||||
echo 'all done';
|
||||
?>
|
||||
Reference in New Issue
Block a user