Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.GameDragon Class Reference

Base class for all dragon type mobs. A dragon will use various abilities, e.g. spells and timed mob spawns; to allow for a variety of spell types, mob types and mob numbers you will have to derive your own dragon class and override some of the methods and properties provided in this abstract class. More...

Inheritance diagram for DOL.GS.GameDragon:
DOL.GS.GameNPC DOL.GS.GameLiving DOL.GS.GameObject DOL.GS.Point3D DOL.GS.Point2D DOL.GS.IPoint3D DOL.GS.IPoint2D DOL.GS.IPoint2D DOL.GS.Cuuldurach DOL.GS.Gjalpinulva DOL.GS.Golestandt

List of all members.

Classes

class  DespawnTimer
 Provides a timer to remove an NPC from the world after some time has passed. More...

Public Member Functions

 GameDragon ()
 Creates a new instance of GameDragon.
override void LoadFromDatabase (DataObject obj)
 Create dragon's lair after it was loaded from the DB.
override double GetArmorAF (eArmorSlot slot)
 calculate item armor factor influenced by quality, con and duration
override double GetArmorAbsorb (eArmorSlot slot)
 Calculates armor absorb level.
override int GetResist (eDamageType damageType)
 Returns the dragon's resist to a given damage type.
override double AttackDamage (InventoryItem weapon)
 Returns the Damage this Living does on an attack.
override void Die (GameObject killer)
 Invoked when the dragon dies.
override void TakeDamage (GameObject source, eDamageType damageType, int damageAmount, int criticalAmount)
 Take some amount of damage inflicted by another GameObject.
override void EnemyHealed (GameLiving enemy, GameObject healSource, eHealthChangeType changeType, int healAmount)
 Take action upon someone healing the enemy.
override void WalkToSpawn ()
 Return to spawn point, dragon can't be attacked while it's on it's way.
override void Notify (DOLEvent e, object sender)
 Handle event notifications.
void BroadcastMessage (String message)
 Broadcast relevant messages to the raid.
virtual bool CheckAddSpawns ()
 Spawn adds that will despawn again after some time has passed. For your own implementation call SpawnTimedAdd with your own template ID (which could, in turn, use a different mob class than GameNPC and thus have a different brain implementation) and mob level.
virtual void OnRetrieverArrived (GameNPC sender)
 Invoked when retriever type mob has reached its target location.
bool CheckBreath ()
 Check whether or not to cast Breath.
bool CheckGlare (GameLiving target)
 Check whether or not to glare at this target.
bool CheckMeleeDebuff (GamePlayer target)
 Check whether or not to melee debuff this target.
bool CheckRangedDebuff (GamePlayer target)
 Check whether or not to cast a debuff on a ranged target.
bool CheckThrow (GameLiving target)
 Check whether or not to throw this target into the air.
bool CheckStun (bool firstTime)
 Try to get an AoE stun off.

Protected Member Functions

void ReportNews (GameObject killer)
 Post a message in the server news and award a dragon kill point for every XP gainer in the raid.
int AwardDragonKillPoint ()
 Award dragon kill point for each XP gainer.
GameNPC SpawnTimedAdd (int templateID, int level, int x, int y, int uptime, bool isRetriever)

Protected Attributes

String[] m_breathAnnounce
 Announcements for Breath, Glare and death.
String m_glareAnnounce
String[] m_deathAnnounce
Spell m_breathSpell
Spell m_resistDebuffSpell
Spell m_glareSpell
Spell m_meleeDebuffSpell
Spell m_rangedDebuffSpell

Properties

virtual int DragonDifficulty [get]
 Set the dragon difficulty in percent of its max abilities 100 = full strength.
ushort LairRadius [get]
override int AttackRange [get, set]
 Returns the AttackRange of this living.
override int MaxHealth [get]
override short MaxSpeedBase [get, set]
 Gets or sets the base max speed of this living.
override short Strength [get]
 Gets NPC's strength.
override int RespawnInterval [get]
 The Respawn Interval of this mob in milliseconds.
int HealthPercentOld [get, set]
 The amount of health before the most recent attack.
int PlayersInLair [get]
 The number of players in the dragon's lair.
abstract Spell Breath [get]
 The Breath spell. Override this property in your dragon implementation and assign the spell to m_breathSpell.
abstract Spell ResistDebuff [get]
 The resist debuff spell. Override this property in your dragon implementation and assign the spell to m_debuffSpell.
abstract Spell Glare [get]
 The Glare spell. Override this property in your dragon implementation and assign the spell to m_glareSpell.
int GlareChance [get]
 Chance to cast Glare when a potential target has been detected.
abstract Spell MeleeDebuff [get]
 The melee debuff spell. Override this property in your dragon implementation and assign the spell to m_meleeDebuffSpell.
int MeleeDebuffChance [get]
 Chance to cast a melee debuff.
