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

This class holds all information that EVERY object in the game world needs! More...

Inheritance diagram for DOL.GS.GameObject:
DOL.GS.Point3D DOL.GS.Point2D DOL.GS.IPoint3D DOL.GS.IPoint2D DOL.GS.IPoint2D DOL.GS.GameLiving DOL.GS.GameStaticItem DOL.GS.Relics.RelicPad DOL.GS.Relics.RelicPillar DOL.GS.GameDoor DOL.GS.GameNPC DOL.GS.GamePlayer DOL.GS.Keeps.GameKeepComponent DOL.GS.Keeps.GameKeepDoor DOL.GS.Keeps.GameRelicDoor DOL.GS.DjinnStone DOL.GS.GameGravestone DOL.GS.GameRelic DOL.GS.GameRelicPad DOL.GS.GameStaticItemTimed DOL.GS.GameVault DOL.GS.Housing.GameLotMarker DOL.GS.Keeps.FrontiersPortalStone DOL.GS.Keeps.GameKeepBanner DOL.GS.MinotaurRelic DOL.GS.RealmAbilities.Statics.GenericBase

List of all members.

Public Types

enum  eObjectState { Active, Inactive, Deleted }
 Holds the current state of the object. More...

Public Member Functions

ushort GetHeadingToSpot (int tx, int ty)
 Calculates the heading this object needs to have to face the target spot.
ushort GetHeadingToTarget (IPoint3D target)
 Calculates the heading this object needs to have, to face the target.
float GetAngleToTarget (GameObject target)
 Returns the angle towards a target, clockwise.
float GetAngleToSpot (int x, int y)
void GetSpotFromHeading (int distance, out int tx, out int ty)
float GetAngle (IPoint2D point)
 Returns the angle towards a target spot in degrees, clockwise.
override int GetDistanceTo (IPoint3D point)
 Get distance to a point.
override int GetDistanceTo (IPoint3D point, double zfactor)
 Get distance to a point (with z-axis adjustment)
bool IsWithinRadius (GameObject obj, int radius, bool ignoreZ=false)
 Checks if an object is within a given radius, optionally ignoring z values.
virtual bool IsObjectInFront (GameObject target, double viewangle, bool rangeCheck=true)
 determines wether a target object is front in front is defined as north +- viewangle/2
virtual bool IsVisibleTo (GameObject checkObject)
 Is this object visible to another? This does not check for stealth.
virtual byte GetDisplayLevel (GamePlayer player)
 What level is displayed to another player.
virtual string GetName (int article, bool firstLetterUppercase)
 Returns name with article for nouns.
String Capitalize (bool capitalize, String text)
virtual string GetPronoun (int form, bool firstLetterUppercase)
 Pronoun of this object in case you need to refer it in 3rd person http://webster.commnet.edu/grammar/cases.htm.
virtual IList GetExamineMessages (GamePlayer player)
 Adds messages to ArrayList which are sent when object is targeted.
virtual void SaveIntoDatabase ()
 Saves an object into the database.
virtual void LoadFromDatabase (DataObject obj)
virtual void DeleteFromDatabase ()
 Deletes a character from the DB.
virtual bool Create (ushort regionID, int x, int y, int z, ushort heading)
 Creates this object in the gameworld.
virtual bool AddToWorld ()
 Creates the item in the world.
virtual bool RemoveFromWorld ()
 Removes the item from the world.
virtual bool MoveTo (GameLocation loc)
 Move this object to a GameLocation.
virtual bool MoveTo (ushort regionID, int x, int y, int z, ushort heading)
 Moves the item from one spot to another spot, possible even over region boundaries.
virtual void Delete ()
 Marks this object as deleted!
void LoadDataQuests ()
 Load any data driven quests for this object.
void AddDataQuest (DataQuest quest)
void RemoveDataQuest (DataQuest quest)
virtual bool Interact (GamePlayer player)
 This function is called from the ObjectInteractRequestHandler.
virtual void TakeDamage (AttackData ad)
 This living takes damage.
virtual void TakeDamage (GameObject source, eDamageType damageType, int damageAmount, int criticalAmount)
 This method is called whenever this living should take damage from some source.
double GetConLevel (GameObject compare)
 Calculate con-level against other object <=-3 = grey.
