From 569c9efca4b9368013c1bec49a810fb202ef480c Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Thu, 31 Jul 2025 18:02:32 +0200 Subject: [PATCH] Setup/Source * fix copy/paste error breaking item - pvp source query --- setup/tools/sqlgen/source.ss.php | 6 +++--- setup/updates/1753977720_01.sql | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 setup/updates/1753977720_01.sql diff --git a/setup/tools/sqlgen/source.ss.php b/setup/tools/sqlgen/source.ss.php index 8d5101eb..a5ccf499 100644 --- a/setup/tools/sqlgen/source.ss.php +++ b/setup/tools/sqlgen/source.ss.php @@ -413,9 +413,9 @@ CLISetup::registerSetup("sql", new class extends SetupScript ); $vendorQuery = 'SELECT n.`item`, SUM(n.`qty`) AS "qty", it.`class`, it.`subclass`, it.`spellid_1`, it.`spelltrigger_1`, it.`spellid_2`, it.`spelltrigger_2` - FROM (SELECT `item`, COUNT(1) AS "qty" FROM npc_vendor WHERE `ExtendedCost` NOT IN (?a) AND `item` > 0 GROUP BY `item` UNION - SELECT nv2.`item`, COUNT(1) AS "qty" FROM npc_vendor nv1 JOIN npc_vendor nv2 ON nv2.`entry` = -nv1.`item` AND nv1.`item` < 0 WHERE nv1.`ExtendedCost` NOT IN (?a) AND `nv1`.`item` < 0 GROUP BY `item` UNION - SELECT `item`, COUNT(1) AS "qty" FROM game_event_npc_vendor genv JOIN creature c ON c.`guid` = genv.`guid` WHERE `ExtendedCost` NOT IN (?a) GROUP BY `item`) n + FROM (SELECT `item`, COUNT(1) AS "qty" FROM npc_vendor WHERE `ExtendedCost` IN (?a) AND `item` > 0 GROUP BY `item` UNION + SELECT nv2.`item`, COUNT(1) AS "qty" FROM npc_vendor nv1 JOIN npc_vendor nv2 ON nv2.`entry` = -nv1.`item` AND nv1.`item` < 0 WHERE nv1.`ExtendedCost` IN (?a) AND `nv1`.`item` < 0 GROUP BY `item` UNION + SELECT `item`, COUNT(1) AS "qty" FROM game_event_npc_vendor genv JOIN creature c ON c.`guid` = genv.`guid` WHERE `ExtendedCost` IN (?a) GROUP BY `item`) n JOIN item_template it ON it.`entry` = n.`item` GROUP BY `item`'; diff --git a/setup/updates/1753977720_01.sql b/setup/updates/1753977720_01.sql new file mode 100644 index 00000000..bef0e1a9 --- /dev/null +++ b/setup/updates/1753977720_01.sql @@ -0,0 +1 @@ +UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' source');