C# Class Aura.Channel.World.Guilds.GuildManager

Inheritance: Aura.Shared.Database.AbstractGuildManager
Afficher le fichier Open project: aura-project/aura

Méthodes publiques

Méthode Description
Apply ( Creature creature, Guild guild, string application ) : void

Adds creature to the guild as applicant.

ChangeStone ( Guild guild, GuildStoneType stoneType ) : void

Changes the look of the guild's stone.

ConvertPlayPoints ( Creature creature, Guild guild ) : void

Gives all of creature's play points to guild as guild points.

CreateGuild ( Party party, string name, GuildType type, GuildVisibility visibility ) : void

Creates new guild with the members from the party.

DestroyStone ( Guild guild ) : void

Destroy's guild's stone.

DonateGold ( Creature creature, Guild guild, int amount ) : void

Donates the given amount of gold from the creature to guild.

DonateItem ( Creature creature, Guild guild, Item item ) : void

Donates the given item from the creature to guild. The item is converted to its worth, e.g. Gold and checks add their actual amounts, while other items use their sell price.

While it's seemingly pointless to make a dedicated DonateItem method, maybe we can use this for something at some point, e.g. donating items that other members can retrieve?

GuildManager ( ) : Aura.Channel.Network.Sending

Creates new manager instance.

Initialize ( ) : void

Initializes manager, loading all guilds from database and subscribing to relevant events.

PlaceStone ( Guild guild ) : void

Places stone for guild in world.

SetGuildForCharacter ( Creature character ) : void

Sets the character's Guild and GuildMember properties if they're in a guild.

SetStone ( Guild guild ) : void

Places stone and saves its location to database.

Méthodes protégées

Méthode Description
LoadGuild ( Guild guild ) : void

Loads given guild.

OnSyncGuildAdded ( Guild guild ) : void

Called when a guild is added during synchronization.

As long as guilds are only created by players at run-time this should generally never do anything, because all members that need to be updated will be on the channel where the guild was created.

OnSyncGuildMemberAccepted ( Guild guild, GuildMember member ) : void

Called when a member's rank changes from Applied to !Declined during synchronization.

OnSyncGuildMemberAdded ( Guild guild, GuildMember member ) : void

Called when a guild member is added during synchronization.

Shouldn't happen during normal game-play, as the member is added to the guild when they apply.

OnSyncGuildMemberDeclined ( Guild guild, GuildMember member ) : void

Called when a member's rank changes from Applied to Declined during synchronization.

OnSyncGuildMemberRemoved ( Guild guild, GuildMember member ) : void

Called when a guild member is removed during synchronization.

Happens when a member leaves, is kicked, or is removed from the db on another channel.

OnSyncGuildMemberUpdated ( Guild guild, GuildMember member ) : void

Called when a member's rank changed during synchronization.

For example, when the leader changed their rank.

OnSyncGuildRemoved ( Guild guild ) : void

Called when a guild is removed during synchronization.

This will happen if a guild is disbanded from this or another channel.

Private Methods

Méthode Description
AddGold ( Guild guild, int amount ) : void

Adds gold and saves guild's resources to db.

ForOnlineMembers ( Guild guild, Action action ) : void

Executes the given action for all members of guild that are online.

GetStone ( long guildId ) : Prop

Returns stone prop of the given guild.

OnCreatureConnected ( Creature creature ) : void

Called when a creature connected to the channel.

OnMabiTick ( ErinnTime now ) : void

Called every 5 minutes to synchronize guild information.

OnStoneTouch ( Creature creature, Prop prop ) : void

Prop behavior for guild stones.

UpdateStoneLocation ( Guild guild ) : void

Updates the guild stone's location for all members.

Method Details

Apply() public méthode

Adds creature to the guild as applicant.
public Apply ( Creature creature, Guild guild, string application ) : void
creature Aura.Channel.World.Entities.Creature
guild Guild
application string
Résultat void

ChangeStone() public méthode

Changes the look of the guild's stone.
public ChangeStone ( Guild guild, GuildStoneType stoneType ) : void
guild Guild
stoneType GuildStoneType
Résultat void

ConvertPlayPoints() public méthode

