mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- removed web-setup - new CLI parameters --account : create initial account(s) --siteconfig : edit php/aowow config values --dbconfig : set up db connection --sql : create db content from world/dbc-tables --firstrun : [NYI] step by step initial setup - some fixes by the wayside * display required arena bracket for extendedCost * achievement chains are searchable again * category trees for factions should now be correct * trainer tab on spell detail page reapeared * userMenu item 'Settings' no longer breaks the page * display abilities of shapeshift in tab on spell detail page * corrected reading ?_sourcestrings for titles * fixed error on race detail page * added simple descriptions to skill detail page * fixed tab "reward from" (achievement) on title detail page * fixed alphabetical order of some filter-dropdowns * fixed skill colors for spells * fixed power display for rune-based spells, that also cost mana * added more information to zones * also check mail_loot_template for achivements * fixed bug, where loot_template-ids would be reused for multiple templates * display sourcemore for pvp-sources
92 lines
3.0 KiB
PHP
92 lines
3.0 KiB
PHP
<?php
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
if (!CLI)
|
|
die('not in cli mode');
|
|
|
|
|
|
/* Example
|
|
40896: {
|
|
"name":"Glyph of Frenzied Regeneration",
|
|
"description":"For 6 sec after activating Frenzied Regeneration, healing effects on you are 40% more powerful. However, your Frenzied Regeneration now always costs 60 Rage and no longer converts Rage into health.",
|
|
"icon":"ability_bullrush",
|
|
"type":1,
|
|
"classs":11,
|
|
"skill":798,
|
|
"level":25,
|
|
},
|
|
*/
|
|
|
|
// Create 'glyphs'-file for available locales
|
|
// this script requires the following dbc-files to be parsed and available
|
|
|
|
function glyphs()
|
|
{
|
|
$success = true;
|
|
$glyphList = DB::Aowow()->Select(
|
|
'SELECT i.id AS itemId,
|
|
i.*,
|
|
IF (g.typeFlags & 0x1, 2, 1) AS type,
|
|
i.subclass AS classs,
|
|
i.requiredLevel AS level,
|
|
s1.Id AS glyphSpell,
|
|
ic.iconString AS icon,
|
|
s1.skillLine1 AS skillId,
|
|
s2.Id AS glyphEffect,
|
|
s2.Id AS ARRAY_KEY
|
|
FROM ?_items i
|
|
JOIN ?_spell s1 ON s1.Id = i.spellid1
|
|
JOIN ?_glyphproperties g ON g.Id = s1.effect1MiscValue
|
|
JOIN ?_spell s2 ON s2.Id = g.spellId
|
|
JOIN ?_icons ic ON ic.Id = s1.iconIdAlt
|
|
WHERE i.classBak = 16');
|
|
|
|
// check directory-structure
|
|
foreach (Util::$localeStrings as $dir)
|
|
if (!CLISetup::writeDir('datasets/'.$dir))
|
|
$success = false;
|
|
|
|
$glyphSpells = new SpellList(array(['s.id', array_keys($glyphList)], CFG_SQL_LIMIT_NONE));
|
|
|
|
foreach (CLISetup::$localeIds as $lId)
|
|
{
|
|
set_time_limit(30);
|
|
|
|
User::useLocale($lId);
|
|
Lang::load(Util::$localeStrings[$lId]);
|
|
|
|
$glyphsOut = [];
|
|
foreach ($glyphSpells->iterate() as $__)
|
|
{
|
|
$pop = $glyphList[$glyphSpells->id];
|
|
|
|
if (!$pop['glyphEffect'])
|
|
continue;
|
|
|
|
if ($glyphSpells->getField('effect1Id') != 6 && $glyphSpells->getField('effect2Id') != 6 && $glyphSpells->getField('effect3Id') != 6)
|
|
continue;
|
|
|
|
$glyphsOut[$pop['itemId']] = array(
|
|
'name' => Util::localizedString($pop, 'name'),
|
|
'description' => $glyphSpells->parseText()[0],
|
|
'icon' => $pop['icon'],
|
|
'type' => $pop['type'],
|
|
'classs' => $pop['classs'],
|
|
'skill' => $pop['skillId'],
|
|
'level' => $pop['level']
|
|
);
|
|
}
|
|
|
|
$toFile = "var g_glyphs = ".Util::toJSON($glyphsOut).";";
|
|
$file = 'datasets/'.User::$localeString.'/glyphs';
|
|
|
|
if (!CLISetup::writeFile($file, $toFile))
|
|
$success = false;
|
|
}
|
|
|
|
return $success;
|
|
}
|
|
?>
|