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

Keep guard is gamemob with just different brain and load from other DB table. More...

Inheritance diagram for DOL.GS.Keeps.GameKeepGuard:
DOL.GS.GameNPC DOL.GS.Keeps.IKeepItem DOL.GS.GameLiving DOL.GS.GameObject DOL.GS.Point3D DOL.GS.Point2D DOL.GS.IPoint3D DOL.GS.IPoint2D DOL.GS.IPoint2D DOL.GS.Keeps.FrontierHastener DOL.GS.Keeps.GuardArcher DOL.GS.Keeps.GuardCaster DOL.GS.Keeps.GuardFighter DOL.GS.Keeps.GuardHealer DOL.GS.Keeps.GuardLord DOL.GS.Keeps.GuardStealther DOL.GS.Keeps.MissionMaster

List of all members.

Public Member Functions

override double GetArmorAbsorb (eArmorSlot slot)
 Calculates armor absorb level.
override int AttackSpeed (params InventoryItem[] weapon)
 Here we set the speeds we want our guards to have, this affects weapon damage.
override void StartAttack (GameObject attackTarget)
 Override for StartAttack which chooses Ranged or Melee attack.
void GuardStartAttackCheckLOS (GamePlayer player, ushort response, ushort targetOID)
 We only attack if we have LOS.
void GuardStopAttackCheckLOS (GamePlayer player, ushort response, ushort targetOID)
 If we don't have LOS we stop attack.
void GuardStartSpellHealCheckLOS (GamePlayer player, ushort response, ushort targetOID)
void GuardStartSpellNukeCheckLOS (GamePlayer player, ushort response, ushort targetOID)
override bool IsObjectInFront (GameObject target, double viewangle, bool rangeCheck=true)
 Because of Spell issues, we will always return this true.
override void OnAttackedByEnemy (AttackData ad)
 Static archers attack with melee the closest if being engaged in melee.
override void Die (GameObject killer)
 When guards Die and it isnt a keep reset (this killer) we call GuardSpam function.
int GetEnemyCountInArea ()
 Gets the count of enemies in the Area.
override bool AddToWorld ()
 When we add a guard to the world, we also attach an AttackFinished handler We use this to check LOS and range issues for our ranged guards.
override bool RemoveFromWorld ()
 When we remove from world, we remove our special handler.
void StopRespawn ()
 Method to stop a guards respawn.
override IList GetExamineMessages (GamePlayer player)
 Gets the messages when you click on a guard.
override string GetPronoun (int form, bool firstLetterUppercase)
 Gets the pronoun for the guards gender.
override void LoadFromDatabase (DataObject mobobject)
 Load the guard from the database.
void DeleteObject ()
override void Delete ()
 Marks this object as deleted!
override void DeleteFromDatabase ()
 Deletes the mob from the database.
void LoadFromPosition (DBKeepPosition pos, GameKeepComponent component)
 Load the guard from a position.
void MoveToPosition (DBKeepPosition position)
 Move a guard to a position.
void ChangeGuild ()
 Change guild of guard (emblem on equipment) when keep is claimed.
override void WalkTo (int tx, int ty, int tz, short speed)
 Adding special handling for walking to a point for patrol guards to be in a formation.
override void WalkToSpawn ()
 Walk to the spawn point, always max speed for keep guards, or continue patrol.

Static Public Member Functions

static void AttackFinished (DOLEvent e, object sender, EventArgs arguments)
 We need an event after an attack is finished so we know when players are unreachable by archery.
static void GuardSpam (GameKeepGuard guard)
 Sends message to guild for guard death with enemy count in area.

Protected Member Functions

override int RespawnTimerCallback (RegionTimer respawnTimer)
 When guards respawn we refresh them, if a patrol guard respawns we call a special function to update leadership.

Properties

Patrol PatrolGroup [get, set]
string TemplateID [get, set]
GameKeepComponent Component [get, set]
DBKeepPosition Position [get, set]
GameKeepHookPoint HookPoint [get, set]
eRealm ModelRealm [get, set]
bool IsTowerGuard [get]
bool IsPortalKeepGuard [get]
override byte Level [get, set]
 We do this because if we set level when a guard is waiting to respawn, the guard will never respawn because the guard is given full health and is then considered alive.
