diff --git a/Source/Game/Chat/Channels/Channel.cs b/Source/Game/Chat/Channels/Channel.cs index ee4cf82a4..4a9d95221 100644 --- a/Source/Game/Chat/Channels/Channel.cs +++ b/Source/Game/Chat/Channels/Channel.cs @@ -250,7 +250,7 @@ namespace Game.Chat } } - public void LeaveChannel(Player player, bool send = true) + public void LeaveChannel(Player player, bool send = true, bool suspend = false) { ObjectGuid guid = player.GetGUID(); if (!IsOn(guid)) @@ -272,7 +272,7 @@ namespace Game.Chat SendToOne(builder, guid); */ - SendToOne(new ChannelNotifyLeftBuilder(this), guid); + SendToOne(new ChannelNotifyLeftBuilder(this, suspend), guid); } PlayerInfo info = _playersStore.LookupByKey(guid); diff --git a/Source/Game/Chat/Channels/ChannelAppenders.cs b/Source/Game/Chat/Channels/ChannelAppenders.cs index 3d5ec3724..a5927df1a 100644 --- a/Source/Game/Chat/Channels/ChannelAppenders.cs +++ b/Source/Game/Chat/Channels/ChannelAppenders.cs @@ -78,9 +78,10 @@ namespace Game.Chat class ChannelNotifyLeftBuilder : MessageBuilder { - public ChannelNotifyLeftBuilder(Channel source) + public ChannelNotifyLeftBuilder(Channel source, bool suspend) { _source = source; + _suspended = suspend; } public override ServerPacket Invoke(LocaleConstant locale = LocaleConstant.enUS) @@ -89,12 +90,13 @@ namespace Game.Chat ChannelNotifyLeft notify = new ChannelNotifyLeft(); notify.Channel = _source.GetName(localeIdx); - notify.ChatChannelID = 0; - //notify->Suspended = false; + notify.ChatChannelID = _source.GetChannelId(); + notify.Suspended = _suspended; return notify; } Channel _source; + bool _suspended; } class ChannelSayBuilder : MessageBuilder diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index 0de04feab..f9f44dcc2 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -2706,7 +2706,7 @@ namespace Game.Entities if (removeChannel != null) { - removeChannel.LeaveChannel(this, sendRemove); // Leave old channel + removeChannel.LeaveChannel(this, sendRemove, true); // Leave old channel LeftChannel(removeChannel); // Remove from player's channel list cMgr.LeftChannel(removeChannel.GetChannelId(), removeChannel.GetZoneEntry()); // Delete if empty