Core/Chat: Corrected chat channel flag implementations
Port From (https://github.com/TrinityCore/TrinityCore/commit/d2baaac9ec9c0b0839d5868d9666aa0901031b28)
This commit is contained in:
@@ -334,6 +334,10 @@ namespace Game
|
||||
Channel chn = !channelGuid.IsEmpty() ? ChannelManager.GetChannelForPlayerByGuid(channelGuid, sender) : ChannelManager.GetChannelForPlayerByNamePart(target, sender);
|
||||
if (chn != null)
|
||||
{
|
||||
var chatChannel = CliDB.ChatChannelsStorage.LookupByKey(chn.GetChannelId());
|
||||
if (chatChannel != null && chatChannel.GetFlags().HasFlag(ChatChannelFlags.ReadOnly))
|
||||
return;
|
||||
|
||||
Global.ScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, chn);
|
||||
chn.Say(GetPlayer().GetGUID(), msg, lang);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user