abstract Spell RangedDebuff [get]
 The melee debuff spell. Override this property in your dragon implementation and assign the spell to m_rangedDebuffSpell.
int RangedDebuffChance [get]
 Chance to cast nearsight.
int ThrowChance [get]
 Chance to throw a player.
virtual Spell Stun [get]
 The stun spell.
int StunChance [get]
 Chance to cast stun.

Detailed Description

Base class for all dragon type mobs. A dragon will use various abilities, e.g. spells and timed mob spawns; to allow for a variety of spell types, mob types and mob numbers you will have to derive your own dragon class and override some of the methods and properties provided in this abstract class.

<author>Aredhel</author>


Constructor & Destructor Documentation

DOL.GS.GameDragon.GameDragon ( )

Creates a new instance of GameDragon.


Member Function Documentation

override double DOL.GS.GameDragon.AttackDamage ( InventoryItem  weapon) [virtual]

Returns the Damage this Living does on an attack.

Parameters:
weaponthe weapon used for attack
Returns:

Reimplemented from DOL.GS.GameLiving.

int DOL.GS.GameDragon.AwardDragonKillPoint ( ) [protected]

Award dragon kill point for each XP gainer.

Returns:
The number of people involved in the kill.
void DOL.GS.GameDragon.BroadcastMessage ( String  message)

Broadcast relevant messages to the raid.

Parameters:
messageThe message to be broadcast.
virtual bool DOL.GS.GameDragon.CheckAddSpawns ( ) [virtual]

Spawn adds that will despawn again after some time has passed. For your own implementation call SpawnTimedAdd with your own template ID (which could, in turn, use a different mob class than GameNPC and thus have a different brain implementation) and mob level.

Reimplemented in DOL.GS.Cuuldurach, DOL.GS.Gjalpinulva, and DOL.GS.Golestandt.

bool DOL.GS.GameDragon.CheckBreath ( )

Check whether or not to cast Breath.

bool DOL.GS.GameDragon.CheckGlare ( GameLiving  target)

Check whether or not to glare at this target.

Parameters:
targetThe potential target.
Returns:
Whether or not the spell was cast.
bool DOL.GS.GameDragon.CheckMeleeDebuff ( GamePlayer  target)

Check whether or not to melee debuff this target.

Parameters:
targetThe potential target.
Returns:
Whether or not the spell was cast.
bool DOL.GS.GameDragon.CheckRangedDebuff ( GamePlayer  target)

Check whether or not to cast a debuff on a ranged target.

Parameters:
targetThe potential target.
Returns:
Whether or not the spell was cast.
bool DOL.GS.GameDragon.CheckStun ( bool  firstTime)

Try to get an AoE stun off.

Parameters:
firstTimeWhether or not this is the first stun (first stun will cast with 100% chance).
Returns:
Whether or not the stun was cast.
bool DOL.GS.GameDragon.CheckThrow ( GameLiving  target)

Check whether or not to throw this target into the air.

Parameters:
targetThe potential target.
Returns:
Whether or not the target was thrown.
override void DOL.GS.GameDragon.Die ( GameObject  killer) [virtual]

Invoked when the dragon dies.

Parameters:
killerThe living that got the killing blow.

Reimplemented from DOL.GS.GameNPC.

override void DOL.GS.GameDragon.EnemyHealed ( GameLiving  enemy,
GameObject  healSource,
eHealthChangeType  changeType,
int  healAmount 
) [virtual]

Take action upon someone healing the enemy.

Parameters:
enemyThe living that was healed.
healSourceThe source of the heal.
changeTypeThe way the living was healed.
healAmountThe amount that was healed.

Reimplemented from DOL.GS.GameLiving.

override double DOL.GS.GameDragon.GetArmorAbsorb ( eArmorSlot  slot) [virtual]

Calculates armor absorb level.

Parameters:
slot
Returns:

Reimplemented from DOL.GS.GameLiving.

override double DOL.GS.GameDragon.GetArmorAF ( eArmorSlot  slot) [virtual]

calculate item armor factor influenced by quality, con and duration

Parameters:
slot
Returns:

Reimplemented from DOL.GS.GameLiving.

override int DOL.GS.GameDragon.GetResist ( eDamageType  damageType) [virtual]

Returns the dragon's resist to a given damage type.

Parameters:
damageType
Returns:

Reimplemented from DOL.GS.GameLiving.

override void DOL.GS.GameDragon.LoadFromDatabase ( DataObject  obj) [virtual]

Create dragon's lair after it was loaded from the DB.

Parameters:
obj

Reimplemented from DOL.GS.GameNPC.

override void DOL.GS.GameDragon.Notify ( DOLEvent  e,
object  sender 
) [virtual]

Handle event notifications.

Parameters:
eThe event that occured.
senderThe sender of the event.

Reimplemented from DOL.GS.GameObject.

