C# Class Aura.Channel.World.Party

Show file Open project: aura-project/aura Class Usage Examples

Public Methods

Method Description
AddMember ( Creature creature ) : void

Adds creature to party and updates the clients.

AddMemberSilent ( Creature creature ) : void

Adds creature to party without updating the clients.

AutoChooseNextLeader ( ) : void

Sets next leader automatically.

Official gives the character that has been created for the longest period of time precedence.

Broadcast ( Packet packet, bool useMemberEntityId = false, Creature exclude = null ) : void

Sends the supplied packet to all members, with the option of replacing the EntityID with each member's personal ID, and excluding a specific creature.

ChangeExp ( PartyExpSharing rule ) : void

Changes exp sharing rule.

ChangeFinish ( PartyFinishRule rule ) : void

Change finishing rule.

ChangeSettings ( PartyType type, string name, string dungeonLevel, string info, string password, int maxSize ) : void

Changes settings and updates clients.

CheckPassword ( string password ) : bool

Returns true if password is correct or none is set.

Close ( ) : void

Closes members wanted ad.

Create ( Creature creature, PartyType type, string name, string dungeonLevel, string info, string password, int maxSize ) : Party

Creates new party with creature as leader.

CreateDummy ( Creature creature ) : Party

Creates new dummy party for creature.

DisconnectedMember ( Creature creature ) : void

Deals with removing disconnected players from the party.

GetCreaturesOnAltar ( int regionId ) : List

Returns a list of all members standing on the altar in the given region.

This and other functions assume that there's only ever one altar per region. Should this change at any point, these functions have to be fixed.

GetMember ( long entityId ) : Creature

Returns party member by entity id, or null if it doesn't exist.

GetMembers ( ) : Aura.Channel.World.Entities.Creature[]

Returns list of all members.

GetMembersInRange ( Creature creature, int range = -1 ) : List

Returns party members in range of given creature, but not the creature itself.

3000 is a total guess as to the actual visible range.

GetMembersInRegion ( int regionId ) : List

Returns a list of all members in the region specified.

GetSortedMembers ( ) : Aura.Channel.World.Entities.Creature[]

Returns list of all members, sorted by their position in the party.

GetSortedMembers ( bool>.Func predicate ) : Aura.Channel.World.Entities.Creature[]

Returns list of all members that match the predicate, sorted by their position in the party.

Open ( ) : void

Opens members wanted ad.

RemoveMember ( Creature creature ) : void

Removes creature from party if it's in it and updates the clients.

RemoveMemberSilent ( Creature creature ) : void

Removes creature from party without updating the clients.

SetDungeonLevel ( string dungeonLevel ) : void

Sets dungeon level.

SetInfo ( string info ) : void

Sets party info.

SetLeader ( Creature creature ) : bool

Sets leader to given creature, if possible.

SetLeader ( long entitiyId ) : bool

Sets leader to given entity, if possible.

SetMaxSize ( int size ) : void

Sets party's max size.

SetName ( string name ) : void

Sets party name.

TODO: Kinda redundant, use property?

SetPartyQuest ( Quest quest ) : void

Sets party quest, removing previous ones and updating all members.

SetPassword ( string pass ) : void

Sets party's password, set to empty string or null to disable.

SetType ( PartyType type ) : void

Sets party type.

ToString ( ) : string

Returns the party name in the format the Party Member Wanted functionality requires.

UnsetPartyQuest ( ) : bool

Unsets party quest, removes it from all normal member's managers, and updates the clients. Returns false if no party quest was set.

Private Methods

Method Description
GetAvailableSlot ( ) : int

Returns first available slot, throws if none are available. Check availability before adding members.

OnMinutesTimeTick ( ErinnTime time ) : void

Raised once every minute.

Party ( ) : Aura.Channel.Network.Sending

Initializes party.

SetSettings ( PartyType type, string name, string dungeonLevel, string info, string password, int maxSize ) : void

Sets given options without updating the clients.

Method Details

AddMember() public method

Adds creature to party and updates the clients.
public AddMember ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

AddMemberSilent() public method

Adds creature to party without updating the clients.
public AddMemberSilent ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

AutoChooseNextLeader() public method

Sets next leader automatically.
Official gives the character that has been created for the longest period of time precedence.
public AutoChooseNextLeader ( ) : void
return void

Broadcast() public method

Sends the supplied packet to all members, with the option of replacing the EntityID with each member's personal ID, and excluding a specific creature.
public Broadcast ( Packet packet, bool useMemberEntityId = false, Creature exclude = null ) : void
packet Packet
useMemberEntityId bool
exclude Aura.Channel.World.Entities.Creature
return void

