From f3f8dacef9f51c7dc6df5a2f564baac083525558 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 19 Nov 2021 20:30:16 +0100 Subject: [PATCH] Profiler/Talents (#315) * fix usage of active talent spec --- includes/profiler.class.php | 4 ++-- includes/types/profile.class.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/profiler.class.php b/includes/profiler.class.php index 1b582ea9..315a0068 100644 --- a/includes/profiler.class.php +++ b/includes/profiler.class.php @@ -404,7 +404,7 @@ class Profiler 'talentbuild2' => '', 'glyphs1' => '', 'glyphs2' => '', - 'activespec' => $char['activespec'], + 'activespec' => $char['activeTalentGroup'], 'guild' => null, 'guildRank' => null, 'gearscore' => 0, @@ -431,7 +431,7 @@ class Profiler { $_ = DB::Aowow()->selectCol('SELECT spell AS ARRAY_KEY, MAX(IF(spell IN (?a), `rank`, 0)) FROM ?_talents WHERE class = ?d AND tab = ?d GROUP BY id ORDER BY row, col ASC', !empty($t[$i]) ? $t[$i] : [0], $char['class'], $j); $data['talentbuild'.($i + 1)] .= implode('', $_); - if ($char['activespec'] == $i) + if ($data['activespec'] == $i) $data['talenttree'.($j + 1)] = array_sum($_); } diff --git a/includes/types/profile.class.php b/includes/types/profile.class.php index 72f39728..e5c72be1 100644 --- a/includes/types/profile.class.php +++ b/includes/types/profile.class.php @@ -584,6 +584,7 @@ class RemoteProfileList extends ProfileList // talent points pre $talentLookup[$r][$g] = []; $talentSpells[] = $curTpl['class']; + $curTpl['activespec'] = $curTpl['activeTalentGroup']; // equalize distribution if ($limit != CFG_SQL_LIMIT_NONE)