Profiler/Achievementpoints

* remove redundant total calculation as it is already stored with the profile
 * do not include statistic in sum calculation. (ffs why do they even have points assigned)
This commit is contained in:
Sarjuuk
2023-06-03 22:58:42 +02:00
parent eca3e09482
commit 73dd745fe8
3 changed files with 5 additions and 8 deletions

View File

@@ -750,9 +750,6 @@ class LocalProfileList extends ProfileList
$realms = Profiler::getRealms();
// post processing
$acvPoints = DB::Aowow()->selectCol('SELECT pc.id AS ARRAY_KEY, SUM(a.points) FROM ?_profiler_completion pc LEFT JOIN ?_achievement a ON a.id = pc.typeId WHERE pc.`type` = ?d AND pc.id IN (?a) GROUP BY pc.id', Type::ACHIEVEMENT, $this->getFoundIDs());
foreach ($this->iterate() as $id => &$curTpl)
{
if ($curTpl['realm'] && !isset($realms[$curTpl['realm']]))
@@ -766,8 +763,6 @@ class LocalProfileList extends ProfileList
// battlegroup
$curTpl['battlegroup'] = CFG_BATTLEGROUP;
$curTpl['achievementpoints'] = isset($acvPoints[$id]) ? $acvPoints[$id] : 0;
}
}