virtual void Notify (DOLEvent e, object sender, EventArgs args)
virtual void Notify (DOLEvent e, object sender)
virtual void Notify (DOLEvent e)
virtual void Notify (DOLEvent e, EventArgs args)
IEnumerable GetPlayersInRadius (ushort radiusToCheck)
 Gets all players close to this object inside a certain radius.
IEnumerable GetPlayersInRadius (ushort radiusToCheck, bool ignoreZ)
IEnumerable GetPlayersInRadius (bool useCache, ushort radiusToCheck)
IEnumerable GetPlayersInRadius (bool useCache, ushort radiusToCheck, bool ignoreZ)
 Gets all players close to this object inside a certain radius.
IEnumerable GetPlayersInRadius (ushort radiusToCheck, bool withDistance, bool ignoreZ)
 Gets all players close to this object inside a certain radius.
IEnumerable GetPlayersInRadius (bool useCache, ushort radiusToCheck, bool withDistance, bool ignoreZ)
 Gets all players close to this object inside a certain radius.
IEnumerable GetNPCsInRadius (ushort radiusToCheck)
 Gets all npcs close to this object inside a certain radius.
IEnumerable GetNPCsInRadius (ushort radiusToCheck, bool ignoreZ)
IEnumerable GetNPCsInRadius (bool useCache, ushort radiusToCheck)
 Gets all npcs close to this object inside a certain radius.
IEnumerable GetNPCsInRadius (bool useCache, ushort radiusToCheck, bool ignoreZ)
IEnumerable GetNPCsInRadius (bool useCache, ushort radiusToCheck, bool withDistance, bool ignoreZ)
 Gets all npcs close to this object inside a certain radius.
IEnumerable GetItemsInRadius (ushort radiusToCheck)
 Gets all items close to this object inside a certain radius.
IEnumerable GetItemsInRadius (ushort radiusToCheck, bool withDistance)
 Gets all items close to this object inside a certain radius.
IEnumerable GetDoorsInRadius (ushort radiusToCheck)
 Gets all doors close to this object inside a certain radius.
IEnumerable GetDoorsInRadius (ushort radiusToCheck, bool withDistance)
 Gets all doors close to this object inside a certain radius.
virtual bool ReceiveItem (GameLiving source, InventoryItem item)
 Called when the object is about to get an item from someone.
virtual bool ReceiveItem (GameLiving source, string templateID)
 Called when the object is about to get an item from someone.
virtual bool ReceiveItem (GameLiving source, WorldInventoryItem item)
 Receive an item from a living.
virtual bool ReceiveMoney (GameLiving source, long money)
 Called when the object is about to get money from someone.
virtual bool HasEffect (Spell spell)
 Returns true if the object has the spell effect, else false.
virtual bool HasEffect (Type effectType)
 Returns true if the object has a spell effect of a given type, else false.
override string ToString ()
 Returns the string representation of the GameObject.
 GameObject ()
 Constructs a new empty GameObject.

Static Public Member Functions

static void FillDataQuestCache ()
 Fill the data quest cache with all DBDataQuest objects.
static double GetConLevel (int level, int compareLevel)
 Calculate con-level against other compareLevel.
static int GetLevelFromCon (int level, double con)
 Calculate a level based on source level and a con level.
static bool PlayerHasItem (GamePlayer player, string str)
static string ObjectHasOwner ()

Protected Attributes

volatile eObjectState m_ObjectState
 The Object's state! This is needed because when we remove an object it isn't instantly deleted but the state is merely set to "Deleted" This prevents the object from vanishing when there still might be enumerations running over it. A timer will collect the deleted objects and free them at certain intervals.
Region m_CurrentRegion
 The Object's current Region.
ushort m_Heading
 The direction the Object is facing.
eRealm m_Realm
 Holds the realm of this object.
string m_ownerID
byte m_level
 The level of the Object.
string m_name
 The name of the Object.
string m_guildName
 The guild name of the Object.
ushort m_model
 The model of the Object.
int m_health
int m_maxHealth
 Gets/sets the maximum amount of health.
bool m_saveInDB
 True if this object is saved in the DB.