virtual void DOL.GS.GameDragon.OnRetrieverArrived ( GameNPC  sender) [virtual]

Invoked when retriever type mob has reached its target location.

Parameters:
senderThe retriever mob.

Reimplemented in DOL.GS.Cuuldurach, and DOL.GS.Gjalpinulva.

void DOL.GS.GameDragon.ReportNews ( GameObject  killer) [protected]

Post a message in the server news and award a dragon kill point for every XP gainer in the raid.

Parameters:
killerThe living that got the killing blow.
GameNPC DOL.GS.GameDragon.SpawnTimedAdd ( int  templateID,
int  level,
int  x,
int  y,
int  uptime,
bool  isRetriever 
) [protected]

Create an add from the specified template.

Parameters:
templateID
level
x
y
uptime
Returns:
override void DOL.GS.GameDragon.TakeDamage ( GameObject  source,
eDamageType  damageType,
int  damageAmount,
int  criticalAmount 
) [virtual]

Take some amount of damage inflicted by another GameObject.

Parameters:
sourceThe object inflicting the damage.
damageTypeThe type of damage.
damageAmountThe amount of damage inflicted.
criticalAmountThe critical amount of damage inflicted

Reimplemented from DOL.GS.GameLiving.

override void DOL.GS.GameDragon.WalkToSpawn ( ) [virtual]

Return to spawn point, dragon can't be attacked while it's on it's way.

Reimplemented from DOL.GS.GameNPC.


Member Data Documentation

String [] DOL.GS.GameDragon.m_breathAnnounce [protected]

Announcements for Breath, Glare and death.


Property Documentation

override int DOL.GS.GameDragon.AttackRange [get, set]

Returns the AttackRange of this living.

Reimplemented from DOL.GS.GameLiving.

abstract Spell DOL.GS.GameDragon.Breath [get, protected]

The Breath spell. Override this property in your dragon implementation and assign the spell to m_breathSpell.

Reimplemented in DOL.GS.Cuuldurach, DOL.GS.Gjalpinulva, and DOL.GS.Golestandt.

virtual int DOL.GS.GameDragon.DragonDifficulty [get]

Set the dragon difficulty in percent of its max abilities 100 = full strength.

abstract Spell DOL.GS.GameDragon.Glare [get, protected]

The Glare spell. Override this property in your dragon implementation and assign the spell to m_glareSpell.

Reimplemented in DOL.GS.Cuuldurach, DOL.GS.Gjalpinulva, and DOL.GS.Golestandt.

int DOL.GS.GameDragon.GlareChance [get, protected]

Chance to cast Glare when a potential target has been detected.

int DOL.GS.GameDragon.HealthPercentOld [get, set]

The amount of health before the most recent attack.

override short DOL.GS.GameDragon.MaxSpeedBase [get, set]

Gets or sets the base max speed of this living.

Reimplemented from DOL.GS.GameLiving.

abstract Spell DOL.GS.GameDragon.MeleeDebuff [get, protected]

The melee debuff spell. Override this property in your dragon implementation and assign the spell to m_meleeDebuffSpell.

Reimplemented in DOL.GS.Cuuldurach, DOL.GS.Gjalpinulva, and DOL.GS.Golestandt.

int DOL.GS.GameDragon.MeleeDebuffChance [get, protected]

Chance to cast a melee debuff.

int DOL.GS.GameDragon.PlayersInLair [get]

The number of players in the dragon's lair.

abstract Spell DOL.GS.GameDragon.RangedDebuff [get, protected]

The melee debuff spell. Override this property in your dragon implementation and assign the spell to m_rangedDebuffSpell.

Reimplemented in DOL.GS.Cuuldurach, DOL.GS.Gjalpinulva, and DOL.GS.Golestandt.

int DOL.GS.GameDragon.RangedDebuffChance [get, protected]

Chance to cast nearsight.

abstract Spell DOL.GS.GameDragon.ResistDebuff [get, protected]

The resist debuff spell. Override this property in your dragon implementation and assign the spell to m_debuffSpell.

Reimplemented in DOL.GS.Cuuldurach, DOL.GS.Gjalpinulva, and DOL.GS.Golestandt.

override int DOL.GS.GameDragon.RespawnInterval [get]

The Respawn Interval of this mob in milliseconds.

Reimplemented from DOL.GS.GameNPC.

override short DOL.GS.GameDragon.Strength [get]

Gets NPC's strength.

Reimplemented from DOL.GS.GameNPC.

virtual Spell DOL.GS.GameDragon.Stun [get, protected]

The stun spell.

int DOL.GS.GameDragon.StunChance [get, protected]

Chance to cast stun.

int DOL.GS.GameDragon.ThrowChance [get, protected]

Chance to throw a player.


The documentation for this class was generated from the following file:
All Classes Namespaces Functions Variables Enumerations Properties Events