From ca228f2ebcaa748097d7109c635dd34de0bb4021 Mon Sep 17 00:00:00 2001 From: Helias Date: Sun, 8 Sep 2024 22:31:22 +0200 Subject: [PATCH] fix: do not use transmog plus if disabled --- src/transmog_scripts.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/transmog_scripts.cpp b/src/transmog_scripts.cpp index c5b20b57..365c44f3 100644 --- a/src/transmog_scripts.cpp +++ b/src/transmog_scripts.cpp @@ -1148,15 +1148,17 @@ class PS_Transmogrification : public PlayerScript } } - uint32 accountId = 0; + if (sConfigMgr->GetOption("Transmogrification.EnablePlus", false)) { + uint32 accountId = 0; - if (player->GetSession()) - accountId = player->GetSession()->GetAccountId(); + if (player->GetSession()) + accountId = player->GetSession()->GetAccountId(); - QueryResult resultAcc = LoginDatabase.Query("SELECT `membership_level` FROM `acore_cms_subscriptions` WHERE `account_name` COLLATE utf8mb4_general_ci = (SELECT `username` FROM `account` WHERE `id` = {})", accountId); + QueryResult resultAcc = LoginDatabase.Query("SELECT `membership_level` FROM `acore_cms_subscriptions` WHERE `account_name` COLLATE utf8mb4_general_ci = (SELECT `username` FROM `account` WHERE `id` = {})", accountId); - if (resultAcc) - player->UpdatePlayerSetting("acore_cms_subscriptions", SETTING_TRANSMOG_MEMBERSHIP_LEVEL, (*resultAcc)[0].Get()); + if (resultAcc) + player->UpdatePlayerSetting("acore_cms_subscriptions", SETTING_TRANSMOG_MEMBERSHIP_LEVEL, (*resultAcc)[0].Get()); + } #ifdef PRESETS if (sT->GetEnableSets())