server-master/srcs/WingsAPI.Game/Groups/GroupFactory.cs
2026-02-10 18:21:30 +01:00

19 lines
No EOL
820 B
C#

using System.Collections.Generic;
using WingsEmu.Game.Characters;
using WingsEmu.Packets.Enums;
namespace WingsEmu.Game.Groups;
public class GroupFactory : IGroupFactory
{
private readonly IGroupManager _groupManager;
public GroupFactory(IGroupManager groupManager) => _groupManager = groupManager;
public PlayerGroup CreateGroup(byte slots, long ownerId) => CreateGroup(slots, new List<IPlayerEntity>(), ownerId);
public PlayerGroup CreateGroup(byte slots, List<IPlayerEntity> characters, long ownerId) => new PlayerGroup(_groupManager.GetNextGroupId(), slots, characters, ownerId);
public PlayerGroup CreateGroup(byte slots, List<IPlayerEntity> characters, long ownerId, GroupSharingType type) =>
new PlayerGroup(_groupManager.GetNextGroupId(), slots, characters, ownerId, type);
}