C# 클래스 Aura.Channel.World.Guilds.GuildManager

상속: Aura.Shared.Database.AbstractGuildManager
파일 보기 프로젝트 열기: aura-project/aura

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
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.

메소드 상세

Apply() 공개 메소드

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
리턴 void

ChangeStone() 공개 메소드

Changes the look of the guild's stone.
public ChangeStone ( Guild guild, GuildStoneType stoneType ) : void
guild Guild
stoneType GuildStoneType
리턴 void

ConvertPlayPoints() 공개 메소드

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
리턴 void

CreateGuild() 공개 메소드

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
리턴 void

DestroyStone() 공개 메소드

Destroy's guild's stone.
public DestroyStone ( Guild guild ) : void
guild Guild
리턴 void

DonateGold() 공개 메소드

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
리턴 void

DonateItem() 공개 메소드

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
리턴 void

GuildManager() 공개 메소드

Creates new manager instance.
public GuildManager ( ) : Aura.Channel.Network.Sending
리턴 Aura.Channel.Network.Sending

Initialize() 공개 메소드

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

LoadGuild() 보호된 메소드

Loads given guild.
protected LoadGuild ( Guild guild ) : void
guild Guild
리턴 void

OnSyncGuildAdded() 보호된 메소드

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
리턴 void

OnSyncGuildMemberAccepted() 보호된 메소드

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

OnSyncGuildMemberAdded() 보호된 메소드

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
리턴 void

OnSyncGuildMemberDeclined() 보호된 메소드

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

OnSyncGuildMemberRemoved() 보호된 메소드

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
리턴 void

OnSyncGuildMemberUpdated() 보호된 메소드

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
리턴 void

OnSyncGuildRemoved() 보호된 메소드

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
리턴 void

PlaceStone() 공개 메소드

Places stone for guild in world.
public PlaceStone ( Guild guild ) : void
guild Guild
리턴 void

SetGuildForCharacter() 공개 메소드

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

SetStone() 공개 메소드

Places stone and saves its location to database.
public SetStone ( Guild guild ) : void
guild Guild
리턴 void