From b2edaa6051f2f1a280b787e7cad002090ad46f9b Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 10 Nov 2024 22:43:23 -0500 Subject: [PATCH] Core/Chat: Update ChatNotify enum Port From (https://github.com/TrinityCore/TrinityCore/commit/c6fd88bf3044de44ac01fe9583a3be4142d1e1d9) --- Source/Framework/Constants/ChatConst.cs | 5 +++-- Source/Game/Chat/Channels/ChannelAppenders.cs | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Framework/Constants/ChatConst.cs b/Source/Framework/Constants/ChatConst.cs index b4cce4f2d..b51c79c73 100644 --- a/Source/Framework/Constants/ChatConst.cs +++ b/Source/Framework/Constants/ChatConst.cs @@ -45,8 +45,9 @@ namespace Framework.Constants NotInLfgNotice = 0x21, //+ "[%S] You Must Be Queued In Looking For Group Before Joining This Channel."; -- The User Must Be In The Looking For Group System To Join Lfg Chat Channels. VoiceOnNotice = 0x22, //+ "[%S] Channel Voice Enabled By %S."; VoiceOffNotice = 0x23, //+ "[%S] Channel Voice Disabled By %S."; - TrialRestricted = 0x24, - NotAllowedInChannel = 0x25 + VoiceOnNoAnnounceNotice = 0x24, // same as CHAT_VOICE_ON_NOTICE but no chat mode change announcement + TrialRestricted = 0x25, //+ "[%s] Free Trial accounts cannot send messages to this channel. |cffffd000|Hstorecategory:gametime|h[Click To Upgrade]|h|r" + NotAllowedInChannel = 0x26 //+ "That operation is not permitted in this channel." } public enum ChannelFlags diff --git a/Source/Game/Chat/Channels/ChannelAppenders.cs b/Source/Game/Chat/Channels/ChannelAppenders.cs index 6bac0012d..d031570f2 100644 --- a/Source/Game/Chat/Channels/ChannelAppenders.cs +++ b/Source/Game/Chat/Channels/ChannelAppenders.cs @@ -677,19 +677,21 @@ namespace Game.Chat struct VoiceOnAppend : IChannelAppender { - public VoiceOnAppend(ObjectGuid guid) + ChatNotify notificationType; + ObjectGuid _guid; + + public VoiceOnAppend(ObjectGuid guid, bool announce = true) { _guid = guid; + notificationType = announce ? ChatNotify.VoiceOnNotice : ChatNotify.VoiceOnNoAnnounceNotice; } - public ChatNotify GetNotificationType() => ChatNotify.VoiceOnNotice; + public ChatNotify GetNotificationType() => notificationType; public void Append(ChannelNotify data) { data.SenderGuid = _guid; } - - ObjectGuid _guid; } struct VoiceOffAppend : IChannelAppender