Profiler/CLI

* move command line related functions to its own class
This commit is contained in:
Sarjuuk
2018-03-22 15:40:22 +01:00
parent f25498d4d0
commit b0a5f477c1
39 changed files with 595 additions and 588 deletions

View File

@@ -134,7 +134,7 @@ function creature(array $ids = [])
{
$newMax = max(array_column($npcs, 'entry'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;

View File

@@ -57,7 +57,7 @@ function currencies(array $ids = [])
$strings = $moneyNames[$itemId];
else
{
CLISetup::log('item #'.$itemId.' required by currency #'.$cId.' not in item_template', CLISetup::LOG_WARN);
CLI::write('item #'.$itemId.' required by currency #'.$cId.' not in item_template', CLI::LOG_WARN);
$strings = ['name_loc0' => 'Item #'.$itemId.' not in DB', 'iconId' => 0, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW, 'category' => 3];
}

View File

@@ -41,7 +41,7 @@ function emotes(/*array $ids = [] */)
}
}
CLISetup::log('GlobalStrings.lua not found for selected locale '.CLISetup::bold(Util::$localeStrings[$lId]), CLISetup::LOG_WARN);
CLI::write('GlobalStrings.lua not found for selected locale '.CLI::bold(Util::$localeStrings[$lId]), CLI::LOG_WARN);
$allOK = false;
}

View File

