Core/Chat: Rewrite some custom channel handling. Channel creation now properly saves passwords.

Port From (https://github.com/TrinityCore/TrinityCore/commit/ea753efb9370455979c8af8ebaafa734b77d6052)
This commit is contained in:
hondacrx
2021-12-27 17:23:39 -05:00
parent 855c9611e0
commit 12f472cee1
4 changed files with 56 additions and 34 deletions
+3 -3
View File
@@ -2636,7 +2636,7 @@ namespace Game.Entities
if (channelEntry.Flags.HasAnyFlag(ChannelDBCFlags.CityOnly) && usedChannel != null)
continue; // Already on the channel, as city channel names are not changing
joinChannel = cMgr.GetJoinChannel(channelEntry.Id, "", current_zone);
joinChannel = cMgr.GetSystemChannel(channelEntry.Id, current_zone);
if (usedChannel != null)
{
if (joinChannel != usedChannel)
@@ -2649,13 +2649,13 @@ namespace Game.Entities
}
}
else
joinChannel = cMgr.GetJoinChannel(channelEntry.Id, "");
joinChannel = cMgr.GetSystemChannel(channelEntry.Id);
}
else
removeChannel = usedChannel;
if (joinChannel != null)
joinChannel.JoinChannel(this, ""); // Changed Channel: ... or Joined Channel: ...
joinChannel.JoinChannel(this); // Changed Channel: ... or Joined Channel: ...
if (removeChannel != null)
{