Interface IGuildController
Interface for a character's guild controller, handling guild membership and events.
public interface IGuildController : ICharacterBehaviour
- Inherited Members
Remarks
The controller's copy of the character's standing (RankOrder,
Permissions) is a CACHE, on both sides of the wire. On the client it drives
what the panel offers; on the server it is a cheap pre-filter that keeps obviously-illegal
requests from reaching the database. Neither is the authority — every guild operation
re-reads the guild's rank rows inside its async path and decides there. See
GuildSystem.ResolveGuildAuthorityAsync.
Fields
OnReadID
Static event for reading a guild ID and player character.
public static Action<long, IPlayerCharacter> OnReadID
Field Value
Properties
ID
The unique guild ID.
long ID { get; set; }
Property Value
LeaderRankOrder
The highest rank order that exists in this guild — the leader's seat.
byte LeaderRankOrder { get; set; }
Property Value
Remarks
Needed to answer "am I the leader?" without hard-coding a number, now that a guild may add ranks above the seeded three.
OnGuildJoinTriggers
Triggers invoked when the character joins a guild.
List<Trigger> OnGuildJoinTriggers { get; }
Property Value
OnGuildLeaveTriggers
Triggers invoked when the character leaves a guild.
List<Trigger> OnGuildLeaveTriggers { get; }
Property Value
Permissions
The permissions the character's rank currently holds, as computed by the server.
GuildPermissions Permissions { get; set; }
Property Value
Remarks
Sent, not derived. The client could look its own rank up in the ladder it was given and compute this itself, but then two independent implementations would decide what a player may do — and the one that is wrong would be the one drawing the buttons.
RankOrder
The character's position on the guild's rank ladder. Zero means "not in a guild".
byte RankOrder { get; set; }
Property Value
Remarks
Higher is more senior. This is the same byte character_guild.rank has always
stored, which is why the move to editable ranks rewrote no membership row.
Methods
HasGuildPermission(GuildPermissions)
Convenience test for a single permission on the cached mask.
bool HasGuildPermission(GuildPermissions permission)
Parameters
permissionGuildPermissionsThe permission to test.
Returns
- bool
True when the cached mask holds every bit in
permission.
Remarks
Presentation and pre-filtering only. A server-side decision must go through the guild's rank rows; this reads a value that may be one broadcast out of date.
Events
OnAddGuildMember
Event triggered when a guild member is added or their roster row changes.
event Action<GuildAddBroadcast> OnAddGuildMember
Event Type
Remarks
Carries the whole broadcast rather than an argument per column. The roster row grew a
level, two notes and a last-seen stamp during E3/E6, and an Action of eight
positional arguments is a signature nobody can call correctly twice — the third
long and the fourth are one transposition away from a silent bug.
OnLeaveGuild
Event triggered when leaving a guild.
event Action OnLeaveGuild
Event Type
OnReceiveGuildApplications
Event triggered when the guild's pending application queue arrives.
event Action<GuildApplicationEntry[]> OnReceiveGuildApplications
Event Type
OnReceiveGuildDirectory
Event triggered when a page of the recruitment directory arrives.
event Action<GuildDirectoryEntry[]> OnReceiveGuildDirectory
Event Type
OnReceiveGuildInfo
Event triggered when the guild's descriptive text arrives. Parameters: guild ID, name, notice, message of the day.
event Action<long, string, string, string> OnReceiveGuildInfo
Event Type
OnReceiveGuildInvite
Event triggered when a guild invite is received.
event Action<long> OnReceiveGuildInvite
Event Type
OnReceiveGuildLog
Event triggered when the guild's recent activity log arrives. Parameters: guild ID, entries (newest first).
event Action<long, GuildLogEntry[]> OnReceiveGuildLog
Event Type
- Action<long, GuildLogEntry[]>
OnReceiveGuildRanks
Event triggered when the guild's rank ladder arrives.
event Action<GuildRankListBroadcast> OnReceiveGuildRanks
Event Type
OnReceiveGuildRecruitmentInfo
Event triggered when the guild's own recruitment advertisement arrives.
event Action<GuildRecruitmentInfoBroadcast> OnReceiveGuildRecruitmentInfo
Event Type
OnReceiveGuildResult
Event triggered when a guild result is received.
event Action<GuildResultType> OnReceiveGuildResult
Event Type
OnRemoveGuildMember
Event triggered when a guild member is removed.
event Action<long> OnRemoveGuildMember
Event Type
OnValidateGuildMembers
Event triggered to validate guild members.
event Action<HashSet<long>> OnValidateGuildMembers