int m_ObjectID = -1
 The objectID. This is -1 as long as the object is not added to a region!
string m_InternalID
 The internalID. This is the unique ID of the object in the DB!
long m_spawnTick = 0
 Holds the GameTick of when this object was added to the world.
List< DataQuestm_dataQuests = new List<DataQuest>()
 List of DataQuests available for this object.
bool m_isDataQuestsLoaded = false
 Flag to prevent loading quests on every respawn.

Static Protected Attributes

static IList< DBDataQuest > m_dataQuestCache = null
 A cache of every DBDataQuest object.

Properties

eObjectState ObjectState [get, set]
 Returns the current state of the object. Object's with state "Deleted" should not be used!
virtual eRealm Realm [get, set]
 Gets or Sets the current Realm of the Object.
virtual Region CurrentRegion [get, set]
 Gets or Sets the current Region of the Object.
virtual string OwnerID [get, set]
 Gets or sets the owner ID for this object.
virtual ushort CurrentRegionID [get, set]
 Get's or sets the current Region by the ID.
Zone CurrentZone [get]
 Gets the current Zone of the Object.
virtual ushort Heading [get, set]
 Gets the current direction the Object is facing.
virtual bool IsUnderwater [get]
 Checks if object is underwater.
virtual IList CurrentAreas [get, set]
 Holds all areas this object is currently within.
House CurrentHouse [get, set]
 Either the house an object is in or working on (player editing a house)
bool InHouse [get, set]
virtual byte Level [get, set]
 Gets or Sets the current level of the Object.
virtual int EffectiveLevel [get, set]
 Gets or Sets the effective level of the Object.
virtual string Name [get, set]
 Gets or Sets the current Name of the Object.
virtual string GuildName [get, set]
virtual ushort Model [get, set]
 Gets or Sets the current Model of the Object.
virtual bool IsAttackable [get]
 Whether or not the object can be attacked.
virtual bool IsAttackableDoor [get]
virtual int Health [get, set]
virtual int MaxHealth [get, set]
virtual byte HealthPercent [get]
 Gets the Health in percent 0..100.
virtual byte HealthPercentGroupWindow [get]
 Health as it should display in the group window.
int ObjectID [get, set]
 Gets or Sets the current ObjectID of the Object This is done automatically by the Region and should not be done manually!!!
string InternalID [get, set]
 Gets or Sets the internal ID (DB ID) of the Object.
bool SaveInDB [get, set]
 Sets the state for this object on whether or not it is saved in the database.
long SpawnTick [get]
 Gets the GameTick of when this object was added to the world.
static IList< DBDataQuest > DataQuestCache [get]
 Get a preloaded list of all data quests.
List< DataQuestDataQuestList [get]
 All the data driven quests for this object.
virtual int InteractDistance [get]
 The distance this object can be interacted with.
virtual eGender Gender [get, set]
 All objects are neutral.

Detailed Description

This class holds all information that EVERY object in the game world needs!


Member Enumeration Documentation

Holds the current state of the object.

Enumerator:
Active 

Active, visibly in world.

Inactive 

Inactive, currently being moved or stuff.

Deleted 

Deleted, waiting to be cleaned up.


Constructor & Destructor Documentation

DOL.GS.GameObject.GameObject ( )

Constructs a new empty GameObject.


Member Function Documentation

virtual bool DOL.GS.GameObject.Create ( ushort  regionID,
int  x,
int  y,
int  z,
ushort  heading 
) [virtual]

Creates this object in the gameworld.

Parameters:
regionIDregion target
xx target
yy target
zz target
headingheading
Returns:
true if created successfully
virtual void DOL.GS.GameObject.Delete ( ) [virtual]
virtual void DOL.GS.GameObject.DeleteFromDatabase ( ) [virtual]
static void DOL.GS.GameObject.FillDataQuestCache ( ) [static]

Fill the data quest cache with all DBDataQuest objects.

float DOL.GS.GameObject.GetAngle ( IPoint2D  point)

Returns the angle towards a target spot in degrees, clockwise.

Parameters:
txtarget x
tytarget y
Returns:
the angle towards the spot
float DOL.GS.GameObject.GetAngleToTarget ( GameObject  target)

Returns the angle towards a target, clockwise.