override int Mana [get]
 Guards always have Mana to cast spells.
override int MaxHealth [get]
override int AttackRange [get, set]
 When moving guards have difficulty attacking players, so we double there attack range)
virtual int AttackRangeDistance [get]
 The distance attack range.
bool CanUseRanged [get]
 Method to see if the Guard has been left alone long enough to use Ranged attacks.
bool BeenAttackedRecently [get]
 Has the NPC been attacked recently.. currently 10 seconds.

Detailed Description

Keep guard is gamemob with just different brain and load from other DB table.


Member Function Documentation

override bool DOL.GS.Keeps.GameKeepGuard.AddToWorld ( ) [virtual]

When we add a guard to the world, we also attach an AttackFinished handler We use this to check LOS and range issues for our ranged guards.

Returns:

Reimplemented from DOL.GS.GameNPC.

Reimplemented in DOL.GS.Keeps.GuardCaster, and DOL.GS.Keeps.GuardLord.

static void DOL.GS.Keeps.GameKeepGuard.AttackFinished ( DOLEvent  e,
object  sender,
EventArgs  arguments 
) [static]

We need an event after an attack is finished so we know when players are unreachable by archery.

Parameters:
e
sender
arguments
override int DOL.GS.Keeps.GameKeepGuard.AttackSpeed ( params InventoryItem[]  weapon) [virtual]

Here we set the speeds we want our guards to have, this affects weapon damage.

Parameters:
weapon
Returns:

Reimplemented from DOL.GS.GameLiving.

void DOL.GS.Keeps.GameKeepGuard.ChangeGuild ( )

Change guild of guard (emblem on equipment) when keep is claimed.

override void DOL.GS.Keeps.GameKeepGuard.Delete ( ) [virtual]

Marks this object as deleted!

Reimplemented from DOL.GS.GameNPC.

override void DOL.GS.Keeps.GameKeepGuard.DeleteFromDatabase ( ) [virtual]

Deletes the mob from the database.

Reimplemented from DOL.GS.GameNPC.

override void DOL.GS.Keeps.GameKeepGuard.Die ( GameObject  killer) [virtual]

When guards Die and it isnt a keep reset (this killer) we call GuardSpam function.

Parameters:
killer

Reimplemented from DOL.GS.GameNPC.

Reimplemented in DOL.GS.Keeps.GuardLord.

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

Calculates armor absorb level.

Parameters:
slot
Returns:

Reimplemented from DOL.GS.GameLiving.

int DOL.GS.Keeps.GameKeepGuard.GetEnemyCountInArea ( )

Gets the count of enemies in the Area.

Returns:
override IList DOL.GS.Keeps.GameKeepGuard.GetExamineMessages ( GamePlayer  player) [virtual]

Gets the messages when you click on a guard.

Parameters:
playerThe player that has done the clicking
Returns:

Reimplemented from DOL.GS.GameNPC.

Reimplemented in DOL.GS.Keeps.FrontierHastener.

override string DOL.GS.Keeps.GameKeepGuard.GetPronoun ( int  form,
bool  firstLetterUppercase 
) [virtual]

Gets the pronoun for the guards gender.

Parameters:
formForm of the pronoun
firstLetterUppercaseWeather or not we want the first letter uppercase
Returns:

Reimplemented from DOL.GS.GameNPC.

static void DOL.GS.Keeps.GameKeepGuard.GuardSpam ( GameKeepGuard  guard) [static]

Sends message to guild for guard death with enemy count in area.

Parameters:
guardThe guard object
void DOL.GS.Keeps.GameKeepGuard.GuardStartAttackCheckLOS ( GamePlayer  player,
ushort  response,
ushort  targetOID 
)

We only attack if we have LOS.

Parameters:
player
response
targetOID
void DOL.GS.Keeps.GameKeepGuard.GuardStopAttackCheckLOS ( GamePlayer  player,
ushort  response,
ushort  targetOID 
)

