C# Class Aura.Channel.World.Dungeons.Dungeon

Represents a dungeon with its regions.
Afficher le fichier Open project: aura-project/aura Class Usage Examples

Méthodes publiques

Méthode Description
AddBoss ( int raceId, int amount = 1 ) : void

Adds boss to list of bosses to spawn.

AddChest ( Prop chest ) : void

Adds chest to list of chests to spawn.

BossDoorBehavior ( Creature _, Prop prop ) : void

Behavior for this dungeon's boss door.

CheckDoors ( ) : bool

Returns true if all doors except the boss door have been opened.

CheckSectionClear ( ) : void

Checks if any sections have just been cleared, and calls the corresponding script method.

Complete ( ) : void
CompleteManually ( bool val ) : void

Sets whether the dungeon is completed automatically once all bosses have been killed.

If set to false, the dungeon script has to handle calling Complete, otherwise the dungeon won't be completable.

CountPlayers ( ) : int

Returns amount of players in all regions that are part of the dungeon.

Dungeon ( long instanceId, string dungeonName, int itemId, int seed, int floorPlan, Creature creature ) : Aura.Channel.Network.Sending

Creates new dungeon.

GetBossRoomCenter ( ) : Location

Returns the location at the center of the boss room.

GetCreators ( ) : List

Returns creators inside the dungeon. If dungeon has roles, it gets the creators by calling GetActualCreature on the RP characters.

GetCreature ( long entityId ) : Creature

Returns the creature with the given entity id if it could be found in the dungeon's regions, otherwise it returns null.

GetEndRoomCenter ( ) : Location

Returns the location at the center of the end room, behind the boss room.

GetPlayerListScrollMessage ( ) : string

Returns the text for the player location crawler.

GetRoles ( ) : List

Returns dungeon's roles registered with SetRole, sorted by their index. 0 = leader, 1 = first other party member, etc.

GetRpCharacters ( ) : List

Returns all RP characters inside the dungeon.

GetRpCharactersOrCreators ( ) : List

Returns either all RP characters or all creators currently in the dungeon, depending on whether this is an RP dungeon or not.

InitFloorRegion ( int iRegion ) : void

Initiates floor, creating puzzles and props.

InitLobbyRegion ( int iRegion ) : void

Initiates lobby, adding behavior to the stairs and statue.

InitRegions ( ) : void

Initiates regions, spawning props

IsInside ( long entityId ) : bool

Returns true if a creature with the given id is inside this dungeon.

OnPlayerEntersLobby ( Creature creature ) : void

Called when a creature enters the lobby region.

PlayCutscene ( string cutsceneName ) : void

Plays cutscene for all party members.

PlayCutscene ( string cutsceneName, Action onFinish ) : void

Plays cutscene for all party members.

RemoveAllPlayers ( ) : void

Removes all players from dungeon.

SetRole ( int index, string actorName ) : void

Registers a role-playing character.

Private Methods

Méthode Description
CreatePuzzles ( int iRegion ) : void

Calls OnCreate on all of region's puzzles.

GeneratePuzzles ( int iFloor ) : void

Generates random puzzles for the floor.

GenerateRegions ( ) : void

Generates lobby and floor regions.

OnBossDeath ( Creature creature, Creature killer ) : void

Raised when one of the bosses dies.

Rotation ( int direction ) : float

Returns the radian rotation for the given dungeon direction.

TODO: Move somewhere? Direction maybe? Or an extension?

SpawnTreasureChests ( ) : void

Spawns treasure chests in treasure room.

Method Details

AddBoss() public méthode

Adds boss to list of bosses to spawn.
public AddBoss ( int raceId, int amount = 1 ) : void
raceId int
amount int
Résultat void

AddChest() public méthode

Adds chest to list of chests to spawn.
public AddChest ( Prop chest ) : void
chest Aura.Channel.World.Entities.Prop
Résultat void

BossDoorBehavior() public méthode