Parameters:
targetthe target
Returns:
the angle towards the target
double DOL.GS.GameObject.GetConLevel ( GameObject  compare)

Calculate con-level against other object <=-3 = grey.

-2 = green -1 = blue 0 = yellow (same level) 1 = orange 2 = red >=3 = violet

Returns:
conlevel
static double DOL.GS.GameObject.GetConLevel ( int  level,
int  compareLevel 
) [static]

Calculate con-level against other compareLevel.

-3- = grey -2 = green -1 = blue (compareLevel is 1 con lower) 0 = yellow (same level) 1 = orange (compareLevel is 1 con higher) 2 = red 3+ = violet

Returns:
conlevel
virtual byte DOL.GS.GameObject.GetDisplayLevel ( GamePlayer  player) [virtual]

What level is displayed to another player.

Reimplemented in DOL.GS.GamePlayer.

override int DOL.GS.GameObject.GetDistanceTo ( IPoint3D  point,
double  zfactor 
) [virtual]

Get distance to a point (with z-axis adjustment)

If either Z-value is zero, the z-axis is ignored

Parameters:
pointTarget point
zfactorZ-axis factor - use values between 0 and 1 to decrease the influence of Z-axis
Returns:
Adjusted distance or int.MaxValue if distance cannot be calculated

Reimplemented from DOL.GS.Point3D.

override int DOL.GS.GameObject.GetDistanceTo ( IPoint3D  point) [virtual]

Get distance to a point.

If either Z-value is zero, the z-axis is ignored

Parameters:
pointTarget point
Returns:
Distance or int.MaxValue if distance cannot be calculated

Reimplemented from DOL.GS.Point3D.

IEnumerable DOL.GS.GameObject.GetDoorsInRadius ( ushort  radiusToCheck)

Gets all doors close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetDoorsInRadius ( ushort  radiusToCheck,
bool  withDistance 
)

Gets all doors close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
withDistanceif the objects are to be returned with distance
Returns:
An enumerator
ushort DOL.GS.GameObject.GetHeadingToSpot ( int  tx,
int  ty 
)

Calculates the heading this object needs to have to face the target spot.

Parameters:
txtarget x
tytarget y
Returns:
the heading towards the target spot
ushort DOL.GS.GameObject.GetHeadingToTarget ( IPoint3D  target)

Calculates the heading this object needs to have, to face the target.

Parameters:
targetIPoint3D target
Returns:
the heading towards the target
IEnumerable DOL.GS.GameObject.GetItemsInRadius ( ushort  radiusToCheck)

Gets all items close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetItemsInRadius ( ushort  radiusToCheck,
bool  withDistance 
)

Gets all items close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
withDistanceif the objects are to be returned with distance
Returns:
An enumerator
static int DOL.GS.GameObject.GetLevelFromCon ( int  level,
double  con 
) [static]

Calculate a level based on source level and a con level.

Parameters:
level
con
Returns:
virtual string DOL.GS.GameObject.GetName ( int  article,
bool  firstLetterUppercase 
) [virtual]

Returns name with article for nouns.

Parameters:
article0=definite, 1=indefinite
firstLetterUppercaseForces the first letter of the returned string to be upper case
Returns:
name of this object (includes article if needed)

Reimplemented in DOL.GS.GameStaticItem, DOL.GS.Keeps.GameKeepDoor, and DOL.GS.Keeps.GameRelicDoor.

IEnumerable DOL.GS.GameObject.GetNPCsInRadius ( ushort  radiusToCheck)

Gets all npcs close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetNPCsInRadius ( bool  useCache,
ushort  radiusToCheck 
)

Gets all npcs close to this object inside a certain radius.

Parameters:
useCacheuse the cache
radiusToCheckthe radius to check
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetNPCsInRadius ( bool  useCache,
ushort  radiusToCheck,
bool  withDistance,
bool  ignoreZ 
)

Gets all npcs close to this object inside a certain radius.

Parameters:
useCacheuse the cache
radiusToCheckthe radius to check
withDistanceif the objects are to be returned with distance
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetPlayersInRadius ( ushort  radiusToCheck)

Gets all players close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetPlayersInRadius ( bool  useCache,
ushort  radiusToCheck,
bool  withDistance,
bool  ignoreZ 
)

