mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Profiler/Prep:
* misc changes from profiler branch. No real changes on its own
This commit is contained in:
@@ -20,14 +20,13 @@ if (!CLI)
|
||||
|
||||
foreach ($scales as $s)
|
||||
{
|
||||
$weights = DB::Aowow()->selectCol('SELECT field AS ARRAY_KEY, val FROM ?_account_weightscale_data WHERE id = ?d', $s['id']);
|
||||
if (!$weights)
|
||||
if ($weights = DB::Aowow()->selectCol('SELECT field AS ARRAY_KEY, val FROM ?_account_weightscale_data WHERE id = ?d', $s['id']))
|
||||
$wtPresets[$s['class']]['pve'][$s['name']] = array_merge(['__icon' => $s['icon']], $weights);
|
||||
else
|
||||
{
|
||||
CLISetup::log('WeightScale \''.CLISetup::bold($s['name']).'\' has no data set. Skipping...', CLISetup::LOG_WARN);
|
||||
continue;
|
||||
$wtPresets[$s['class']]['pve'][$s['name']] = ['__icon' => $s['icon']];
|
||||
}
|
||||
|
||||
$wtPresets[$s['class']]['pve'][$s['name']] = array_merge(['__icon' => $s['icon']], $weights);
|
||||
}
|
||||
|
||||
$toFile = "var wt_presets = ".Util::toJSON($wtPresets).";";
|
||||
|
||||
@@ -15,10 +15,25 @@ function talents()
|
||||
{
|
||||
// class: 0 => hunter pets
|
||||
for ($i = 1; $i < 6; $i++)
|
||||
DB::Aowow()->query(
|
||||
'REPLACE INTO ?_talents SELECT t.id, IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0), IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber), t.row, t.column, t.rank?d, ?d FROM dbc_talenttab tt JOIN dbc_talent t ON tt.id = t.tabId WHERE t.rank?d <> 0',
|
||||
$i, $i, $i
|
||||
);
|
||||
DB::Aowow()->query('
|
||||
REPLACE INTO
|
||||
?_talents
|
||||
SELECT
|
||||
t.id,
|
||||
IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0),
|
||||
tt.creatureFamilyMask,
|
||||
IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber),
|
||||
t.row,
|
||||
t.column,
|
||||
t.rank?d,
|
||||
?d
|
||||
FROM
|
||||
dbc_talenttab tt
|
||||
JOIN
|
||||
dbc_talent t ON tt.id = t.tabId
|
||||
WHERE
|
||||
t.rank?d <> 0
|
||||
', $i, $i, $i);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user