Gives all of creature's play points to guild as guild points.
public ConvertPlayPoints ( Creature creature, Guild guild ) : void
creature Aura.Channel.World.Entities.Creature
guild Guild
Résultat void

CreateGuild() public méthode

Creates new guild with the members from the party.
/// Thrown if one of the party members already is in a guild. ///
public CreateGuild ( Party party, string name, GuildType type, GuildVisibility visibility ) : void
party Party
name string
type GuildType
visibility GuildVisibility
Résultat void

DestroyStone() public méthode

Destroy's guild's stone.
public DestroyStone ( Guild guild ) : void
guild Guild
Résultat void

DonateGold() public méthode

Donates the given amount of gold from the creature to guild.
public DonateGold ( Creature creature, Guild guild, int amount ) : void
creature Aura.Channel.World.Entities.Creature
guild Guild
amount int
Résultat void

DonateItem() public méthode

Donates the given item from the creature to guild. The item is converted to its worth, e.g. Gold and checks add their actual amounts, while other items use their sell price.
While it's seemingly pointless to make a dedicated DonateItem method, maybe we can use this for something at some point, e.g. donating items that other members can retrieve?
public DonateItem ( Creature creature, Guild guild, Item item ) : void
creature Aura.Channel.World.Entities.Creature
guild Guild
item Item
Résultat void

GuildManager() public méthode

Creates new manager instance.
public GuildManager ( ) : Aura.Channel.Network.Sending
Résultat Aura.Channel.Network.Sending

Initialize() public méthode

Initializes manager, loading all guilds from database and subscribing to relevant events.
public Initialize ( ) : void
Résultat void

LoadGuild() protected méthode

Loads given guild.
protected LoadGuild ( Guild guild ) : void
guild Guild
Résultat void

OnSyncGuildAdded() protected méthode

Called when a guild is added during synchronization.
As long as guilds are only created by players at run-time this should generally never do anything, because all members that need to be updated will be on the channel where the guild was created.
protected OnSyncGuildAdded ( Guild guild ) : void
guild Guild
Résultat void

OnSyncGuildMemberAccepted() protected méthode

Called when a member's rank changes from Applied to !Declined during synchronization.
protected OnSyncGuildMemberAccepted ( Guild guild, GuildMember member ) : void
guild Guild
member GuildMember
Résultat void

OnSyncGuildMemberAdded() protected méthode

Called when a guild member is added during synchronization.
Shouldn't happen during normal game-play, as the member is added to the guild when they apply.
protected OnSyncGuildMemberAdded ( Guild guild, GuildMember member ) : void
guild Guild
member GuildMember
Résultat void

OnSyncGuildMemberDeclined() protected méthode

Called when a member's rank changes from Applied to Declined during synchronization.
protected OnSyncGuildMemberDeclined ( Guild guild, GuildMember member ) : void
guild Guild
member GuildMember
Résultat void

OnSyncGuildMemberRemoved() protected méthode

Called when a guild member is removed during synchronization.
Happens when a member leaves, is kicked, or is removed from the db on another channel.
protected OnSyncGuildMemberRemoved ( Guild guild, GuildMember member ) : void
guild Guild
member GuildMember
Résultat void

OnSyncGuildMemberUpdated() protected méthode

Called when a member's rank changed during synchronization.
For example, when the leader changed their rank.
protected OnSyncGuildMemberUpdated ( Guild guild, GuildMember member ) : void
guild Guild
member GuildMember
Résultat void

OnSyncGuildRemoved() protected méthode

Called when a guild is removed during synchronization.
This will happen if a guild is disbanded from this or another channel.
protected OnSyncGuildRemoved ( Guild guild ) : void
guild Guild
Résultat void

PlaceStone() public méthode

Places stone for guild in world.
public PlaceStone ( Guild guild ) : void
guild Guild
Résultat void

SetGuildForCharacter() public méthode

Sets the character's Guild and GuildMember properties if they're in a guild.
public SetGuildForCharacter ( Creature character ) : void
character Creature
Résultat void

SetStone() public méthode

Places stone and saves its location to database.
public SetStone ( Guild guild ) : void
guild Guild
Résultat void