From b0444883087932025d995ef1818feca3f46fecb7 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 18 May 2020 20:00:27 +0200 Subject: [PATCH] Profiler/Recipes * _really_ fix learning starter recipes per skill attempted in 96bbe326a87d2f826a3bac4cfd21a06e1d5c2c56 --- includes/profiler.class.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/includes/profiler.class.php b/includes/profiler.class.php index aec7039f..7c6457c3 100644 --- a/includes/profiler.class.php +++ b/includes/profiler.class.php @@ -561,7 +561,19 @@ class Profiler 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]));