Files
Fishing2Server/Hotfix/Social/System/ChatChannelSystem.cs
2025-08-14 23:56:51 +08:00

28 lines
664 B
C#

using Fantasy;
namespace NB.Chat;
public static class ChatChannelSystem
{
/// <summary>
/// 进入频道
/// </summary>
/// <param name="channel"></param>
/// <param name="unit"></param>
public static void Enter(this ChatChannel channel, SocialUnit unit)
{
channel.Units.Add(unit.Id);
unit.CurrentChannel = channel.Id;
}
/// <summary>
/// 离开频道
/// </summary>
/// <param name="channel"></param>
/// <param name="unit"></param>
public static void Exit(this ChatChannel channel, SocialUnit unit)
{
channel.Units.Remove(unit.Id);
unit.CurrentChannel = 0;
}
}