Gets all players close to this object inside a certain radius.

Parameters:
useCachetrue may return a cached result, false not.
radiusToCheckthe radius to check
withDistanceif the objects are to be returned with distance
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetPlayersInRadius ( ushort  radiusToCheck,
bool  withDistance,
bool  ignoreZ 
)

Gets all players close to this object inside a certain radius.

Parameters:
radiusToCheckthe radius to check
withDistanceif the objects are to be returned with distance
Returns:
An enumerator
IEnumerable DOL.GS.GameObject.GetPlayersInRadius ( bool  useCache,
ushort  radiusToCheck,
bool  ignoreZ 
)

Gets all players close to this object inside a certain radius.

Parameters:
useCachetrue may return a cached result, false not.
radiusToCheckthe radius to check
Returns:
An enumerator
virtual string DOL.GS.GameObject.GetPronoun ( int  form,
bool  firstLetterUppercase 
) [virtual]

Pronoun of this object in case you need to refer it in 3rd person http://webster.commnet.edu/grammar/cases.htm.

Parameters:
firstLetterUppercase
form0=Subjective, 1=Possessive, 2=Objective
Returns:
pronoun of this object

Reimplemented in DOL.GS.GameNPC, DOL.GS.GamePlayer, and DOL.GS.Keeps.GameKeepGuard.

virtual bool DOL.GS.GameObject.HasEffect ( Spell  spell) [virtual]

Returns true if the object has the spell effect, else false.

Parameters:
spell
Returns:

Reimplemented in DOL.GS.GameLiving.

virtual bool DOL.GS.GameObject.HasEffect ( Type  effectType) [virtual]

Returns true if the object has a spell effect of a given type, else false.

Parameters:
spell
Returns:

Reimplemented in DOL.GS.GameLiving.

virtual bool DOL.GS.GameObject.Interact ( GamePlayer  player) [virtual]

This function is called from the ObjectInteractRequestHandler.

Parameters:
playerGamePlayer that interacts with this object
Returns:
false if interaction is prevented

