Table of Contents

Class ClanSystem

Namespace
RisingV.Core.Systems
Assembly
RisingV.Core.ClanEngine.dll

Provides lookup utilities for clan entities and their membership.

public class ClanSystem : System, ISystem, IManageableLifecycle<SystemManager>, IManageableLifecycle, IReloadable, IManageable<SystemManager>, IManageable
Inheritance
ClanSystem
Implements
Inherited Members
Extension Methods

Constructors

ClanSystem()

Default constructor.

public ClanSystem()

Methods

GetAll()

Enumerates all existing clan entities.

public static IEnumerable<Entity> GetAll()

Returns

IEnumerable<Entity>

An IEnumerable<T> of clan entities.

GetByGuid(Guid)

Finds a clan entity by its GUID.

public static Entity GetByGuid(Guid guid)

Parameters

guid Guid

The Il2CppSystem.Guid of the clan.

Returns

Entity

The matching Unity.Entities.Entity, or Unity.Entities.Entity.Null.

GetByName(string)

Finds a clan entity by its display name. Only clans with at least one synced user are considered.

public static Entity GetByName(string clanName)

Parameters

clanName string

The clan's name to search for (case-insensitive).

Returns

Entity

The matching Unity.Entities.Entity, or Unity.Entities.Entity.Null if none found.

GetByNetworkId(NetworkId)

Finds a clan entity by its network identifier.

public static Entity GetByNetworkId(NetworkId networkId)

Parameters

networkId NetworkId

The ProjectM.Network.NetworkId of the clan.

Returns

Entity

The matching Unity.Entities.Entity, or Unity.Entities.Entity.Null.

GetClanLeader(Entity)

Retrieves the ProjectM.Network.User who is the leader of the specified clan.

public static User GetClanLeader(Entity clanEntity)

Parameters

clanEntity Entity

The clan Unity.Entities.Entity.

Returns

User

The leader ProjectM.Network.User instance.

GetClanLeaderAsPlayer(Entity)

Retrieves the clan leader as a PlayerAspect.

public static PlayerAspect GetClanLeaderAsPlayer(Entity clanEntity)

Parameters

clanEntity Entity

The clan Unity.Entities.Entity.

Returns

PlayerAspect

The leader as PlayerAspect.

GetClanLeaderIndex(DynamicBuffer<ClanMemberStatus>)

Returns the index within a Unity.Entities.DynamicBuffer<T> of the Leader.

public static int GetClanLeaderIndex(DynamicBuffer<ClanMemberStatus> clanBuffer)

Parameters

clanBuffer DynamicBuffer<ClanMemberStatus>

Buffer of clan member statuses.

Returns

int

Index of the leader role, or -1 if not found.

GetClanMembers(Entity)

Enumerates all ProjectM.Network.Users in the specified clan.

public static IEnumerable<User> GetClanMembers(Entity clanEntity)

Parameters

clanEntity Entity

The clan Unity.Entities.Entity.

Returns

IEnumerable<User>

An IEnumerable<T> of clan members.

GetClanMembersAsPlayers(Entity)

Enumerates all clan members as PlayerAspect.

public static IEnumerable<PlayerAspect> GetClanMembersAsPlayers(Entity clanEntity)

Parameters

clanEntity Entity

The clan Unity.Entities.Entity.

Returns

IEnumerable<PlayerAspect>

An IEnumerable<T> of clan member players.

IsClanLeader(User)

Determines if the specified ProjectM.Network.User is the leader of their clan.

public static bool IsClanLeader(User user)

Parameters

user User

The ProjectM.Network.User to check.

Returns

bool

True if they hold the Leader role; otherwise false.