![]() |
Dawn of Light - Class documentation 2900
This is the Dawn of Light project
|
This class holds all information that EVERY object in the game world needs! More...
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< DataQuest > | m_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< DataQuest > | DataQuestList [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. |
This class holds all information that EVERY object in the game world needs!
DOL.GS.GameObject.GameObject | ( | ) |
Constructs a new empty GameObject.
virtual bool DOL.GS.GameObject.AddToWorld | ( | ) | [virtual] |
Creates the item in the world.
Reimplemented in DOL.GS.Researcher, DOL.GS.SpawnDjinnStone, DOL.GS.GameConsignmentMerchant, DOL.GS.GameTrainer, DOL.GS.AlbionSITeleporter, DOL.GS.AlbionTeleporter, DOL.GS.GameBoat, DOL.GS.GameLiving, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameSiegeWeapon, DOL.GS.GameStaticItem, DOL.GS.GameStaticItemTimed, DOL.GS.GameSiegeCauldron, DOL.GS.Keeps.FrontiersPortalStone, DOL.GS.Keeps.GuardCaster, DOL.GS.Keeps.GameKeepGuard, DOL.GS.Keeps.GuardLord, DOL.GS.GameRelicPad, DOL.GS.MinotaurRelic, DOL.GS.ArrektosProtector, DOL.GS.BaseProtector, and DOL.GS.RealmAbilities.Statics.GenericBase.
virtual bool DOL.GS.GameObject.Create | ( | ushort | regionID, |
int | x, | ||
int | y, | ||
int | z, | ||
ushort | heading | ||
) | [virtual] |
Creates this object in the gameworld.
regionID | region target |
x | x target |
y | y target |
z | z target |
heading | heading |
virtual void DOL.GS.GameObject.Delete | ( | ) | [virtual] |
Marks this object as deleted!
Reimplemented in DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, DOL.GS.GameStaticItemTimed, DOL.GS.WorldInventoryItem, DOL.GS.Keeps.GameKeepComponent, and DOL.GS.Keeps.GameKeepGuard.
virtual void DOL.GS.GameObject.DeleteFromDatabase | ( | ) | [virtual] |
Deletes a character from the DB.
Reimplemented in DOL.GS.GameMerchant, DOL.GS.GameNPC, DOL.GS.GameStaticItem, DOL.GS.Keeps.GameKeepBanner, and DOL.GS.Keeps.GameKeepGuard.
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.
tx | target x |
ty | target y |
float DOL.GS.GameObject.GetAngleToTarget | ( | GameObject | target | ) |
Returns the angle towards a target, clockwise.
target | 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
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
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
point | Target point |
zfactor | Z-axis factor - use values between 0 and 1 to decrease the influence of Z-axis |
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
point | Target point |
Reimplemented from DOL.GS.Point3D.
IEnumerable DOL.GS.GameObject.GetDoorsInRadius | ( | ushort | radiusToCheck | ) |
Gets all doors close to this object inside a certain radius.
radiusToCheck | the radius to check |
IEnumerable DOL.GS.GameObject.GetDoorsInRadius | ( | ushort | radiusToCheck, |
bool | withDistance | ||
) |
Gets all doors close to this object inside a certain radius.
radiusToCheck | the radius to check |
withDistance | if the objects are to be returned with distance |
virtual IList DOL.GS.GameObject.GetExamineMessages | ( | GamePlayer | player | ) | [virtual] |
Adds messages to ArrayList which are sent when object is targeted.
player | GamePlayer that is examining this object |
Reimplemented in DOL.GS.Researcher, DOL.GS.Blacksmith, DOL.GS.Enchanter, DOL.GS.GameTrainer, DOL.GS.GameHastener, DOL.GS.GameHealer, DOL.GS.GameHousingHastener, DOL.GS.NameRegistrar, DOL.GS.Recharger, DOL.GS.GameVaultKeeper, DOL.GS.GameGuard, DOL.GS.GameMerchant, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, DOL.GS.Housing.GameLotMarker, DOL.GS.Keeps.GameKeepComponent, DOL.GS.Keeps.GameKeepDoor, DOL.GS.Keeps.GameRelicDoor, DOL.GS.Keeps.GameKeepGuard, DOL.GS.Keeps.FrontierHastener, and DOL.GS.GameRelic.
ushort DOL.GS.GameObject.GetHeadingToSpot | ( | int | tx, |
int | ty | ||
) |
Calculates the heading this object needs to have to face the target spot.
tx | target x |
ty | target y |
ushort DOL.GS.GameObject.GetHeadingToTarget | ( | IPoint3D | target | ) |
Calculates the heading this object needs to have, to face the target.
target | IPoint3D target |
IEnumerable DOL.GS.GameObject.GetItemsInRadius | ( | ushort | radiusToCheck | ) |
Gets all items close to this object inside a certain radius.
radiusToCheck | the radius to check |
IEnumerable DOL.GS.GameObject.GetItemsInRadius | ( | ushort | radiusToCheck, |
bool | withDistance | ||
) |
Gets all items close to this object inside a certain radius.
radiusToCheck | the radius to check |
withDistance | if the objects are to be returned with distance |
static int DOL.GS.GameObject.GetLevelFromCon | ( | int | level, |
double | con | ||
) | [static] |
Calculate a level based on source level and a con level.
level | |
con |
virtual string DOL.GS.GameObject.GetName | ( | int | article, |
bool | firstLetterUppercase | ||
) | [virtual] |
Returns name with article for nouns.
article | 0=definite, 1=indefinite |
firstLetterUppercase | Forces the first letter of the returned string to be upper case |
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.
radiusToCheck | the radius to check |
IEnumerable DOL.GS.GameObject.GetNPCsInRadius | ( | bool | useCache, |
ushort | radiusToCheck | ||
) |
Gets all npcs close to this object inside a certain radius.
useCache | use the cache |
radiusToCheck | the radius to check |
IEnumerable DOL.GS.GameObject.GetNPCsInRadius | ( | bool | useCache, |
ushort | radiusToCheck, | ||
bool | withDistance, | ||
bool | ignoreZ | ||
) |
Gets all npcs close to this object inside a certain radius.
useCache | use the cache |
radiusToCheck | the radius to check |
withDistance | if the objects are to be returned with distance |
IEnumerable DOL.GS.GameObject.GetPlayersInRadius | ( | ushort | radiusToCheck | ) |
Gets all players close to this object inside a certain radius.
radiusToCheck | the radius to check |
IEnumerable DOL.GS.GameObject.GetPlayersInRadius | ( | bool | useCache, |
ushort | radiusToCheck, | ||
bool | withDistance, | ||
bool | ignoreZ | ||
) |
Gets all players close to this object inside a certain radius.
useCache | true may return a cached result, false not. |
radiusToCheck | the radius to check |
withDistance | if the objects are to be returned with distance |
IEnumerable DOL.GS.GameObject.GetPlayersInRadius | ( | ushort | radiusToCheck, |
bool | withDistance, | ||
bool | ignoreZ | ||
) |
Gets all players close to this object inside a certain radius.
radiusToCheck | the radius to check |
withDistance | if the objects are to be returned with distance |
IEnumerable DOL.GS.GameObject.GetPlayersInRadius | ( | bool | useCache, |
ushort | radiusToCheck, | ||
bool | ignoreZ | ||
) |
Gets all players close to this object inside a certain radius.
useCache | true may return a cached result, false not. |
radiusToCheck | the radius to check |
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.
firstLetterUppercase | |
form | 0=Subjective, 1=Possessive, 2=Objective |
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.
spell |
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.
spell |
Reimplemented in DOL.GS.GameLiving.
virtual bool DOL.GS.GameObject.Interact | ( | GamePlayer | player | ) | [virtual] |
This function is called from the ObjectInteractRequestHandler.
player | GamePlayer that interacts with this object |
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
target | |
viewangle | |
rangeCheck |
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.
checkObject |
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.
obj | Target object |
radius | Radius |
ignoreZ | Ignore Z values |
void DOL.GS.GameObject.LoadDataQuests | ( | ) |
Load any data driven quests for this object.
virtual void DOL.GS.GameObject.LoadFromDatabase | ( | DataObject | obj | ) | [virtual] |
obj |
Reimplemented in DOL.GS.GameDragon, DOL.GS.GameBoat, DOL.GS.GameDoor, DOL.GS.GameMerchant, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameSiegeWeapon, DOL.GS.GameStaticItem, DOL.GS.Keeps.GameKeepBanner, DOL.GS.Keeps.GameKeepDoor, DOL.GS.Keeps.GameRelicDoor, DOL.GS.Keeps.GameKeepGuard, DOL.GS.GameRelic, and DOL.GS.MinotaurRelic.
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.
regionID | new regionid |
x | new x |
y | new y |
z | new z |
heading | new heading |
Reimplemented in DOL.GS.GameLiving, and DOL.GS.GamePlayer.
virtual bool DOL.GS.GameObject.MoveTo | ( | GameLocation | loc | ) | [virtual] |
virtual bool DOL.GS.GameObject.ReceiveItem | ( | GameLiving | source, |
InventoryItem | item | ||
) | [virtual] |
Called when the object is about to get an item from someone.
source | Source from where to get the item |
item | Item to get |
Reimplemented in DOL.GS.ArtifactCreditMerchant, DOL.GS.ArtifactScholar, DOL.GS.Scholar, DOL.GS.Blacksmith, DOL.GS.GameConsignmentMerchant, DOL.GS.EmblemNPC, DOL.GS.Enchanter, DOL.GS.GameBoatStableMaster, DOL.GS.CLWeaponNPC, DOL.GS.GameStableMaster, DOL.GS.GameTrainer, DOL.GS.GameHousingHastener, DOL.GS.Recharger, DOL.GS.GameLiving, DOL.GS.GamePlayer, DOL.GS.Housing.GameLotMarker, and DOL.GS.Trainer.FriarTrainer.
virtual bool DOL.GS.GameObject.ReceiveItem | ( | GameLiving | source, |
string | templateID | ||
) | [virtual] |
Called when the object is about to get an item from someone.
source | Source from where to get the item |
templateID | templateID for item to add |
virtual bool DOL.GS.GameObject.ReceiveItem | ( | GameLiving | source, |
WorldInventoryItem | item | ||
) | [virtual] |
Receive an item from a living.
source | |
item |
virtual bool DOL.GS.GameObject.ReceiveMoney | ( | GameLiving | source, |
long | money | ||
) | [virtual] |
Called when the object is about to get money from someone.
source | Source from where to get the money |
money | array of money to get |
Reimplemented in DOL.GS.GameLiving.
virtual bool DOL.GS.GameObject.RemoveFromWorld | ( | ) | [virtual] |
Removes the item from the world.
Reimplemented in DOL.GS.GameLiving, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameSiegeWeapon, DOL.GS.GameStaticItem, DOL.GS.WorldInventoryItem, DOL.GS.Keeps.FrontiersPortalStone, DOL.GS.Keeps.GameKeepGuard, and DOL.GS.GameRelicPad.
virtual void DOL.GS.GameObject.SaveIntoDatabase | ( | ) | [virtual] |
Saves an object into the database.
Reimplemented in DOL.GS.GameBoat, DOL.GS.GameDoor, DOL.GS.GameMerchant, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, DOL.GS.Housing.GameLotMarker, DOL.GS.Keeps.GameKeepComponent, DOL.GS.Keeps.GameKeepDoor, DOL.GS.Keeps.GameRelicDoor, DOL.GS.GameRelic, DOL.GS.MinotaurRelic, and DOL.GS.BaseProtector.
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.
source | the damage source |
damageType | the damage type |
damageAmount | the amount of damage |
criticalAmount | the 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.
ad | AttackData containing damage details |
override string DOL.GS.GameObject.ToString | ( | ) |
Returns the string representation of the GameObject.
Reimplemented from DOL.GS.Point3D.
Reimplemented in DOL.GS.GamePlayer, DOL.GS.Keeps.GameKeepComponent, and DOL.GS.MinotaurRelic.
Region DOL.GS.GameObject.m_CurrentRegion [protected] |
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.
int DOL.GS.GameObject.m_maxHealth [protected] |
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!
volatile eObjectState DOL.GS.GameObject.m_ObjectState [protected] |
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.
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.
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] |
Gets or Sets the current level of the Object.
Reimplemented in DOL.GS.GameLiving, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, DOL.GS.Keeps.GameKeepComponent, DOL.GS.Keeps.GameKeepDoor, and DOL.GS.Keeps.GameKeepGuard.
virtual ushort DOL.GS.GameObject.Model [get, set] |
Gets or Sets the current Model of the Object.
Reimplemented in DOL.GS.GameBoat, DOL.GS.GameMovingObject, DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, DOL.GS.Keeps.FrontiersPortalStone, and DOL.GS.GameRelicPad.
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] |
Gets or Sets the current Realm of the Object.
Reimplemented in DOL.GS.GameNPC, DOL.GS.GamePlayer, DOL.GS.GameStaticItem, DOL.GS.Keeps.GameKeepComponent, DOL.GS.Keeps.FrontiersPortalStone, DOL.GS.Keeps.GameKeepDoor, and DOL.GS.GameRelicPad.
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.