Reimplemented in DOL.GS.Arbiter, DOL.GS.ArtifactCreditMerchant, DOL.GS.ArtifactScholar, DOL.GS.Researcher, DOL.GS.Scholar, DOL.GS.AncientBoundDjinn, DOL.GS.SummonDjinnStone, DOL.GS.SummonedDjinn, DOL.GS.Blacksmith, DOL.GS.GameConsignmentMerchant, DOL.GS.CraftNPC, DOL.GS.EmblemNPC, DOL.GS.Enchanter, DOL.GS.FaceCustomiser, DOL.GS.KingNPC, DOL.GS.GameTrainer, DOL.GS.GuildRegistrar, DOL.GS.GameHastener, DOL.GS.GameHealer, DOL.GS.MarketExplorer, DOL.GS.NameRegistrar, DOL.GS.Recharger, DOL.GS.RoyalTreasuryClerk, DOL.GS.TaskMaster, DOL.GS.AlbionSITeleporter, DOL.GS.AlbionTeleporter, DOL.GS.HiberniaSITeleporter, DOL.GS.HiberniaTeleporter, DOL.GS.MidgardSITeleporter, DOL.GS.MidgardTeleporter, DOL.GS.SimpleTeleporter, DOL.GS.ThroneRoomTeleporter, DOL.GS.GameVaultKeeper, DOL.GS.GameBoat, DOL.GS.GameHouseVault, DOL.GS.GameMerchant, DOL.GS.GameItemCurrencyMerchant, DOL.GS.GameNPC, DOL.GS.GameSiegeWeapon, DOL.GS.GameTeleporter, DOL.GS.GameTrainingDummy, DOL.GS.GameVault, DOL.GS.Housing.GameLotMarker, DOL.GS.Keeps.FrontiersPortalStone, DOL.GS.Keeps.GameKeepDoor, DOL.GS.Keeps.GameRelicDoor, DOL.GS.Keeps.FrontierHastener, DOL.GS.Keeps.GuardLord, DOL.GS.Keeps.MissionMaster, DOL.GS.GameRelic, DOL.GS.MinotaurRelic, DOL.GS.Trainer.AcolyteTrainer, DOL.GS.Trainer.AlbionMaulerTrainer, DOL.GS.Trainer.AlbionRogueTrainer, DOL.GS.Trainer.ArmsmanTrainer, DOL.GS.Trainer.CabalistTrainer, DOL.GS.Trainer.ClericTrainer, DOL.GS.Trainer.DiscipleTrainer, DOL.GS.Trainer.ElementalistTrainer, DOL.GS.Trainer.FighterTrainer, DOL.GS.Trainer.FriarTrainer, DOL.GS.Trainer.HereticTrainer, DOL.GS.Trainer.InfiltratorTrainer, DOL.GS.Trainer.MageTrainer, DOL.GS.Trainer.MercenaryTrainer, DOL.GS.Trainer.MinstrelTrainer, DOL.GS.Trainer.NecromancerTrainer, DOL.GS.Trainer.PaladinTrainer, DOL.GS.Trainer.ReaverTrainer, DOL.GS.Trainer.ScoutTrainer, DOL.GS.Trainer.SorcererTrainer, DOL.GS.Trainer.TheurgistTrainer, DOL.GS.Trainer.WizardTrainer, DOL.GS.Trainer.AnimistTrainer, DOL.GS.Trainer.BainsheeTrainer, DOL.GS.Trainer.BardTrainer, DOL.GS.Trainer.BlademasterTrainer, DOL.GS.Trainer.ChampionTrainer, DOL.GS.Trainer.DruidTrainer, DOL.GS.Trainer.EldritchTrainer, DOL.GS.Trainer.EnchanterTrainer, DOL.GS.Trainer.ForesterTrainer, DOL.GS.Trainer.GuardianTrainer, DOL.GS.Trainer.HeroTrainer, DOL.GS.Trainer.HiberniaMaulerTrainer, DOL.GS.Trainer.MagicianTrainer, DOL.GS.Trainer.MentalistTrainer, DOL.GS.Trainer.NaturalistTrainer, DOL.GS.Trainer.NightshadeTrainer, DOL.GS.Trainer.RangerTrainer, DOL.GS.Trainer.StalkerTrainer, DOL.GS.Trainer.ValewalkerTrainer, DOL.GS.Trainer.VampiirTrainer, DOL.GS.Trainer.WardenTrainer, DOL.GS.Trainer.BerserkerTrainer, DOL.GS.Trainer.BonedancerTrainer, DOL.GS.Trainer.HealerTrainer, DOL.GS.Trainer.HunterTrainer, DOL.GS.Trainer.MidgardMaulerTrainer, DOL.GS.Trainer.MidgardRogueTrainer, DOL.GS.Trainer.MysticTrainer, DOL.GS.Trainer.RunemasterTrainer, DOL.GS.Trainer.SavageTrainer, DOL.GS.Trainer.SeerTrainer, DOL.GS.Trainer.ShadowbladeTrainer, DOL.GS.Trainer.ShamanTrainer, DOL.GS.Trainer.SkaldTrainer, DOL.GS.Trainer.SpiritmasterTrainer, DOL.GS.Trainer.ThaneTrainer, DOL.GS.Trainer.ValkyrieTrainer, DOL.GS.Trainer.VikingTrainer, DOL.GS.Trainer.WarlockTrainer, and DOL.GS.Trainer.WarriorTrainer.

virtual bool DOL.GS.GameObject.IsObjectInFront ( GameObject  target,
double  viewangle,
bool  rangeCheck = true 
) [virtual]

determines wether a target object is front in front is defined as north +- viewangle/2

Parameters:
target
viewangle
rangeCheck
Returns:

Reimplemented in DOL.GS.Keeps.GameKeepGuard.

virtual bool DOL.GS.GameObject.IsVisibleTo ( GameObject  checkObject) [virtual]

Is this object visible to another? This does not check for stealth.

Parameters:
checkObject
Returns:
bool DOL.GS.GameObject.IsWithinRadius ( GameObject  obj,
int  radius,
bool  ignoreZ = false 
)

Checks if an object is within a given radius, optionally ignoring z values.

Parameters:
objTarget object
radiusRadius
ignoreZIgnore Z values
Returns:
False if the object is null, in a different region, or outside the radius; otherwise true
void DOL.GS.GameObject.LoadDataQuests ( )

