Class ClanService
public class ClanService
- Inheritance
-
ClanService
- Inherited Members
Constructors
ClanService()
Initializes a new instance of the ClanService class.
public ClanService()
Fields
ClansQuery
Entity query for retrieving clan entities.
public static EntityQuery ClansQuery
Field Value
- EntityQuery
Methods
GetAll()
Gets all clan entities in the game.
public static IEnumerable<Entity> GetAll()
Returns
- IEnumerable<Entity>
An enumerable collection of clan entities.
GetByGUID(Guid)
Gets a clan entity by its GUID.
public static Entity GetByGUID(Guid guid)
Parameters
guid
GuidThe GUID of the clan to find.
Returns
- Entity
The clan entity if found; otherwise, Entity.Null.
GetByName(string)
Gets a clan entity by its name.
public static Entity GetByName(string clanName)
Parameters
clanName
stringThe name of the clan to find.
Returns
- Entity
The clan entity if found; otherwise, null.
GetByNetworkId(NetworkId)
Gets a clan entity by its network ID.
public static Entity GetByNetworkId(NetworkId networkId)
Parameters
networkId
NetworkIdThe network ID of the clan to find.
Returns
- Entity
The clan entity if found; otherwise, Entity.Null.
GetClanLeader(Entity)
Gets the User entity of the clan leader.
public static User GetClanLeader(Entity clanEntity)
Parameters
clanEntity
EntityThe clan entity to check.
Returns
- User
The User entity of the clan leader.
GetClanLeaderAsPlayer(Entity)
Gets the Player entity of the clan leader.
public static Player GetClanLeaderAsPlayer(Entity clanEntity)
Parameters
clanEntity
EntityThe clan entity to check.
Returns
- Player
The Player entity of the clan leader.
GetClanLeaderIndex(DynamicBuffer<ClanMemberStatus>)
Gets the index of the clan leader in the clan member buffer.
public static int GetClanLeaderIndex(DynamicBuffer<ClanMemberStatus> clanBuffer)
Parameters
clanBuffer
DynamicBuffer<ClanMemberStatus>The buffer containing clan member statuses.
Returns
- int
The index of the clan leader; -1 if not found.
GetClanMembers(Entity)
Gets all clan members as User entities.
public static IEnumerable<User> GetClanMembers(Entity clanEntity)
Parameters
clanEntity
EntityThe clan entity to check.
Returns
- IEnumerable<User>
An enumerable collection of User entities.
GetClanMembersAsPlayers(Entity)
Gets all clan members as Player entities.
public static IEnumerable<Player> GetClanMembersAsPlayers(Entity clanEntity)
Parameters
clanEntity
EntityThe clan entity to check.
Returns
- IEnumerable<Player>
An enumerable collection of Player entities.
IsClanLeader(User)
Checks if a user is a clan leader.
public static bool IsClanLeader(User user)
Parameters
user
UserThe user to check.
Returns
- bool
True if the user is a clan leader; otherwise, false.