C# Class Aura.Channel.World.CreatureSpawner

Defines area in which certain creatures are spawned, up to a certain amount.
Inheritance: IDisposable
Mostrar archivo Open project: aura-project/aura Class Usage Examples

Public Methods

Method Description
CreatureSpawner ( int raceId, int amount, int regionId, int delay, int delayMin, int delayMax, int titles, int coordinates ) : Aura.Channel.Network.Sending

Creates new CreatureSpawner

Dispose ( ) : void

Unsubscribes from spawned creature's disappear events.

Spawn ( ) : void

Spawns as many creatures as necessary to reach this spawn's amount.

Private Methods

Method Description
GetRandomPosition ( ) : Point

Returns random spawn position.

IsPointInside ( Point point ) : bool

Returns true if point is within the spawn points.

OnDisappears ( Entity entity ) : void

Called when an NPC created by this spawner disappears, after it was killed.

SpawnOne ( ) : void

Spawns one creature based on this spawners settings.

Method Details

CreatureSpawner() public method

Creates new CreatureSpawner
public CreatureSpawner ( int raceId, int amount, int regionId, int delay, int delayMin, int delayMax, int titles, int coordinates ) : Aura.Channel.Network.Sending
raceId int Race to spawn
amount int Maximum amount to spawn
regionId int Region to spawn in
delay int Initial spawn delay in seconds
delayMin int Minimum respawn delay in seconds
delayMax int Maximum respawn delay in seconds
titles int List of random titles to apply to creatures
coordinates int Even number of coordinates, specifying the spawn area
return Aura.Channel.Network.Sending

Dispose() public method

Unsubscribes from spawned creature's disappear events.
public Dispose ( ) : void
return void

Spawn() public method

Spawns as many creatures as necessary to reach this spawn's amount.
public Spawn ( ) : void
return void