From 7412a518a5de194517671a9a54996bf7faf3da2c Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 19 Jun 2024 02:52:43 +0200 Subject: [PATCH] Setup/Classes * fix skill aggregate * ya cant sum strings, ya dummy --- setup/tools/sqlgen/classes.func.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/tools/sqlgen/classes.func.php b/setup/tools/sqlgen/classes.func.php index 7860618f..c3fb703f 100644 --- a/setup/tools/sqlgen/classes.func.php +++ b/setup/tools/sqlgen/classes.func.php @@ -24,8 +24,9 @@ SqlGen::register(new class extends SetupScript Util::arraySumByKey($classes, $races); // add skills - $skills = DB::Aowow()->select('SELECT LOG(2, classMask) + 1 AS ARRAY_KEY, GROUP_CONCAT(skillLine SEPARATOR \' \') AS skills FROM dbc_skillraceclassinfo WHERE flags = 1040 GROUP BY classMask HAVING ARRAY_KEY = CAST(LOG(2, classMask) + 1 AS SIGNED)'); - Util::arraySumByKey($classes, $skills); + if ($skills = DB::Aowow()->selectCol('SELECT LOG(2, classMask) + 1 AS ARRAY_KEY, GROUP_CONCAT(skillLine SEPARATOR \' \') FROM dbc_skillraceclassinfo WHERE flags = ?d GROUP BY classMask HAVING ARRAY_KEY = CAST(LOG(2, classMask) + 1 AS SIGNED)', 0x410)) + foreach ($skills as $classId => $skillStr) + $classes[$classId]['skills'] = $skillStr; // add weaponTypeMask & armorTypeMask foreach ($classes as $id => &$data)