Behavior for this dungeon's boss door.
public BossDoorBehavior ( Creature _, Prop prop ) : void
_ Aura.Channel.World.Entities.Creature
prop Aura.Channel.World.Entities.Prop
Résultat void

CheckDoors() public méthode

Returns true if all doors except the boss door have been opened.
public CheckDoors ( ) : bool
Résultat bool

CheckSectionClear() public méthode

Checks if any sections have just been cleared, and calls the corresponding script method.
public CheckSectionClear ( ) : void
Résultat void

Complete() public méthode

public Complete ( ) : void
Résultat void

CompleteManually() public méthode

Sets whether the dungeon is completed automatically once all bosses have been killed.
If set to false, the dungeon script has to handle calling Complete, otherwise the dungeon won't be completable.
public CompleteManually ( bool val ) : void
val bool
Résultat void

CountPlayers() public méthode

Returns amount of players in all regions that are part of the dungeon.
public CountPlayers ( ) : int
Résultat int

Dungeon() public méthode

Creates new dungeon.
public Dungeon ( long instanceId, string dungeonName, int itemId, int seed, int floorPlan, Creature creature ) : Aura.Channel.Network.Sending
instanceId long
dungeonName string
itemId int
seed int
floorPlan int
creature Aura.Channel.World.Entities.Creature
Résultat Aura.Channel.Network.Sending

GetBossRoomCenter() public méthode

Returns the location at the center of the boss room.
public GetBossRoomCenter ( ) : Location
Résultat Location

GetCreators() public méthode

Returns creators inside the dungeon. If dungeon has roles, it gets the creators by calling GetActualCreature on the RP characters.
public GetCreators ( ) : List
Résultat List

GetCreature() public méthode

Returns the creature with the given entity id if it could be found in the dungeon's regions, otherwise it returns null.
public GetCreature ( long entityId ) : Creature
entityId long
Résultat Aura.Channel.World.Entities.Creature

GetEndRoomCenter() public méthode

Returns the location at the center of the end room, behind the boss room.
public GetEndRoomCenter ( ) : Location
Résultat Location

GetPlayerListScrollMessage() public méthode

Returns the text for the player location crawler.
public GetPlayerListScrollMessage ( ) : string
Résultat string

GetRoles() public méthode

Returns dungeon's roles registered with SetRole, sorted by their index. 0 = leader, 1 = first other party member, etc.
public GetRoles ( ) : List
Résultat List

GetRpCharacters() public méthode

Returns all RP characters inside the dungeon.
public GetRpCharacters ( ) : List
Résultat List

GetRpCharactersOrCreators() public méthode

Returns either all RP characters or all creators currently in the dungeon, depending on whether this is an RP dungeon or not.
public GetRpCharactersOrCreators ( ) : List
Résultat List

InitFloorRegion() public méthode

Initiates floor, creating puzzles and props.
public InitFloorRegion ( int iRegion ) : void
iRegion int
Résultat void

InitLobbyRegion() public méthode

Initiates lobby, adding behavior to the stairs and statue.
public InitLobbyRegion ( int iRegion ) : void
iRegion int
Résultat void

InitRegions() public méthode

Initiates regions, spawning props
public InitRegions ( ) : void
Résultat void

IsInside() public méthode

Returns true if a creature with the given id is inside this dungeon.
public IsInside ( long entityId ) : bool
entityId long
Résultat bool

OnPlayerEntersLobby() public méthode

Called when a creature enters the lobby region.
public OnPlayerEntersLobby ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
Résultat void

PlayCutscene() public méthode

Plays cutscene for all party members.
public PlayCutscene ( string cutsceneName ) : void
cutsceneName string
Résultat void

PlayCutscene() public méthode

Plays cutscene for all party members.
public PlayCutscene ( string cutsceneName, Action onFinish ) : void
cutsceneName string
onFinish Action
Résultat void

RemoveAllPlayers() public méthode

Removes all players from dungeon.
public RemoveAllPlayers ( ) : void
Résultat void

SetRole() public méthode

Registers a role-playing character.
public SetRole ( int index, string actorName ) : void
index int
actorName string
Résultat void