Skip to content

Commit

Permalink
Profiler/Recipes
Browse files Browse the repository at this point in the history
 * _really_ fix learning starter recipes per skill attempted in 96bbe32
  • Loading branch information
Sarjuuk committed May 18, 2020
1 parent a1d3be8 commit b044488
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion includes/profiler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,19 @@ public static function getCharFromRealm($realmId, $charGuid)
if ($skills)
{
// apply auto-learned trade skills
DB::Aowow()->query('INSERT INTO ?_profiler_completion SELECT ?d, ?d, spellId, NULL, NULL FROM dbc_skilllineability WHERE id IN (?a)', $profileId, TYPE_SPELL, array_column($skills, 'typeId'));
DB::Aowow()->query('
INSERT INTO ?_profiler_completion
SELECT ?d, ?d, spellId, NULL, NULL
FROM dbc_skilllineability
WHERE skillLineId IN (?a) AND
acquireMethod = 1 AND
(reqRaceMask = 0 OR reqRaceMask & ?d) AND
(reqClassMask = 0 OR reqClassMask & ?d)',
$profileId, TYPE_SPELL,
array_column($skills, 'typeId'),
1 << ($char['race'] - 1),
1 << ($char['class'] - 1)
);

foreach (Util::createSqlBatchInsert($skills) as $sk)
DB::Aowow()->query('INSERT INTO ?_profiler_completion (?#) VALUES '.$sk, array_keys($skills[0]));
Expand Down

0 comments on commit b044488

Please sign in to comment.