Profiler/Fixup

* fix achievementpoint total being the sum of both factions
This commit is contained in:
Sarjuuk 2026-04-09 20:17:51 +02:00
parent 725686d1cd
commit 9fc6f7896e
2 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1 @@
UPDATE `aowow_dbversion` SET `build` = CONCAT(IFNULL(`build`, ''), ' profiler');

View file

@ -329,7 +329,7 @@ CLISetup::registerSetup("build", new class extends SetupScript
{
$condition = array(
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
[['flags', 1, '&'], 0], // no statistics
[['flags', 1, '&'], 0], // no statistics
);
$achievez = new AchievementList($condition);
@ -343,8 +343,10 @@ CLISetup::registerSetup("build", new class extends SetupScript
$buff = "var _ = g_achievements;\n";
foreach ($achievez->getListviewData(ACHIEVEMENTINFO_PROFILE) as $id => $data)
{
$sumPoints += $data['points'];
$buff .= '_['.$id.'] = '.Util::toJSON($data).";\n";
if ($data['side'] & SIDE_ALLIANCE) // both sides have the same point total
$sumPoints += $data['points'];
$buff .= '_['.$id.'] = '.Util::toJSON($data).";\n";
}
// categories to sort by