mirror of
https://github.com/araxiaonline/mod-transmog.git
synced 2026-06-13 02:32:22 -04:00
fix(Subscriptions): Set membership level to 0 if no row is found (#186)
This commit is contained in:
@@ -1156,9 +1156,7 @@ public:
|
||||
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);
|
||||
|
||||
if (resultAcc)
|
||||
player->UpdatePlayerSetting("acore_cms_subscriptions", SETTING_TRANSMOG_MEMBERSHIP_LEVEL, (*resultAcc)[0].Get<uint32>());
|
||||
player->UpdatePlayerSetting("acore_cms_subscriptions", SETTING_TRANSMOG_MEMBERSHIP_LEVEL, resultAcc ? (*resultAcc)[0].Get<uint32>() : 0);
|
||||
}
|
||||
|
||||
#ifdef PRESETS
|
||||
|
||||
Reference in New Issue
Block a user