Load any data driven quests for this object.

virtual bool DOL.GS.GameObject.MoveTo ( ushort  regionID,
int  x,
int  y,
int  z,
ushort  heading 
) [virtual]

Moves the item from one spot to another spot, possible even over region boundaries.

Parameters:
regionIDnew regionid
xnew x
ynew y
znew z
headingnew heading
Returns:
true if moved

Reimplemented in DOL.GS.GameLiving, and DOL.GS.GamePlayer.

virtual bool DOL.GS.GameObject.MoveTo ( GameLocation  loc) [virtual]

Move this object to a GameLocation.

Parameters:
loc
Returns:
virtual bool DOL.GS.GameObject.ReceiveItem ( GameLiving  source,
InventoryItem  item 
) [virtual]
virtual bool DOL.GS.GameObject.ReceiveItem ( GameLiving  source,
string  templateID 
) [virtual]

Called when the object is about to get an item from someone.

Parameters:
sourceSource from where to get the item
templateIDtemplateID for item to add
Returns:
true if the item was successfully received
virtual bool DOL.GS.GameObject.ReceiveItem ( GameLiving  source,
WorldInventoryItem  item 
) [virtual]

Receive an item from a living.

Parameters:
source
item
Returns:
true if player took the item
virtual bool DOL.GS.GameObject.ReceiveMoney ( GameLiving  source,
long  money 
) [virtual]

Called when the object is about to get money from someone.

Parameters:
sourceSource from where to get the money
moneyarray of money to get
Returns:
true if the money was successfully received

Reimplemented in DOL.GS.GameLiving.

virtual bool DOL.GS.GameObject.RemoveFromWorld ( ) [virtual]
virtual void DOL.GS.GameObject.TakeDamage ( GameObject  source,
eDamageType  damageType,
int  damageAmount,
int  criticalAmount 
) [virtual]

This method is called whenever this living should take damage from some source.

Parameters:
sourcethe damage source
damageTypethe damage type
damageAmountthe amount of damage
criticalAmountthe amount of critical damage

Reimplemented in DOL.GS.GameDragon, DOL.GS.GameDoor, DOL.GS.GameLiving, DOL.GS.GameMovingObject, DOL.GS.GamePlayer, DOL.GS.GameSiegeWeapon, DOL.GS.Keeps.GameKeepComponent, DOL.GS.Keeps.GameKeepDoor, DOL.GS.Keeps.GameRelicDoor, DOL.GS.Keeps.GuardLord, DOL.GS.GameFont, DOL.GS.GameMine, and DOL.GS.GameStorm.

virtual void DOL.GS.GameObject.TakeDamage ( AttackData  ad) [virtual]

This living takes damage.

Parameters:
adAttackData containing damage details
override string DOL.GS.GameObject.ToString ( )

Returns the string representation of the GameObject.

Returns:

Reimplemented from DOL.GS.Point3D.

Reimplemented in DOL.GS.GamePlayer, DOL.GS.Keeps.GameKeepComponent, and DOL.GS.MinotaurRelic.


Member Data Documentation

The Object's current Region.

IList<DBDataQuest> DOL.GS.GameObject.m_dataQuestCache = null [static, protected]

A cache of every DBDataQuest object.

List<DataQuest> DOL.GS.GameObject.m_dataQuests = new List<DataQuest>() [protected]

List of DataQuests available for this object.

string DOL.GS.GameObject.m_guildName [protected]

The guild name of the Object.

ushort DOL.GS.GameObject.m_Heading [protected]

The direction the Object is facing.

string DOL.GS.GameObject.m_InternalID [protected]

The internalID. This is the unique ID of the object in the DB!

bool DOL.GS.GameObject.m_isDataQuestsLoaded = false [protected]

Flag to prevent loading quests on every respawn.

byte DOL.GS.GameObject.m_level [protected]

The level of the Object.

Gets/sets the maximum amount of health.

ushort DOL.GS.GameObject.m_model [protected]

The model of the Object.

string DOL.GS.GameObject.m_name [protected]

The name of the Object.

int DOL.GS.GameObject.m_ObjectID = -1 [protected]

