server-master/srcs/WingsAPI.Game/Networking/Broadcasting/ExceptGroupBroadcast.cs
2026-02-10 18:21:30 +01:00

12 lines
No EOL
369 B
C#

using WingsEmu.Game.Groups;
namespace WingsEmu.Game.Networking.Broadcasting;
public class ExceptGroupBroadcast : IBroadcastRule
{
private readonly long _groupId;
public ExceptGroupBroadcast(PlayerGroup playerGroup) => _groupId = playerGroup.GroupId;
public bool Match(IClientSession session) => session.PlayerEntity.GetGroup()?.GroupId != _groupId;
}