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

Manages dynamic regions.
Exibir arquivo Open project: aura-project/aura

Public Methods

Method Description
CheckDrop ( Creature creature, Item item ) : bool

Checks if creature is able to enter a dungeon with the given item, at his current position, if so, a dungeon is created and the party is moved inside.

CreateDungeonAndWarp ( string dungeonName, int itemId, Creature leader ) : bool

Creates a dungeon with the given parameters and warps the creature's party inside.

DungeonManager ( ) : Aura.Channel.Network.Sending

Creates new dungeon manager.

GetInstanceId ( ) : long

Generates and reserves a new dungeon instance id.

GetRegionId ( ) : int

Generates and reserves a new dungeon region id.

Private Methods

Method Description
CreateDungeon ( string dungeonName, int itemId, Creature creature ) : Dungeon

Generates instance id and creates dungeon.

Get ( bool>.Func predicate ) : Dungeon

Returns first dungeon that matches the predicate, or null.

OnMabiTick ( ErinnTime time ) : void

Raised every 5 minutes, removes empty dungeons.

TODO: Is removing on MabiTick what we want? How long do dungeons stay active before they're removed? This could remove a dungeon the minute, even the second, the last player leaves it.

Remove ( long instanceId ) : bool

Removes dungeon with given instance id, incl all regions.

Method Details

CheckDrop() public method

Checks if creature is able to enter a dungeon with the given item, at his current position, if so, a dungeon is created and the party is moved inside.
public CheckDrop ( Creature creature, Item item ) : bool
creature Aura.Channel.World.Entities.Creature
item Item
return bool

CreateDungeonAndWarp() public method

Creates a dungeon with the given parameters and warps the creature's party inside.
public CreateDungeonAndWarp ( string dungeonName, int itemId, Creature leader ) : bool
dungeonName string
itemId int
leader Aura.Channel.World.Entities.Creature
return bool

DungeonManager() public method

Creates new dungeon manager.
public DungeonManager ( ) : Aura.Channel.Network.Sending
return Aura.Channel.Network.Sending

GetInstanceId() public method

Generates and reserves a new dungeon instance id.
public GetInstanceId ( ) : long
return long

GetRegionId() public method

Generates and reserves a new dungeon region id.
public GetRegionId ( ) : int
return int