If we don't have LOS we stop attack.

Parameters:
player
response
targetOID
override bool DOL.GS.Keeps.GameKeepGuard.IsObjectInFront ( GameObject  target,
double  viewangle,
bool  rangeCheck = true 
) [virtual]

Because of Spell issues, we will always return this true.

Parameters:
target
viewangle
Returns:

Reimplemented from DOL.GS.GameObject.

override void DOL.GS.Keeps.GameKeepGuard.LoadFromDatabase ( DataObject  mobobject) [virtual]

Load the guard from the database.

Parameters:
mobobjectThe database mobobject

Reimplemented from DOL.GS.GameNPC.

void DOL.GS.Keeps.GameKeepGuard.LoadFromPosition ( DBKeepPosition  pos,
GameKeepComponent  component 
)

Load the guard from a position.

Parameters:
posThe position for the guard
componentThe component it is being spawned on

Implements DOL.GS.Keeps.IKeepItem.

void DOL.GS.Keeps.GameKeepGuard.MoveToPosition ( DBKeepPosition  position)

Move a guard to a position.

Parameters:
positionThe new position for the guard

Implements DOL.GS.Keeps.IKeepItem.

override void DOL.GS.Keeps.GameKeepGuard.OnAttackedByEnemy ( AttackData  ad) [virtual]

Static archers attack with melee the closest if being engaged in melee.

Parameters:
ad

Reimplemented from DOL.GS.GameLiving.

override bool DOL.GS.Keeps.GameKeepGuard.RemoveFromWorld ( ) [virtual]

When we remove from world, we remove our special handler.

Returns:

Reimplemented from DOL.GS.GameNPC.

override int DOL.GS.Keeps.GameKeepGuard.RespawnTimerCallback ( RegionTimer  respawnTimer) [protected, virtual]

When guards respawn we refresh them, if a patrol guard respawns we call a special function to update leadership.

Parameters:
respawnTimer
Returns:

Reimplemented from DOL.GS.GameNPC.

override void DOL.GS.Keeps.GameKeepGuard.StartAttack ( GameObject  attackTarget) [virtual]

Override for StartAttack which chooses Ranged or Melee attack.

Parameters:
attackTarget

Reimplemented from DOL.GS.GameNPC.

void DOL.GS.Keeps.GameKeepGuard.StopRespawn ( )

Method to stop a guards respawn.

override void DOL.GS.Keeps.GameKeepGuard.WalkTo ( int  tx,
int  ty,
int  tz,
short  speed 
) [virtual]

Adding special handling for walking to a point for patrol guards to be in a formation.

Parameters:
tx
ty
tz
speed

Reimplemented from DOL.GS.GameNPC.

override void DOL.GS.Keeps.GameKeepGuard.WalkToSpawn ( ) [virtual]

Walk to the spawn point, always max speed for keep guards, or continue patrol.

Reimplemented from DOL.GS.GameNPC.


Property Documentation

override int DOL.GS.Keeps.GameKeepGuard.AttackRange [get, set]

When moving guards have difficulty attacking players, so we double there attack range)

Reimplemented from DOL.GS.GameLiving.

virtual int DOL.GS.Keeps.GameKeepGuard.AttackRangeDistance [get]

The distance attack range.

Reimplemented in DOL.GS.Keeps.GuardArcher, and DOL.GS.Keeps.GuardLord.

bool DOL.GS.Keeps.GameKeepGuard.BeenAttackedRecently [get]

Has the NPC been attacked recently.. currently 10 seconds.

bool DOL.GS.Keeps.GameKeepGuard.CanUseRanged [get]

Method to see if the Guard has been left alone long enough to use Ranged attacks.

Returns:
override byte DOL.GS.Keeps.GameKeepGuard.Level [get, set]

We do this because if we set level when a guard is waiting to respawn, the guard will never respawn because the guard is given full health and is then considered alive.

Reimplemented from DOL.GS.GameNPC.

override int DOL.GS.Keeps.GameKeepGuard.Mana [get]

Guards always have Mana to cast spells.

Reimplemented from DOL.GS.GameNPC.


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