From 9fc6f7896e89b3fc66af360064a1d34b0ce25962 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 9 Apr 2026 20:17:51 +0200 Subject: [PATCH] Profiler/Fixup * fix achievementpoint total being the sum of both factions --- setup/sql/updates/1775758635_01.sql | 1 + setup/tools/filegen/profiler.ss.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 setup/sql/updates/1775758635_01.sql diff --git a/setup/sql/updates/1775758635_01.sql b/setup/sql/updates/1775758635_01.sql new file mode 100644 index 00000000..6d163b57 --- /dev/null +++ b/setup/sql/updates/1775758635_01.sql @@ -0,0 +1 @@ +UPDATE `aowow_dbversion` SET `build` = CONCAT(IFNULL(`build`, ''), ' profiler'); diff --git a/setup/tools/filegen/profiler.ss.php b/setup/tools/filegen/profiler.ss.php index b653f22b..835e229e 100644 --- a/setup/tools/filegen/profiler.ss.php +++ b/setup/tools/filegen/profiler.ss.php @@ -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