mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
Do not show appearance added message to players who have transmog disabled
This commit is contained in:
@@ -476,9 +476,11 @@ private:
|
||||
std::stringstream tempStream;
|
||||
tempStream << std::hex << ItemQualityColors[itemTemplate->Quality];
|
||||
std::string itemQuality = tempStream.str();
|
||||
bool showChatMessage = !(player->GetPlayerSetting("mod-transmog", SETTING_HIDE_TRANSMOG).value);
|
||||
QueryResult result = CharacterDatabase.Query("SELECT account_id, item_template_id FROM custom_unlocked_appearances WHERE account_id={} AND item_template_id={}", playerEntry, itemId);
|
||||
if (!result) {
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(R"(|c%s|Hitem:%u:0:0:0:0:0:0:0:0|h[%s]|h|r has been added to your appearance collection.)", itemQuality.c_str(), itemId, itemName.c_str());
|
||||
if (showChatMessage)
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(R"(|c%s|Hitem:%u:0:0:0:0:0:0:0:0|h[%s]|h|r has been added to your appearance collection.)", itemQuality.c_str(), itemId, itemName.c_str());
|
||||
CharacterDatabase.Execute("INSERT INTO custom_unlocked_appearances (account_id, item_template_id) VALUES ({}, {})", playerEntry, itemId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user