ChangeExp() public method

Changes exp sharing rule.
public ChangeExp ( PartyExpSharing rule ) : void
rule PartyExpSharing
return void

ChangeFinish() public method

Change finishing rule.
public ChangeFinish ( PartyFinishRule rule ) : void
rule PartyFinishRule
return void

ChangeSettings() public method

Changes settings and updates clients.
public ChangeSettings ( PartyType type, string name, string dungeonLevel, string info, string password, int maxSize ) : void
type PartyType
name string
dungeonLevel string
info string
password string
maxSize int
return void

CheckPassword() public method

Returns true if password is correct or none is set.
public CheckPassword ( string password ) : bool
password string
return bool

Close() public method

Closes members wanted ad.
public Close ( ) : void
return void

Create() public static method

Creates new party with creature as leader.
public static Create ( Creature creature, PartyType type, string name, string dungeonLevel, string info, string password, int maxSize ) : Party
creature Aura.Channel.World.Entities.Creature
type PartyType
name string
dungeonLevel string
info string
password string
maxSize int
return Party

CreateDummy() public static method

Creates new dummy party for creature.
public static CreateDummy ( Creature creature ) : Party
creature Aura.Channel.World.Entities.Creature
return Party

DisconnectedMember() public method

Deals with removing disconnected players from the party.
public DisconnectedMember ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

GetCreaturesOnAltar() public method

Returns a list of all members standing on the altar in the given region.
This and other functions assume that there's only ever one altar per region. Should this change at any point, these functions have to be fixed.
public GetCreaturesOnAltar ( int regionId ) : List
regionId int
return List

GetMember() public method

Returns party member by entity id, or null if it doesn't exist.
public GetMember ( long entityId ) : Creature
entityId long
return Aura.Channel.World.Entities.Creature

GetMembers() public method

Returns list of all members.
public GetMembers ( ) : Aura.Channel.World.Entities.Creature[]
return Aura.Channel.World.Entities.Creature[]

GetMembersInRange() public method

Returns party members in range of given creature, but not the creature itself.
3000 is a total guess as to the actual visible range.
public GetMembersInRange ( Creature creature, int range = -1 ) : List
creature Aura.Channel.World.Entities.Creature Reference creature
range int Pass -1 for visual range.
return List

GetMembersInRegion() public method

Returns a list of all members in the region specified.
public GetMembersInRegion ( int regionId ) : List
regionId int
return List

GetSortedMembers() public method

Returns list of all members, sorted by their position in the party.
public GetSortedMembers ( ) : Aura.Channel.World.Entities.Creature[]
return Aura.Channel.World.Entities.Creature[]

GetSortedMembers() public method

Returns list of all members that match the predicate, sorted by their position in the party.
public GetSortedMembers ( bool>.Func predicate ) : Aura.Channel.World.Entities.Creature[]
predicate bool>.Func
return Aura.Channel.World.Entities.Creature[]

Open() public method

Opens members wanted ad.
public Open ( ) : void
return void

RemoveMember() public method

Removes creature from party if it's in it and updates the clients.
public RemoveMember ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

RemoveMemberSilent() public method

Removes creature from party without updating the clients.
public RemoveMemberSilent ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

SetDungeonLevel() public method

Sets dungeon level.
public SetDungeonLevel ( string dungeonLevel ) : void
dungeonLevel string
return void

SetInfo() public method

Sets party info.
public SetInfo ( string info ) : void
info string
return void

SetLeader() public method

Sets leader to given creature, if possible.
public SetLeader ( Creature creature ) : bool
creature Aura.Channel.World.Entities.Creature
return bool

SetLeader() public method

Sets leader to given entity, if possible.
public SetLeader ( long entitiyId ) : bool
entitiyId long
return bool

SetMaxSize() public method

Sets party's max size.
public SetMaxSize ( int size ) : void
size int
return void

SetName() public method

Sets party name.
TODO: Kinda redundant, use property?
public SetName ( string name ) : void
name string
return void

SetPartyQuest() public method

Sets party quest, removing previous ones and updating all members.
public SetPartyQuest ( Quest quest ) : void
quest Quest
return void

SetPassword() public method

Sets party's password, set to empty string or null to disable.
public SetPassword ( string pass ) : void
pass string
return void

SetType() public method

Sets party type.
public SetType ( PartyType type ) : void
type PartyType
return void

ToString() public method

Returns the party name in the format the Party Member Wanted functionality requires.
public ToString ( ) : string
return string

UnsetPartyQuest() public method

Unsets party quest, removes it from all normal member's managers, and updates the clients. Returns false if no party quest was set.
public UnsetPartyQuest ( ) : bool
return bool