The objectID. This is -1 as long as the object is not added to a region!

The Object's state! This is needed because when we remove an object it isn't instantly deleted but the state is merely set to "Deleted" This prevents the object from vanishing when there still might be enumerations running over it. A timer will collect the deleted objects and free them at certain intervals.

eRealm DOL.GS.GameObject.m_Realm [protected]

Holds the realm of this object.

bool DOL.GS.GameObject.m_saveInDB [protected]

True if this object is saved in the DB.

long DOL.GS.GameObject.m_spawnTick = 0 [protected]

Holds the GameTick of when this object was added to the world.


Property Documentation

virtual IList DOL.GS.GameObject.CurrentAreas [get, set]

Holds all areas this object is currently within.

Reimplemented in DOL.GS.GamePlayer.

House DOL.GS.GameObject.CurrentHouse [get, set]

Either the house an object is in or working on (player editing a house)

virtual Region DOL.GS.GameObject.CurrentRegion [get, set]

Gets or Sets the current Region of the Object.

Reimplemented in DOL.GS.GameNPC, DOL.GS.GamePlayer, and DOL.GS.GameSiegeWeapon.

virtual ushort DOL.GS.GameObject.CurrentRegionID [get, set]

Get's or sets the current Region by the ID.

Zone DOL.GS.GameObject.CurrentZone [get]

Gets the current Zone of the Object.

IList<DBDataQuest> DOL.GS.GameObject.DataQuestCache [static, get]

Get a preloaded list of all data quests.

List<DataQuest> DOL.GS.GameObject.DataQuestList [get]

All the data driven quests for this object.

virtual int DOL.GS.GameObject.EffectiveLevel [get, set]

Gets or Sets the effective level of the Object.

Reimplemented in DOL.GS.GameLiving, and DOL.GS.GameNPC.

virtual eGender DOL.GS.GameObject.Gender [get, set]

All objects are neutral.

Reimplemented in DOL.GS.GameNPC, and DOL.GS.GamePlayer.

virtual ushort DOL.GS.GameObject.Heading [get, set]

Gets the current direction the Object is facing.

Reimplemented in DOL.GS.GameLiving, DOL.GS.GameNPC, DOL.GS.GamePlayer, and DOL.GS.GameStaticItem.

virtual byte DOL.GS.GameObject.HealthPercent [get]

Gets the Health in percent 0..100.

virtual byte DOL.GS.GameObject.HealthPercentGroupWindow [get]

Health as it should display in the group window.

Reimplemented in DOL.GS.GamePlayer.

virtual int DOL.GS.GameObject.InteractDistance [get]

The distance this object can be interacted with.

Reimplemented in DOL.GS.GameTaxiBoat.

string DOL.GS.GameObject.InternalID [get, set]

Gets or Sets the internal ID (DB ID) of the Object.

virtual bool DOL.GS.GameObject.IsAttackable [get]

Whether or not the object can be attacked.

Reimplemented in DOL.GS.GameLiving, and DOL.GS.GamePlayer.

virtual bool DOL.GS.GameObject.IsUnderwater [get]

Checks if object is underwater.

Reimplemented in DOL.GS.GameNPC.

virtual byte DOL.GS.GameObject.Level [get, set]
virtual ushort DOL.GS.GameObject.Model [get, set]
virtual string DOL.GS.GameObject.Name [get, set]

Gets or Sets the current Name of the Object.

Reimplemented in DOL.GS.GameBoat, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, and DOL.GS.Keeps.FrontiersPortalStone.

int DOL.GS.GameObject.ObjectID [get, set]

Gets or Sets the current ObjectID of the Object This is done automatically by the Region and should not be done manually!!!

eObjectState DOL.GS.GameObject.ObjectState [get, set]

Returns the current state of the object. Object's with state "Deleted" should not be used!

virtual string DOL.GS.GameObject.OwnerID [get, set]

Gets or sets the owner ID for this object.

virtual eRealm DOL.GS.GameObject.Realm [get, set]
bool DOL.GS.GameObject.SaveInDB [get, set]

Sets the state for this object on whether or not it is saved in the database.

long DOL.GS.GameObject.SpawnTick [get]

Gets the GameTick of when this object was added to the world.


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