@@ -142,10 +142,10 @@ function item_stats(array $ids = [])
{
$offset = 0;
CLISetup::log(' - applying stats for enchantments');
CLI::write(' - applying stats for enchantments');
$enchStats = enchantment_stats();
CLISetup::log(' '.count($enchStats).' enchantments parsed');
CLISetup::log(' - applying stats for items');
CLI::write(' '.count($enchStats).' enchantments parsed');
CLI::write(' - applying stats for items');
while (true)
{
@@ -156,7 +156,7 @@ function item_stats(array $ids = [])
$max = max($items->getFoundIDs());
$num = count($items->getFoundIDs());
CLISetup::log(' * sets '.($offset + 1).' - '.($max));
CLI::write(' * sets '.($offset + 1).' - '.($max));
$offset = $max;

View File

@@ -145,7 +145,7 @@ function items(array $ids = [])
{
$newMax = max(array_column($items, 'entry'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;

View File

@@ -171,7 +171,7 @@ function itemset()
$items[$vId][$piece['slot'].$itemId] = $itemId;
else
{
CLISetup::log("set: ".$setId." ilvl: ".$piece['ItemLevel']." - conflict between item: ".$items[$vId][$piece['slot']]." and item: ".$itemId." choosing lower itemId", CLISetup::LOG_WARN);
CLI::write("set: ".$setId." ilvl: ".$piece['ItemLevel']." - conflict between item: ".$items[$vId][$piece['slot']]." and item: ".$itemId." choosing lower itemId", CLI::LOG_WARN);
if ($items[$vId][$piece['slot']] > $itemId)
$items[$vId][$piece['slot']] = $itemId;
@@ -243,7 +243,7 @@ function itemset()
foreach ($subset as $slot => $item)
{
if (isset($temp[$slot]) && $temp[$slot] < $item)
CLISetup::log("set: ".$setId." - conflict between item: ".$item." and item: ".$temp[$slot]." choosing lower itemId", CLISetup::LOG_WARN);
CLI::write("set: ".$setId." - conflict between item: ".$item." and item: ".$temp[$slot]." choosing lower itemId", CLI::LOG_WARN);
else if ($slot == 13 || $slot = 11) // special case
$temp[] = $item;
else

View File

@@ -110,7 +110,7 @@ function objects(array $ids = [])
{
$newMax = max(array_column($objects, 'entry'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;

View File

@@ -160,7 +160,7 @@ function quests(array $ids = [])
{
$newMax = max(array_column($quests, 'ID'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;

View File

@@ -46,7 +46,7 @@ function sounds(/*array $ids = [] */)
/* M A I N */
/***********/
CLISetup::log(' - sounds main data');
CLI::write(' - sounds main data');
// file extraction and conversion manually
// moving files in build step. data here is purely structural
@@ -74,7 +74,7 @@ function sounds(/*array $ids = [] */)
{
$newMax = max(array_column($sounds, 'id'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;
@@ -94,7 +94,7 @@ function sounds(/*array $ids = [] */)
$hasDupes = false;
for ($i = 1; $i < 11; $i++)
{
$nicePath = CLISetup::nicePath($s['soundFile'.$i], $s['path']);
$nicePath = CLI::nicePath($s['soundFile'.$i], $s['path']);
if ($s['soundFile'.$i] && array_key_exists($nicePath, $soundIndex))
{
$s['soundFile'.$i] = $soundIndex[$nicePath];
@@ -131,7 +131,7 @@ function sounds(/*array $ids = [] */)
// i call bullshit
else if ($s['soundFile'.$i])
{
CLISetup::log(' - sound group #'.$s['id'].' "'.$s['name'].'" has invalid sound file "'.$s['soundFile'.$i].'" on index '.$i.'! Skipping...', CLISetup::LOG_WARN);
CLI::write(' - sound group #'.$s['id'].' "'.$s['name'].'" has invalid sound file "'.$s['soundFile'.$i].'" on index '.$i.'! Skipping...', CLI::LOG_WARN);
$s['soundFile'.$i] = null;
}
// empty case
@@ -141,7 +141,7 @@ function sounds(/*array $ids = [] */)
if (!$fileSets && !$hasDupes)
{
CLISetup::log(' - sound group #'.$s['id'].' "'.$s['name'].'" contains no sound files! Skipping...', CLISetup::LOG_WARN);
CLI::write(' - sound group #'.$s['id'].' "'.$s['name'].'" contains no sound files! Skipping...', CLI::LOG_WARN);
continue;
}
else if ($fileSets)
@@ -160,7 +160,7 @@ function sounds(/*array $ids = [] */)
/* VocalUI Sounds */
/******************/
CLISetup::log(' - linking to race');
CLI::write(' - linking to race');
DB::Aowow()->query('TRUNCATE ?_races_sounds');
DB::Aowow()->query('INSERT IGNORE INTO ?_races_sounds SELECT raceId, soundIdMale, 1 FROM dbc_vocaluisounds WHERE soundIdMale <> soundIdFemale AND soundIdMale > 0');
@@ -173,7 +173,7 @@ function sounds(/*array $ids = [] */)
/* Emote Sound */
/***************/
CLISetup::log(' - linking to emotes');
CLI::write(' - linking to emotes');
DB::Aowow()->query('TRUNCATE ?_emotes_sounds');
DB::Aowow()->query('INSERT IGNORE INTO ?_emotes_sounds SELECT emotesTextId, raceId, gender + 1, soundId FROM dbc_emotestextsound');
@@ -183,7 +183,7 @@ function sounds(/*array $ids = [] */)
/* Creature Sounds */
/*******************/
CLISetup::log(' - linking to creatures');
CLI::write(' - linking to creatures');
// currently ommitting:
// * footsteps (matrix of: creature + terrain + humidity)
@@ -240,7 +240,7 @@ function sounds(/*array $ids = [] */)
/* Spell Sounds */
/****************/
CLISetup::log(' - linking to spells');
CLI::write(' - linking to spells');
// issues: (probably because of 335-data)
// * animate is probably wrong
@@ -300,7 +300,7 @@ function sounds(/*array $ids = [] */)
/* Zone Sounds */
/***************/
CLISetup::log(' - linking to zones');
CLI::write(' - linking to zones');
// omiting data from WMOAreaTable, as its at the moment impossible to link to actual zones
@@ -358,7 +358,7 @@ function sounds(/*array $ids = [] */)
/* Item Sounds */
/***************/
CLISetup::log(' - linking to items');
CLI::write(' - linking to items');
DB::Aowow()->query('
UPDATE

View File

@@ -112,11 +112,11 @@ function source(array $ids = [])
/* Item & inherited Spells */
/***************************/
CLISetup::log(' - Items & Spells [inherited]');
CLI::write(' - Items & Spells [inherited]');
# also everything from items that teach spells, is src of spell
# todo: check if items have learn-spells (effect: 36)
CLISetup::log(' * resolve ref-loot tree');
CLI::write(' * resolve ref-loot tree');
$refLoot = DB::World()->select('
SELECT
rlt.Entry AS ARRAY_KEY,
@@ -163,7 +163,7 @@ function source(array $ids = [])
###############
# 1: Crafted #
###############
CLISetup::log(' * #1 Crafted');
CLI::write(' * #1 Crafted');
$spellBuff = [];
$itemBuff = [];
@@ -204,7 +204,7 @@ function source(array $ids = [])
############
# 2: Drop #
############
CLISetup::log(' * #2 Drop');
CLI::write(' * #2 Drop');
$spellBuff = [];
$itemBuff = [];
@@ -346,7 +346,7 @@ function source(array $ids = [])
###########
# 3: PvP # (Vendors w/ xCost Arena/Honor)
###########
CLISetup::log(' * #3 PvP');
CLI::write(' * #3 PvP');
// var g_sources_pvp = {
// 1: 'Arena',
@@ -391,7 +391,7 @@ function source(array $ids = [])
#############
# 4: Quest #
#############
CLISetup::log(' * #4 Quest');
CLI::write(' * #4 Quest');
$spellBuff = [];
$itemBuff = [];
@@ -473,7 +473,7 @@ function source(array $ids = [])
##############
# 5: Vendor # (w/o xCost Arena/Honor)
##############
CLISetup::log(' * #5 Vendor');
CLI::write(' * #5 Vendor');
$spellBuff = [];
$itemBuff = [];
@@ -507,7 +507,7 @@ function source(array $ids = [])
###############
# 10: Starter #
###############
CLISetup::log(' * #10 Starter');
CLI::write(' * #10 Starter');
if ($pcii = DB::World()->select('SELECT ?d, itemid, 1 FROM playercreateinfo_item', TYPE_ITEM))
DB::Aowow()->query(queryfy('[V]', $pcii, $insBasic), 10, 10, 10);
@@ -519,7 +519,7 @@ function source(array $ids = [])
###################
# 12: Achievement #
###################
CLISetup::log(' * #12 Achievement');
CLI::write(' * #12 Achievement');
$spellBuff = [];
$itemBuff = [];
@@ -581,7 +581,7 @@ function source(array $ids = [])
####################
# 15: Disenchanted #
####################
CLISetup::log(' * #15 Disenchanted');
CLI::write(' * #15 Disenchanted');
$spellBuff = [];
$itemBuff = [];
@@ -634,7 +634,7 @@ function source(array $ids = [])
##############
# 16: Fished #
##############
CLISetup::log(' * #16 Fished');
CLI::write(' * #16 Fished');
$spellBuff = [];
$itemBuff = [];
@@ -685,7 +685,7 @@ function source(array $ids = [])
################
# 17: Gathered #
################
CLISetup::log(' * #17 Gathered');
CLI::write(' * #17 Gathered');
$spellBuff = [];
$itemBuff = [];
@@ -740,7 +740,7 @@ function source(array $ids = [])
##############
# 18: Milled #
##############
CLISetup::log(' * #18 Milled');
CLI::write(' * #18 Milled');
$spellBuff = [];
$itemBuff = [];
@@ -791,7 +791,7 @@ function source(array $ids = [])
#############
# 19: Mined #
#############
CLISetup::log(' * #19 Mined');
CLI::write(' * #19 Mined');
$spellBuff = [];
$itemBuff = [];
@@ -846,7 +846,7 @@ function source(array $ids = [])
##################
# 20: Prospected #
##################
CLISetup::log(' * #20 Prospected');
CLI::write(' * #20 Prospected');
$spellBuff = [];
$itemBuff = [];
@@ -897,7 +897,7 @@ function source(array $ids = [])
##################
# 21: Pickpocket #
##################
CLISetup::log(' * #21 Pickpocket');
CLI::write(' * #21 Pickpocket');
$spellBuff = [];
$itemBuff = [];
@@ -947,7 +947,7 @@ function source(array $ids = [])
################
# 22: Salvaged #
################
CLISetup::log(' * #22 Salvaged');
CLI::write(' * #22 Salvaged');
$spellBuff = [];
$itemBuff = [];
@@ -998,7 +998,7 @@ function source(array $ids = [])
###############
# 23: Skinned #
###############
CLISetup::log(' * #23 Skinned');
CLI::write(' * #23 Skinned');
$spellBuff = [];
$itemBuff = [];
@@ -1054,10 +1054,10 @@ function source(array $ids = [])
/* Spell */
/*********/
CLISetup::log(' - Spells [original]');
CLI::write(' - Spells [original]');
# 4: Quest
CLISetup::log(' * #4 Quest');
CLI::write(' * #4 Quest');
$quests = DB::World()->select('
SELECT spell AS ARRAY_KEY, id, SUM(qty) AS qty, BIT_OR(side) AS side FROM (
SELECT IF(RewardSpell = 0, RewardDisplaySpell, RewardSpell) AS spell, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE IF(RewardSpell = 0, RewardDisplaySpell, RewardSpell) > 0 GROUP BY spell
@@ -1085,7 +1085,7 @@ function source(array $ids = [])
}
# 6: Trainer
CLISetup::log(' * #6 Trainer');
CLI::write(' * #6 Trainer');
if ($tNpcs = DB::World()->select('SELECT SpellID AS ARRAY_KEY, ID AS entry, COUNT(1) AS qty FROM npc_trainer WHERE SpellID > 0 GROUP BY ARRAY_KEY'))
{
$tSpells = DB::Aowow()->select('SELECT id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE id IN (?a)', array_keys($tNpcs));
@@ -1118,13 +1118,13 @@ function source(array $ids = [])
}
# 7: Discovery
CLISetup::log(' * #7 Discovery');
CLI::write(' * #7 Discovery');
// 61756: Northrend Inscription Research (FAST QA VERSION);
if ($disco = DB::World()->select('SELECT ?d, spellId, 1 FROM skill_discovery_template WHERE reqSpell <> ?d', TYPE_SPELL, 61756))
DB::Aowow()->query(queryfy('[V]', $disco, $insBasic), 7, 7, 7);
# 9: Talent
CLISetup::log(' * #9 Talent');
CLI::write(' * #9 Talent');
$tSpells = DB::Aowow()->select('
SELECT s.id AS ARRAY_KEY, s.effect1Id, s.effect2Id, s.effect3Id, s.effect1TriggerSpell, s.effect2TriggerSpell, s.effect3TriggerSpell
FROM dbc_talent t
@@ -1136,7 +1136,7 @@ function source(array $ids = [])
$buff = [];
while ($tSpells)
{
CLISetup::log(' - '.++$n.'. pass');
CLI::write(' - '.++$n.'. pass');
$recurse = [];
foreach ($tSpells as $tId => $spell)
@@ -1161,7 +1161,7 @@ function source(array $ids = [])
DB::Aowow()->query(queryfy('[V]', $buff, $insBasic), 9, 9, 9);
# 10: Starter
CLISetup::log(' * #10 Starter');
CLI::write(' * #10 Starter');
/* acquireMethod
ABILITY_LEARNED_ON_GET_PROFESSION_SKILL = 1, learnedAt = 1 && source10 = 1
ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL = 2
@@ -1176,15 +1176,15 @@ function source(array $ids = [])
/* Titles */
/**********/
CLISetup::log(' - Titles');
CLI::write(' - Titles');
# 4: Quest
CLISetup::log(' * #4 Quest');
CLI::write(' * #4 Quest');
if ($quests = DB::World()->select('SELECT ?d, RewardTitle, 1, ?d, ID FROM quest_template WHERE RewardTitle > 0', TYPE_TITLE, TYPE_QUEST))
DB::Aowow()->query(queryfy('[V]', $quests, $insMore), 4, 4, 4);
# 12: Achievement
CLISetup::log(' * #12 Achievement');
CLI::write(' * #12 Achievement');
$sets = DB::World()->select('
SELECT titleId AS ARRAY_KEY, MIN(ID) AS srcId, NULLIF(MAX(ID), MIN(ID)) AS altSrcId FROM (
SELECT TitleA AS `titleId`, ID FROM achievement_reward WHERE TitleA <> 0
@@ -1201,7 +1201,7 @@ function source(array $ids = [])
}
# 13: Source-String
CLISetup::log(' * #13 cuStrings');
CLI::write(' * #13 cuStrings');
$src13 = [null, 42, 52, 71, 80, 157, 163, 167, 169, 177];
foreach ($src13 as $src => $tId)
if ($tId)

View File

@@ -92,31 +92,31 @@ function spawns() // and waypoints
$query[1] = ['SELECT c.guid, 1 AS "type", c.id AS typeId, c.spawntimesecs AS respawn, c.phaseMask, c.zoneId AS areaId, c.map, IFNULL(ca.path_id, 0) AS pathId, c.position_y AS `posX`, c.position_x AS `posY` ' .
'FROM creature c LEFT JOIN creature_addon ca ON ca.guid = c.guid',
' - assembling '.CLISetup::bold('creature').' spawns'];
' - assembling '.CLI::bold('creature').' spawns'];
$query[2] = ['SELECT c.guid, 2 AS "type", c.id AS typeId, ABS(c.spawntimesecs) AS respawn, c.phaseMask, c.zoneId AS areaId, c.map, 0 as pathId, c.position_y AS `posX`, c.position_x AS `posY` ' .
'FROM gameobject c',
' - assembling '.CLISetup::bold('gameobject').' spawns'];
' - assembling '.CLI::bold('gameobject').' spawns'];
$query[3] = ['SELECT id AS "guid", 19 AS "type", soundId AS typeId, 0 AS respawn, 0 AS phaseMask, 0 AS areaId, mapId AS "map", 0 AS pathId, posX, posY ' .
'FROM dbc_soundemitters',
' - assembling '.CLISetup::bold('sound emitter').' spawns'];
' - assembling '.CLI::bold('sound emitter').' spawns'];
$query[4] = ['SELECT id AS "guid", 503 AS "type", id AS typeId, 0 AS respawn, 0 AS phaseMask, 0 AS areaId, mapId AS "map", 0 AS pathId, posX, posY ' .
'FROM dbc_areatrigger',
' - assembling '.CLISetup::bold('areatrigger').' spawns'];
' - assembling '.CLI::bold('areatrigger').' spawns'];
$query[5] = ['SELECT c.guid, w.entry AS "npcOrPath", w.pointId AS "point", c.zoneId AS areaId, c.map, w.waittime AS "wait", w.location_y AS `posX`, w.location_x AS `posY` ' .
'FROM creature c JOIN script_waypoint w ON c.id = w.entry',
' - assembling waypoints from '.CLISetup::bold('script_waypoint')];
' - assembling waypoints from '.CLI::bold('script_waypoint')];
$query[6] = ['SELECT c.guid, w.entry AS "npcOrPath", w.pointId AS "point", c.zoneId AS areaId, c.map, 0 AS "wait", w.position_y AS `posX`, w.position_x AS `posY` ' .
'FROM creature c JOIN waypoints w ON c.id = w.entry',
' - assembling waypoints from '.CLISetup::bold('waypoints')];
' - assembling waypoints from '.CLI::bold('waypoints')];
$query[7] = ['SELECT c.guid, -w.id AS "npcOrPath", w.point, c.zoneId AS areaId, c.map, w.delay AS "wait", w.position_y AS `posX`, w.position_x AS `posY` ' .
'FROM creature c JOIN creature_addon ca ON ca.guid = c.guid JOIN waypoint_data w ON w.id = ca.path_id WHERE ca.path_id <> 0',
' - assembling waypoints from '.CLISetup::bold('waypoint_data')];
' - assembling waypoints from '.CLI::bold('waypoint_data')];
$queryPost = 'SELECT dm.id, wma.areaId, IFNULL(dm.floor, 0) AS floor, ' .
'100 - ROUND(IF(dm.id IS NOT NULL, (?f - dm.minY) * 100 / (dm.maxY - dm.minY), (?f - wma.right) * 100 / (wma.left - wma.right)), 1) AS `posX`, ' .
@@ -153,7 +153,7 @@ function spawns() // and waypoints
foreach ($query as $idx => $q)
{
CLISetup::log($q[1]);
CLI::write($q[1]);
$n = 0;
$sum = 0;
@@ -166,7 +166,7 @@ function spawns() // and waypoints
foreach ($queryResult as $spawn)
{
if (!$n)
CLISetup::log(' * sets '.($sum + 1).' - '.($sum += SqlGen::$stepSize));
CLI::write(' * sets '.($sum + 1).' - '.($sum += SqlGen::$stepSize));
if ($n++ > SqlGen::$stepSize)
$n = 0;
@@ -187,7 +187,7 @@ function spawns() // and waypoints
if (!$points) // still impossible (there are areas that are intentionally off the map (e.g. the isles south of tanaris))
{
CLISetup::log('GUID '.$spawn['guid'].($idx < 5 ? '' : ' on path/point '.$spawn['npcOrPath'].'/'.$spawn['point']).' could not be matched to displayable area [A:'.$spawn['areaId'].'; X:'.$spawn['posY'].'; Y:'.$spawn['posX'].']', CLISetup::LOG_WARN);
CLI::write('GUID '.$spawn['guid'].($idx < 5 ? '' : ' on path/point '.$spawn['npcOrPath'].'/'.$spawn['point']).' could not be matched to displayable area [A:'.$spawn['areaId'].'; X:'.$spawn['posY'].'; Y:'.$spawn['posX'].']', CLI::LOG_WARN);
continue;
}
@@ -267,10 +267,10 @@ function spawns() // and waypoints
}
}
if ($matches)
CLISetup::log(' * assigned '.$matches.' accessories on '.++$n.'. pass on vehicle accessories');
CLI::write(' * assigned '.$matches.' accessories on '.++$n.'. pass on vehicle accessories');
}
if ($accessories)
CLISetup::log(count($accessories).' accessories could not be fitted onto a spawned vehicle.', CLISetup::LOG_WARN);
CLI::write(count($accessories).' accessories could not be fitted onto a spawned vehicle.', CLI::LOG_WARN);
/********************************/

View File

@@ -222,12 +222,12 @@ function spell()
// merge serverside spells into dbc_spell (should not affect other scripts)
$lastMax = 0;
CLISetup::log(' - merging serverside spells into spell.dbc');
CLI::write(' - merging serverside spells into spell.dbc');
while ($spells = DB::World()->select($ssQuery, $lastMax, SqlGen::$stepSize))
{
$newMax = max(array_column($spells, 'id'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;
@@ -240,12 +240,12 @@ function spell()
// merge everything into aowow_spell
$lastMax = 0;
CLISetup::log(' - filling aowow_spell');
CLI::write(' - filling aowow_spell');
while ($spells = DB::Aowow()->select($baseQuery, $lastMax, SqlGen::$stepSize))
{
$newMax = max(array_column($spells, 'id'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
CLI::write(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;
@@ -286,7 +286,7 @@ function spell()
ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL = 2 not used for now
*/
CLISetup::log(' - linking with skillineability');
CLI::write(' - linking with skillineability');
$results = DB::Aowow()->select('SELECT spellId AS ARRAY_KEY, id AS ARRAY_KEY2, skillLineId, reqRaceMask, reqClassMask, reqSkillLevel, acquireMethod, skillLevelGrey, skillLevelYellow FROM dbc_skilllineability sla');
foreach ($results as $spellId => $sets)
@@ -445,7 +445,7 @@ function spell()
/* talent related */
/******************/
CLISetup::log(' - linking with talent');
CLI::write(' - linking with talent');
for ($i = 1; $i < 6; $i++)
{
@@ -467,7 +467,7 @@ function spell()
/* Other */
/*********/
CLISetup::log(' - misc fixups & icons');
CLI::write(' - misc fixups & icons');
// FU [FixUps]
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', 1 << 10, 760); // Draenai Racials
@@ -529,7 +529,7 @@ function spell()
/* Categories */
/**************/
CLISetup::log(' - applying categories');
CLI::write(' - applying categories');
// player talents (-2)
DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -2 WHERE t.tabId NOT IN (409, 410, 411) AND (s.id = t.rank1 OR s.id = t.rank2 OR s.id = t.rank3 OR s.id = t.rank4 OR s.id = t.rank5)');
@@ -645,7 +645,7 @@ function spell()
/* Glyphs */
/**********/
CLISetup::log(' - fixing glyph data');
CLI::write(' - fixing glyph data');
// glyphSpell => affectedSpell
$glyphAffects = array(
@@ -754,7 +754,7 @@ function spell()
if ($icons)
DB::Aowow()->query('UPDATE ?_spell s SET s.skillLine1 = ?d, s.iconIdAlt = ?d WHERE s.id = ?d', $icons['skill'], $icons['icon'], $applyId);
else
CLISetup::log('could not match '.$glyphEffect['name_loc0'].' ('.$glyphEffect['id'].') with affected spells', CLISetup::LOG_WARN);
CLI::write('could not match '.$glyphEffect['name_loc0'].' ('.$glyphEffect['id'].') with affected spells', CLI::LOG_WARN);
}
// hide unused glyphs

View File

@@ -151,7 +151,7 @@ function taxi() // path & nodes
{
if (empty($n['faction']))
{
CLISetup::log(' - ['.$n['id'].'] "'.$n['name_loc0'].'" has no NPC assigned ... skipping', CLISetup::LOG_WARN);
CLI::write(' - ['.$n['id'].'] "'.$n['name_loc0'].'" has no NPC assigned ... skipping', CLI::LOG_WARN);
continue;
}