From d3c5011694d538034e3fead3dbbb01ae08ea65b9 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 14 Feb 2020 16:22:24 +0100 Subject: [PATCH] Achievements * update db structure for https://github.com/TrinityCore/TrinityCore/commit/352c4a4c680 --- includes/types/achievement.class.php | 2 +- setup/tools/sqlgen/mailtemplate.func.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/types/achievement.class.php b/includes/types/achievement.class.php index 88e51726..3ca00e35 100644 --- a/includes/types/achievement.class.php +++ b/includes/types/achievement.class.php @@ -37,7 +37,7 @@ class AchievementList extends BaseType SELECT ar.ID AS ARRAY_KEY, ar.TitleA, ar.TitleH, ar.ItemID, ar.Sender AS sender, ar.MailTemplateID, ar.Subject AS subject_loc0, IFNULL(arl2.Subject, "") AS subject_loc2, IFNULL(arl3.Subject, "") AS subject_loc3, IFNULL(arl4.Subject, "") AS subject_loc4, IFNULL(arl6.Subject, "") AS subject_loc6, IFNULL(arl8.Subject, "") AS subject_loc8, - ar.Text AS text_loc0, IFNULL(arl2.Text, "") AS text_loc2, IFNULL(arl3.Text, "") AS text_loc3, IFNULL(arl4.Text, "") AS text_loc4, IFNULL(arl6.Text, "") AS text_loc6, IFNULL(arl8.Text, "") AS text_loc8 + ar.Body AS text_loc0, IFNULL(arl2.Body, "") AS text_loc2, IFNULL(arl3.Body, "") AS text_loc3, IFNULL(arl4.Body, "") AS text_loc4, IFNULL(arl6.Body, "") AS text_loc6, IFNULL(arl8.Body, "") AS text_loc8 FROM achievement_reward ar LEFT JOIN diff --git a/setup/tools/sqlgen/mailtemplate.func.php b/setup/tools/sqlgen/mailtemplate.func.php index cb5ad3b7..243c975f 100644 --- a/setup/tools/sqlgen/mailtemplate.func.php +++ b/setup/tools/sqlgen/mailtemplate.func.php @@ -26,7 +26,7 @@ SqlGen::register(new class extends SetupScript SELECT -ar.ID, IFNULL(ar.Subject, "") AS s0, IFNULL(arl2.Subject, "") AS s2, IFNULL(arl3.Subject, "") AS s3, IFNULL(arl4.Subject, "") AS s4, IFNULL(arl6.Subject, "") AS s6, IFNULL(arl8.Subject, "") AS s8, - IFNULL(ar.Text, "") AS t0, IFNULL(arl2.Text, "") AS t2, IFNULL(arl3.Text, "") AS t3, IFNULL(arl4.Text, "") AS t4, IFNULL(arl6.Text, "") AS t6, IFNULL(arl8.Text, "") AS t8, + IFNULL(ar.Body, "") AS t0, IFNULL(arl2.Body, "") AS t2, IFNULL(arl3.Body, "") AS t3, IFNULL(arl4.Body, "") AS t4, IFNULL(arl6.Body, "") AS t6, IFNULL(arl8.Body, "") AS t8, ItemID FROM achievement_reward ar @@ -41,7 +41,7 @@ SqlGen::register(new class extends SetupScript LEFT JOIN achievement_reward_locale arl8 ON ar.ID = arl8.ID AND arl8.Locale = "ruRU" WHERE - ar.MailTemplateID = 0 AND ar.Text <> "" + ar.MailTemplateID = 0 AND ar.Body <> "" '); DB::Aowow()->query('INSERT INTO aowow_mails VALUES (?a)', array_values($acvMail));