TrinityCore
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GameObject Class Reference

#include <GameObject.h>

+ Inheritance diagram for GameObject:

Public Member Functions

 GameObject ()
 
 ~GameObject ()
 
void BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player const *target) const override
 
void AddToWorld () override
 
void RemoveFromWorld () override
 
void CleanupsBeforeDelete (bool finalCleanup=true) override
 
uint32 GetDynamicFlags () const override
 
void ReplaceAllDynamicFlags (uint32 flag) override
 
bool Create (ObjectGuid::LowType guidlow, uint32 name_id, Map *map, uint32 phaseMask, Position const &pos, QuaternionData const &rotation, uint32 animprogress, GOState go_state, uint32 artKit=0, bool dynamic=false, ObjectGuid::LowType spawnid=0)
 
void Update (uint32 p_time) override
 
GameObjectTemplate const * GetGOInfo () const
 
GameObjectTemplateAddon const * GetTemplateAddon () const
 
GameObjectOverride const * GetGameObjectOverride () const
 
GameObjectData const * GetGameObjectData () const
 
GameObjectValue const * GetGOValue () const
 
bool IsTransport () const
 
bool IsDynTransport () const
 
bool IsDestructibleBuilding () const
 
ObjectGuid::LowType GetSpawnId () const
 
void SetLocalRotationAngles (float z_rot, float y_rot, float x_rot)
 
void SetLocalRotation (float qx, float qy, float qz, float qw)
 
void SetParentRotation (QuaternionData const &rotation)
 
QuaternionData const & GetLocalRotation () const
 
int64 GetPackedLocalRotation () const
 
QuaternionData GetWorldRotation () const
 
std::string const & GetNameForLocaleIdx (LocaleConstant locale) const override
 
void SaveToDB ()
 
void SaveToDB (uint32 mapid, uint8 spawnMask, uint32 phaseMask)
 
bool LoadFromDB (ObjectGuid::LowType spawnId, Map *map, bool addToMap, bool=true)
 
void SetOwnerGUID (ObjectGuid owner)
 
ObjectGuid GetOwnerGUID () const override
 
void SetSpellId (uint32 id)
 
uint32 GetSpellId () const
 
time_t GetRespawnTime () const
 
time_t GetRespawnTimeEx () const
 
void SetRespawnTime (int32 respawn)
 
void Respawn ()
 
bool isSpawned () const
 
bool isSpawnedByDefault () const
 
void SetSpawnedByDefault (bool b)
 
uint32 GetRespawnDelay () const
 
void Refresh ()
 
void DespawnOrUnsummon (Milliseconds delay=0ms, Seconds forceRespawnTime=0s)
 
void Delete ()
 
void getFishLoot (Loot *loot, Player *loot_owner)
 
void getFishLootJunk (Loot *loot, Player *loot_owner)
 
bool HasFlag (GameObjectFlags flags) const
 
void SetFlag (GameObjectFlags flags)
 
void RemoveFlag (GameObjectFlags flags)
 
void ReplaceAllFlags (GameObjectFlags flags)
 
void SetLevel (uint32 level)
 
GameobjectTypes GetGoType () const
 
void SetGoType (GameobjectTypes type)
 
GOState GetGoState () const
 
void SetGoState (GOState state)
 
virtual uint32 GetTransportPeriod () const
 
uint8 GetGoArtKit () const
 
void SetGoArtKit (uint8 artkit)
 
uint8 GetGoAnimProgress () const
 
void SetGoAnimProgress (uint8 animprogress)
 
void SetPhaseMask (uint32 newPhaseMask, bool update) override
 
void EnableCollision (bool enable)
 
void Use (Unit *user)
 
LootState getLootState () const
 
void SetLootState (LootState s, Unit *unit=nullptr)
 
uint16 GetLootMode () const
 
bool HasLootMode (uint16 lootMode) const
 
void SetLootMode (uint16 lootMode)
 
void AddLootMode (uint16 lootMode)
 
void RemoveLootMode (uint16 lootMode)
 
void ResetLootMode ()
 
void SetLootGenerationTime ()
 
uint32 GetLootGenerationTime () const
 
void AddToSkillupList (ObjectGuid const &PlayerGuidLow)
 
bool IsInSkillupList (ObjectGuid const &playerGuid) const
 
void ClearSkillupList ()
 
void AddUniqueUse (Player *player)
 
void AddUse ()
 
uint32 GetUseCount () const
 
uint32 GetUniqueUseCount () const
 
void SaveRespawnTime (uint32 forceDelay=0)
 
PlayerGetLootRecipient () const
 
GroupGetLootRecipientGroup () const
 
void SetLootRecipient (Unit *unit, Group *group=nullptr)
 
bool IsLootAllowedFor (Player const *player) const
 
bool HasLootRecipient () const
 
GameObjectGetLinkedTrap ()
 
void SetLinkedTrap (GameObject *linkedTrap)
 
bool hasQuest (uint32 quest_id) const override
 
bool hasInvolvedQuest (uint32 quest_id) const override
 
bool ActivateToQuest (Player const *target) const
 
void UseDoorOrButton (uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
 
void ResetDoorOrButton ()
 
void ActivateObject (GameObjectActions action, WorldObject *spellCaster=nullptr, uint32 spellId=0, int32 effectIndex=-1)
 
void TriggeringLinkedGameObject (uint32 trapEntry, Unit *target)
 
bool IsNeverVisible (bool allowServersideObjects) const override
 
bool IsAlwaysVisibleFor (WorldObject const *seer) const override
 
bool IsInvisibleDueToDespawn () const override
 
uint8 GetLevelForTarget (WorldObject const *target) const override
 
GameObjectLookupFishingHoleAround (float range)
 
void SendCustomAnim (uint32 anim)
 
bool IsInRange (float x, float y, float z, float radius) const
 
void ModifyHealth (int32 change, WorldObject *attackerOrHealer=nullptr, uint32 spellId=0)
 
void SetDestructibleState (GameObjectDestructibleState state, WorldObject *attackerOrHealer=nullptr, bool setHealth=false)
 
GameObjectDestructibleState GetDestructibleState () const
 
void EventInform (uint32 eventId, WorldObject *invoker=nullptr)
 
void SetRespawnCompatibilityMode (bool mode=true)
 
bool GetRespawnCompatibilityMode ()
 
std::string const & GetAIName () const
 
uint32 GetScriptId () const
 
GameObjectAIAI () const
 
void InheritStringIds (GameObject const *parent)
 
bool HasStringId (std::string_view id) const
 
void SetScriptStringId (std::string id)
 
std::string_view GetStringId (StringIdType type) const
 
void SetDisplayId (uint32 displayid)
 
uint32 GetDisplayId () const
 
uint32 GetFaction () const override
 
void SetFaction (uint32 faction) override
 
void GetRespawnPosition (float &x, float &y, float &z, float *ori=nullptr) const
 
TransportToTransport ()
 
Transport const * ToTransport () const
 
float GetStationaryX () const override
 
float GetStationaryY () const override
 
float GetStationaryZ () const override
 
float GetStationaryO () const override
 
void RelocateStationaryPosition (float x, float y, float z, float o)
 
float GetInteractionDistance () const
 
void UpdateModelPosition ()
 
bool IsAtInteractDistance (Position const &pos, float radius) const
 
bool IsAtInteractDistance (Player const *player, SpellInfo const *spell=nullptr) const
 
bool IsWithinDistInMap (Player const *player) const
 
SpellInfo const * GetSpellForLock (Player const *player) const
 
void AIM_Destroy ()
 
bool AIM_Initialize ()
 
std::string GetDebugInfo () const override
 
bool IsWithinDistInMap (WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
 
- Public Member Functions inherited from WorldObject
virtual ~WorldObject ()
 
virtual void Update (uint32)
 
void _Create (ObjectGuid::LowType guidlow, HighGuid guidhigh, uint32 phaseMask)
 
void AddToWorld () override
 
void RemoveFromWorld () override
 
void GetNearPoint2D (WorldObject const *searcher, float &x, float &y, float distance, float absAngle) const
 
void GetNearPoint (WorldObject const *searcher, float &x, float &y, float &z, float distance2d, float absAngle) const
 
void GetClosePoint (float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
 
void MovePosition (Position &pos, float dist, float angle)
 
Position GetNearPosition (float dist, float angle)
 
void MovePositionToFirstCollision (Position &pos, float dist, float angle)
 
Position GetFirstCollisionPosition (float dist, float angle)
 
Position GetRandomNearPosition (float radius)
 
void GetContactPoint (WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
 
virtual float GetCombatReach () const
 
void UpdateGroundPositionZ (float x, float y, float &z) const
 
void UpdateAllowedPositionZ (float x, float y, float &z, float *groundZ=nullptr) const
 
void GetRandomPoint (Position const &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
 
Position GetRandomPoint (Position const &srcPos, float distance) const
 
uint32 GetInstanceId () const
 
virtual void SetPhaseMask (uint32 newPhaseMask, bool update)
 
uint32 GetPhaseMask () const
 
bool InSamePhase (uint32 phasemask) const
 
bool InSamePhase (WorldObject const *obj) const
 
uint32 GetZoneId () const
 
uint32 GetAreaId () const
 
void GetZoneAndAreaId (uint32 &zoneid, uint32 &areaid) const
 
bool IsInWorldPvpZone () const
 
bool IsOutdoors () const
 
ZLiquidStatus GetLiquidStatus () const
 
InstanceScriptGetInstanceScript () const
 
std::string const & GetName () const
 
void SetName (std::string newname)
 
virtual std::string const & GetNameForLocaleIdx (LocaleConstant) const
 
float GetDistance (WorldObject const *obj) const
 
float GetDistance (Position const &pos) const
 
float GetDistance (float x, float y, float z) const
 
float GetDistance2d (WorldObject const *obj) const
 
float GetDistance2d (float x, float y) const
 
float GetDistanceZ (WorldObject const *obj) const
 
bool IsSelfOrInSameMap (WorldObject const *obj) const
 
bool IsInMap (WorldObject const *obj) const
 
bool IsWithinDist3d (float x, float y, float z, float dist) const
 
bool IsWithinDist3d (Position const *pos, float dist) const
 
bool IsWithinDist2d (float x, float y, float dist) const
 
bool IsWithinDist2d (Position const *pos, float dist) const
 
bool IsWithinDist (WorldObject const *obj, float dist2compare, bool is3D=true) const
 
bool IsWithinDistInMap (WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
 
bool IsWithinLOS (float x, float y, float z, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
 
bool IsWithinLOSInMap (WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
 
Position GetHitSpherePointFor (Position const &dest) const
 
void GetHitSpherePointFor (Position const &dest, float &x, float &y, float &z) const
 
bool GetDistanceOrder (WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const
 
bool IsInRange (WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
 
bool IsInRange2d (float x, float y, float minRange, float maxRange) const
 
bool IsInRange3d (float x, float y, float z, float minRange, float maxRange) const
 
bool isInFront (WorldObject const *target, float arc=float(M_PI)) const
 
bool isInBack (WorldObject const *target, float arc=float(M_PI)) const
 
bool IsInBetween (Position const &pos1, Position const &pos2, float size=0) const
 
bool IsInBetween (WorldObject const *obj1, WorldObject const *obj2, float size=0) const
 
virtual void CleanupsBeforeDelete (bool finalCleanup=true)
 
virtual void SendMessageToSet (WorldPacket const *data, bool self) const
 
virtual void SendMessageToSetInRange (WorldPacket const *data, float dist, bool self) const
 
virtual void SendMessageToSet (WorldPacket const *data, Player const *skipped_rcvr) const
 
virtual uint8 GetLevelForTarget (WorldObject const *) const
 
void PlayDistanceSound (uint32 soundId, Player *target=nullptr)
 
void PlayDirectSound (uint32 soundId, Player *target=nullptr)
 
void PlayDirectMusic (uint32 musicId, Player *target=nullptr)
 
void SendObjectDeSpawnAnim (ObjectGuid guid)
 
void AddObjectToRemoveList ()
 
float GetGridActivationRange () const
 
float GetVisibilityRange () const
 
float GetSightRange (WorldObject const *target=nullptr) const
 
bool CanSeeOrDetect (WorldObject const *obj, bool implicitDetect=false, bool distanceCheck=false, bool checkAlert=false) const
 
virtual void SetMap (Map *map)
 
virtual void ResetMap ()
 
MapGetMap () const
 
MapFindMap () const
 
void SetZoneScript ()
 
void ClearZoneScript ()
 
ZoneScriptGetZoneScript () const
 
TempSummonSummonCreature (uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
 
TempSummonSummonCreature (uint32 entry, float x, float y, float z, float o=0, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
 
GameObjectSummonGameObject (uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
 
GameObjectSummonGameObject (uint32 entry, float x, float y, float z, float ang, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
 
CreatureSummonTrigger (float x, float y, float z, float ang, Milliseconds despawnTime, CreatureAI *(*GetAI)(Creature *)=nullptr)
 
void SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=nullptr)
 
CreatureFindNearestCreature (uint32 entry, float range, bool alive=true) const
 
CreatureFindNearestCreatureWithOptions (float range, FindCreatureOptions const &options) const
 
GameObjectFindNearestGameObject (uint32 entry, float range, bool spawnedOnly=true) const
 
GameObjectFindNearestGameObjectWithOptions (float range, FindGameObjectOptions const &options) const
 
GameObjectFindNearestUnspawnedGameObject (uint32 entry, float range) const
 
GameObjectFindNearestGameObjectOfType (GameobjectTypes type, float range) const
 
PlayerSelectNearestPlayer (float distance) const
 
virtual ObjectGuid GetOwnerGUID () const =0
 
virtual ObjectGuid GetCharmerOrOwnerGUID () const
 
ObjectGuid GetCharmerOrOwnerOrOwnGUID () const
 
UnitGetOwner () const
 
UnitGetCharmerOrOwner () const
 
UnitGetCharmerOrOwnerOrSelf () const
 
PlayerGetCharmerOrOwnerPlayerOrPlayerItself () const
 
PlayerGetAffectingPlayer () const
 
PlayerGetSpellModOwner () const
 
int32 CalculateSpellDamage (SpellEffectInfo const &spellEffectInfo, int32 const *basePoints=nullptr) const
 
float GetSpellMaxRangeForTarget (Unit const *target, SpellInfo const *spellInfo) const
 
float GetSpellMinRangeForTarget (Unit const *target, SpellInfo const *spellInfo) const
 
float ApplyEffectModifiers (SpellInfo const *spellInfo, uint8 effIndex, float value) const
 
int32 CalcSpellDuration (SpellInfo const *spellInfo) const
 
int32 ModSpellDuration (SpellInfo const *spellInfo, WorldObject const *target, int32 duration, bool positive, uint32 effectMask) const
 
void ModSpellCastTime (SpellInfo const *spellInfo, int32 &castTime, Spell *spell=nullptr) const
 
void ModSpellDurationTime (SpellInfo const *spellInfo, int32 &durationTime, Spell *spell=nullptr) const
 
virtual float MeleeSpellMissChance (Unit const *victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const
 
virtual SpellMissInfo MeleeSpellHitResult (Unit *victim, SpellInfo const *spellInfo) const
 
SpellMissInfo MagicSpellHitResult (Unit *victim, SpellInfo const *spellInfo) const
 
SpellMissInfo SpellHitResult (Unit *victim, SpellInfo const *spellInfo, bool canReflect=false) const
 
void SendSpellMiss (Unit *target, uint32 spellID, SpellMissInfo missInfo)
 
virtual uint32 GetFaction () const =0
 
virtual void SetFaction (uint32)
 
FactionTemplateEntry const * GetFactionTemplateEntry () const
 
ReputationRank GetReactionTo (WorldObject const *target) const
 
bool IsHostileTo (WorldObject const *target) const
 
bool IsHostileToPlayers () const
 
bool IsFriendlyTo (WorldObject const *target) const
 
bool IsNeutralToAll () const
 
SpellCastResult CastSpell (CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
 
bool IsValidAttackTarget (WorldObject const *target, SpellInfo const *bySpell=nullptr) const
 
bool IsValidAssistTarget (WorldObject const *target, SpellInfo const *bySpell=nullptr) const
 
UnitGetMagicHitRedirectTarget (Unit *victim, SpellInfo const *spellInfo)
 
template<typename Container >
void GetGameObjectListWithEntryInGrid (Container &gameObjectContainer, uint32 entry, float maxSearchRange=250.0f) const
 
template<typename Container >
void GetGameObjectListWithOptionsInGrid (Container &gameObjectContainer, float maxSearchRange, FindGameObjectOptions const &options) const
 
template<typename Container >
void GetCreatureListWithEntryInGrid (Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
 
template<typename Container >
void GetCreatureListWithOptionsInGrid (Container &creatureContainer, float maxSearchRange, FindCreatureOptions const &options) const
 
template<typename Container >
void GetPlayerListInGrid (Container &playerContainer, float maxSearchRange, bool alive=true) const
 
void DestroyForNearbyPlayers ()
 
virtual void UpdateObjectVisibility (bool forced=true)
 
virtual void UpdateObjectVisibilityOnCreate ()
 
void UpdatePositionData ()
 
void BuildUpdate (UpdateDataMapType &) override
 
bool AddToObjectUpdate () override
 
void RemoveFromObjectUpdate () override
 
void AddToNotify (uint16 f)
 
bool isNeedNotify (uint16 f) const
 
uint16 GetNotifyFlags () const
 
void ResetAllNotifies ()
 
bool isActiveObject () const
 
void setActive (bool isActiveObject)
 
bool IsFarVisible () const
 
void SetFarVisible (bool on)
 
bool IsVisibilityOverridden () const
 
void SetVisibilityDistanceOverride (VisibilityDistanceType type)
 
void SetIsStoredInWorldObjectGridContainer (bool apply)
 
bool IsAlwaysStoredInWorldObjectGridContainer () const
 
bool IsStoredInWorldObjectGridContainer () const
 
TransportGetTransport () const
 
float GetTransOffsetX () const
 
float GetTransOffsetY () const
 
float GetTransOffsetZ () const
 
float GetTransOffsetO () const
 
Position const & GetTransOffset () const
 
uint32 GetTransTime () const
 
int8 GetTransSeat () const
 
virtual ObjectGuid GetTransGUID () const
 
void SetTransport (Transport *t)
 
virtual float GetStationaryX () const
 
virtual float GetStationaryY () const
 
virtual float GetStationaryZ () const
 
virtual float GetStationaryO () const
 
float GetFloorZ () const
 
virtual float GetCollisionHeight () const
 
float GetMapWaterOrGroundLevel (float x, float y, float z, float *ground=nullptr) const
 
float GetMapHeight (float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const
 
std::string GetDebugInfo () const override
 
bool IsPrivateObject () const
 
ObjectGuid GetPrivateObjectOwner () const
 
void SetPrivateObjectOwner (ObjectGuid const &owner)
 
bool CheckPrivateObjectOwnerVisibility (WorldObject const *seer) const
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
bool IsInWorld () const
 
virtual void AddToWorld ()
 
virtual void RemoveFromWorld ()
 
ObjectGuid GetGUID () const
 
PackedGuid const & GetPackGUID () const
 
uint32 GetEntry () const
 
void SetEntry (uint32 entry)
 
float GetObjectScale () const
 
virtual void SetObjectScale (float scale)
 
virtual uint32 GetDynamicFlags () const
 
bool HasDynamicFlag (uint32 flag) const
 
virtual void SetDynamicFlag (uint32 flag)
 
virtual void RemoveDynamicFlag (uint32 flag)
 
virtual void ReplaceAllDynamicFlags (uint32 flag)
 
TypeID GetTypeId () const
 
bool isType (uint16 mask) const
 
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void SendUpdateToPlayer (Player *player)
 
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player const *target) const
 
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
 
void BuildMovementUpdateBlock (UpdateData *data, uint32 flags=0) const
 
virtual void DestroyForPlayer (Player *target, bool onDeath=false) const
 
int32 GetInt32Value (uint16 index) const
 
uint32 GetUInt32Value (uint16 index) const
 
uint64 GetUInt64Value (uint16 index) const
 
float GetFloatValue (uint16 index) const
 
uint8 GetByteValue (uint16 index, uint8 offset) const
 
uint16 GetUInt16Value (uint16 index, uint8 offset) const
 
ObjectGuid GetGuidValue (uint16 index) const
 
void SetInt32Value (uint16 index, int32 value)
 
void SetUInt32Value (uint16 index, uint32 value)
 
void UpdateUInt32Value (uint16 index, uint32 value)
 
void SetUInt64Value (uint16 index, uint64 value)
 
void SetFloatValue (uint16 index, float value)
 
void SetByteValue (uint16 index, uint8 offset, uint8 value)
 
void SetUInt16Value (uint16 index, uint8 offset, uint16 value)
 
void SetInt16Value (uint16 index, uint8 offset, int16 value)
 
void SetGuidValue (uint16 index, ObjectGuid value)
 
void SetStatFloatValue (uint16 index, float value)
 
void SetStatInt32Value (uint16 index, int32 value)
 
bool AddGuidValue (uint16 index, ObjectGuid value)
 
bool RemoveGuidValue (uint16 index, ObjectGuid value)
 
void ApplyModUInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModPositiveFloatValue (uint16 index, float val, bool apply)
 
void ApplyModSignedFloatValue (uint16 index, float val, bool apply)
 
void SetFlag (uint16 index, uint32 newFlag)
 
void RemoveFlag (uint16 index, uint32 oldFlag)
 
void ToggleFlag (uint16 index, uint32 flag)
 
bool HasFlag (uint16 index, uint32 flag) const
 
void ApplyModFlag (uint16 index, uint32 flag, bool apply)
 
void SetByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void RemoveByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void ToggleByteFlag (uint16 index, uint8 offset, uint8 flag)
 
bool HasByteFlag (uint16 index, uint8 offset, uint8 flag) const
 
void ApplyModByteFlag (uint16 index, uint8 offset, uint8 flag, bool apply)
 
void SetFlag64 (uint16 index, uint64 newFlag)
 
void RemoveFlag64 (uint16 index, uint64 oldFlag)
 
void ToggleFlag64 (uint16 index, uint64 flag)
 
bool HasFlag64 (uint16 index, uint64 flag) const
 
void ApplyModFlag64 (uint16 index, uint64 flag, bool apply)
 
void ClearUpdateMask (bool remove)
 
uint16 GetValuesCount () const
 
virtual bool hasQuest (uint32) const
 
virtual bool hasInvolvedQuest (uint32) const
 
void SetIsNewObject (bool enable)
 
virtual void BuildUpdate (UpdateDataMapType &)
 
void BuildFieldsUpdate (Player *, UpdateDataMapType &) const
 
void SetFieldNotifyFlag (uint16 flag)
 
void RemoveFieldNotifyFlag (uint16 flag)
 
void ForceValuesUpdateAtIndex (uint32)
 
bool IsWorldObject () const
 
WorldObjectToWorldObject ()
 
WorldObject const * ToWorldObject () const
 
bool IsItem () const
 
ItemToItem ()
 
Item const * ToItem () const
 
bool IsPlayer () const
 
PlayerToPlayer ()
 
Player const * ToPlayer () const
 
bool IsCreature () const
 
CreatureToCreature ()
 
Creature const * ToCreature () const
 
bool IsUnit () const
 
UnitToUnit ()
 
Unit const * ToUnit () const
 
bool IsGameObject () const
 
GameObjectToGameObject ()
 
GameObject const * ToGameObject () const
 
bool IsCorpse () const
 
CorpseToCorpse ()
 
Corpse const * ToCorpse () const
 
bool IsDynObject () const
 
DynamicObjectToDynObject ()
 
DynamicObject const * ToDynObject () const
 
virtual std::string GetDebugInfo () const
 
Trinity::unique_weak_ptr< ObjectGetWeakPtr () const
 
- Public Member Functions inherited from WorldLocation
 WorldLocation ()
 
 WorldLocation (uint32 _mapId, float x, float y, float z=0.0f, float o=0.0f)
 
 WorldLocation (uint32 mapId, Position const &position)
 
void WorldRelocate (WorldLocation const &loc)
 
void WorldRelocate (WorldLocation const *loc)
 
void WorldRelocate (uint32 mapId, Position const &pos)
 
void WorldRelocate (uint32 mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f)
 
WorldLocation GetWorldLocation () const
 
uint32 GetMapId () const
 
std::string GetDebugInfo () const
 
- Public Member Functions inherited from Position
 Position ()
 
 Position (float x, float y, float z=0.0f, float o=0.0f)
 
bool operator== (Position const &a) const
 
void Relocate (float x, float y)
 
void Relocate (float x, float y, float z)
 
void Relocate (float x, float y, float z, float o)
 
void Relocate (Position const &pos)
 
void Relocate (Position const *pos)
 
void RelocateOffset (Position const &offset)
 
void SetOrientation (float orientation)
 
float GetPositionX () const
 
float GetPositionY () const
 
float GetPositionZ () const
 
float GetOrientation () const
 
void GetPosition (float &x, float &y) const
 
void GetPosition (float &x, float &y, float &z) const
 
void GetPosition (float &x, float &y, float &z, float &o) const
 
Position GetPosition () const
 
Streamer< XY > PositionXYStream ()
 
ConstStreamer< XY > PositionXYStream () const
 
Streamer< XYZ > PositionXYZStream ()
 
ConstStreamer< XYZ > PositionXYZStream () const
 
Streamer< XYZO > PositionXYZOStream ()
 
ConstStreamer< XYZO > PositionXYZOStream () const
 
Streamer< PackedXYZ > PositionPackedXYZStream ()
 
ConstStreamer< PackedXYZ > PositionPackedXYZStream () const
 
bool IsPositionValid () const
 
float GetExactDist2dSq (const float x, const float y) const
 
float GetExactDist2dSq (Position const &pos) const
 
float GetExactDist2dSq (Position const *pos) const
 
float GetExactDist2d (const float x, const float y) const
 
float GetExactDist2d (Position const &pos) const
 
float GetExactDist2d (Position const *pos) const
 
float GetExactDistSq (float x, float y, float z) const
 
float GetExactDistSq (Position const &pos) const
 
float GetExactDistSq (Position const *pos) const
 
float GetExactDist (float x, float y, float z) const
 
float GetExactDist (Position const &pos) const
 
float GetExactDist (Position const *pos) const
 
void GetPositionOffsetTo (Position const &endPos, Position &retOffset) const
 
Position GetPositionWithOffset (Position const &offset) const
 
float GetAbsoluteAngle (float x, float y) const
 
float GetAbsoluteAngle (Position const &pos) const
 
float GetAbsoluteAngle (Position const *pos) const
 
float ToAbsoluteAngle (float relAngle) const
 
float ToRelativeAngle (float absAngle) const
 
float GetRelativeAngle (float x, float y) const
 
float GetRelativeAngle (Position const &pos) const
 
float GetRelativeAngle (Position const *pos) const
 
void GetSinCos (float x, float y, float &vsin, float &vcos) const
 
bool IsInDist2d (float x, float y, float dist) const
 
bool IsInDist2d (Position const *pos, float dist) const
 
bool IsInDist (float x, float y, float z, float dist) const
 
bool IsInDist (Position const &pos, float dist) const
 
bool IsInDist (Position const *pos, float dist) const
 
bool IsWithinBox (Position const &center, float xradius, float yradius, float zradius) const
 
bool IsWithinDoubleVerticalCylinder (Position const *center, float radius, float height) const
 
bool HasInArc (float arcangle, Position const *pos, float border=2.0f) const
 
bool HasInLine (Position const *pos, float objSize, float width) const
 
std::string ToString () const
 
- Public Member Functions inherited from GridObject< GameObject >
virtual ~GridObject ()
 
bool IsInGrid () const
 
void AddToGrid (GridRefManager< GameObject > &m)
 
void RemoveFromGrid ()
 

Static Public Member Functions

static bool DeleteFromDB (ObjectGuid::LowType spawnId)
 
static void SetGoArtKit (uint8 artkit, GameObject *go, ObjectGuid::LowType lowguid=0)
 
- Static Public Member Functions inherited from WorldObject
static bool InSamePhase (WorldObject const *a, WorldObject const *b)
 
static ReputationRank GetFactionReactionTo (FactionTemplateEntry const *factionTemplateEntry, WorldObject const *target)
 
- Static Public Member Functions inherited from Object
static ObjectGuid GetGUID (Object const *o)
 
static WorldObjectToWorldObject (Object *o)
 
static WorldObject const * ToWorldObject (Object const *o)
 
static ItemToItem (Object *o)
 
static Item const * ToItem (Object const *o)
 
static PlayerToPlayer (Object *o)
 
static Player const * ToPlayer (Object const *o)
 
static CreatureToCreature (Object *o)
 
static Creature const * ToCreature (Object const *o)
 
static UnitToUnit (Object *o)
 
static Unit const * ToUnit (Object const *o)
 
static GameObjectToGameObject (Object *o)
 
static GameObject const * ToGameObject (Object const *o)
 
static CorpseToCorpse (Object *o)
 
static Corpse const * ToCorpse (Object const *o)
 
static DynamicObjectToDynObject (Object *o)
 
static DynamicObject const * ToDynObject (Object const *o)
 
- Static Public Member Functions inherited from Position
static float NormalizeOrientation (float o)
 

Public Attributes

Loot loot
 
uint32 m_groupLootTimer
 
ObjectGuid::LowType lootingGroupLowGUID
 
GameObjectModelm_model
 
- Public Attributes inherited from WorldObject
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPESm_stealth
 
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPESm_stealthDetect
 
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPESm_invisibility
 
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPESm_invisibilityDetect
 
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPESm_serverSideVisibility
 
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPESm_serverSideVisibilityDetect
 
uint32 LastUsedScriptID
 
MovementInfo m_movementInfo
 
EventProcessor m_Events
 
- Public Attributes inherited from WorldLocation
uint32 m_mapId
 
- Public Attributes inherited from Position
float m_positionX
 
float m_positionY
 
float m_positionZ
 

Protected Types

typedef std::map< uint32, ObjectGuidChairSlotAndUser
 

Protected Member Functions

void CreateModel ()
 
void UpdateModel ()
 
- Protected Member Functions inherited from WorldObject
 WorldObject (bool isWorldObject)
 
virtual void ProcessPositionDataChanged (PositionFullTerrainStatus const &data)
 
void SetLocationMapId (uint32 _mapId)
 
void SetLocationInstanceId (uint32 _instanceId)
 
virtual bool IsNeverVisible (bool allowServersideObjects) const
 
virtual bool IsAlwaysVisibleFor (WorldObject const *) const
 
virtual bool IsInvisibleDueToDespawn () const
 
virtual bool IsAlwaysDetectableFor (WorldObject const *) const
 
- Protected Member Functions inherited from Object
 Object ()
 
void _InitValues ()
 
void _Create (ObjectGuid::LowType guidlow, uint32 entry, HighGuid guidhigh)
 
std::string _ConcatFields (uint16 startIndex, uint16 size) const
 
bool _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count)
 
uint32 GetUpdateFieldData (Player const *target, uint32 *&flags) const
 
void BuildMovementUpdate (ByteBuffer *data, uint16 flags) const
 
virtual void BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player const *target) const
 
virtual bool AddToObjectUpdate ()=0
 
virtual void RemoveFromObjectUpdate ()=0
 
void AddToObjectUpdateIfNeeded ()
 
- Protected Member Functions inherited from MapObject
 MapObject ()
 

Protected Attributes

uint32 m_spellId
 
time_t m_respawnTime
 
uint32 m_respawnDelayTime
 
uint32 m_despawnDelay
 
Seconds m_despawnRespawnTime
 
LootState m_lootState
 
ObjectGuid m_lootStateUnitGUID
 
bool m_spawnedByDefault
 
time_t m_restockTime
 
time_t m_cooldownTime
 
GOState m_prevGoState
 
GuidSet m_SkillupList
 
ObjectGuid m_ritualOwnerGUID
 
GuidSet m_unique_users
 
uint32 m_usetimes
 
ChairSlotAndUser ChairListSlots
 
ObjectGuid::LowType m_spawnId
 For new or temporary gameobjects is 0 for saved it is lowguid. More...
 
GameObjectTemplate const * m_goInfo
 
GameObjectTemplateAddon const * m_goTemplateAddon
 
GameObjectData const * m_goData
 
GameObjectValue m_goValue
 
std::array< std::string const *, 3 > m_stringIds
 
Optional< std::string > m_scriptStringId
 
int64 m_packedRotation
 
QuaternionData m_localRotation
 
Position m_stationaryPosition
 
ObjectGuid m_lootRecipient
 
uint32 m_lootRecipientGroup
 
uint16 m_LootMode
 
uint32 m_lootGenerationTime
 
ObjectGuid m_linkedTrap
 
- Protected Attributes inherited from WorldObject
std::string m_name
 
bool m_isActive
 
bool m_isFarVisible
 
Optional< float > m_visibilityDistanceOverride
 
bool const m_isStoredInWorldObjectGridContainer
 
ZoneScriptm_zoneScript
 
Transportm_transport
 
uint32 m_zoneId
 
uint32 m_areaId
 
float m_staticFloorZ
 
bool m_outdoors
 
ZLiquidStatus m_liquidStatus
 
- Protected Attributes inherited from Object
uint16 m_objectType
 
TypeID m_objectTypeId
 
uint16 m_updateFlag
 
union {
   int32 *   m_int32Values
 
   uint32 *   m_uint32Values
 
   float *   m_floatValues
 
}; 
 
UpdateMask _changesMask
 
uint16 m_valuesCount
 
uint16 _fieldNotifyFlags
 
bool m_objectUpdated
 

Private Member Functions

void RemoveFromOwner ()
 
void SwitchDoorOrButton (bool activate, bool alternative=false)
 
void UpdatePackedRotation ()
 
bool _IsWithinDist (WorldObject const *obj, float dist2compare, bool, bool, bool) const override
 Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size. More...
 

Private Attributes

GameObjectAIm_AI
 
bool m_respawnCompatibilityMode
 

Detailed Description

Definition at line 85 of file GameObject.h.

Member Typedef Documentation

◆ ChairSlotAndUser

typedef std::map<uint32, ObjectGuid> GameObject::ChairSlotAndUser
protected

Definition at line 339 of file GameObject.h.

Constructor & Destructor Documentation

◆ GameObject()

GameObject::GameObject ( )
explicit

Definition at line 110 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~GameObject()

GameObject::~GameObject ( )

Definition at line 146 of file GameObject.cpp.

Member Function Documentation

◆ _IsWithinDist()

bool GameObject::_IsWithinDist ( WorldObject const *  obj,
float  dist2compare,
bool  ,
bool  ,
bool   
) const
inlineoverrideprivatevirtual

Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.

Following check does check 3d distance

Reimplemented from WorldObject.

Definition at line 367 of file GameObject.h.

+ Here is the call graph for this function:

◆ ActivateObject()

void GameObject::ActivateObject ( GameObjectActions  action,
WorldObject spellCaster = nullptr,
uint32  spellId = 0,
int32  effectIndex = -1 
)

Definition at line 1484 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ActivateToQuest()

bool GameObject::ActivateToQuest ( Player const *  target) const

Definition at line 1383 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddLootMode()

void GameObject::AddLootMode ( uint16  lootMode)
inline

Definition at line 200 of file GameObject.h.

◆ AddToSkillupList()

void GameObject::AddToSkillupList ( ObjectGuid const &  PlayerGuidLow)
inline

Definition at line 206 of file GameObject.h.

+ Here is the caller graph for this function:

◆ AddToWorld()

void GameObject::AddToWorld ( )
overridevirtual
  • Register the gameobject for guid lookup

Reimplemented from Object.

Definition at line 205 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddUniqueUse()

void GameObject::AddUniqueUse ( Player player)

Definition at line 928 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddUse()

void GameObject::AddUse ( )
inline

Definition at line 214 of file GameObject.h.

+ Here is the caller graph for this function:

◆ AI()

GameObjectAI * GameObject::AI ( ) const
inline

Definition at line 275 of file GameObject.h.

+ Here is the caller graph for this function:

◆ AIM_Destroy()

void GameObject::AIM_Destroy ( )

Definition at line 154 of file GameObject.cpp.

+ Here is the caller graph for this function:

◆ AIM_Initialize()

bool GameObject::AIM_Initialize ( )

Definition at line 160 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildValuesUpdate()

void GameObject::BuildValuesUpdate ( uint8  updatetype,
ByteBuffer data,
Player const *  target 
) const
overridevirtual

Reimplemented from Object.

Definition at line 2687 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ CleanupsBeforeDelete()

void GameObject::CleanupsBeforeDelete ( bool  finalCleanup = true)
overridevirtual

Reimplemented from WorldObject.

Reimplemented in Transport.

Definition at line 178 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearSkillupList()

void GameObject::ClearSkillupList ( )
inline

Definition at line 211 of file GameObject.h.

◆ Create()

bool GameObject::Create ( ObjectGuid::LowType  guidlow,
uint32  name_id,
Map map,
uint32  phaseMask,
Position const &  pos,
QuaternionData const &  rotation,
uint32  animprogress,
GOState  go_state,
uint32  artKit = 0,
bool  dynamic = false,
ObjectGuid::LowType  spawnid = 0 
)

Definition at line 257 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateModel()

void GameObject::CreateModel ( )
protected

Definition at line 2854 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Delete()

void GameObject::Delete ( )

Definition at line 955 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteFromDB()

bool GameObject::DeleteFromDB ( ObjectGuid::LowType  spawnId)
static

Definition at line 1156 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DespawnOrUnsummon()

void GameObject::DespawnOrUnsummon ( Milliseconds  delay = 0ms,
Seconds  forceRespawnTime = 0s 
)

Definition at line 934 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnableCollision()

void GameObject::EnableCollision ( bool  enable)

Definition at line 2600 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EventInform()

void GameObject::EventInform ( uint32  eventId,
WorldObject invoker = nullptr 
)

Definition at line 2256 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAIName()

std::string const & GameObject::GetAIName ( ) const

Definition at line 173 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDebugInfo()

std::string GameObject::GetDebugInfo ( ) const
overridevirtual

Reimplemented from Object.

Reimplemented in Transport.

Definition at line 2859 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDestructibleState()

GameObjectDestructibleState GameObject::GetDestructibleState ( ) const
inline

Definition at line 258 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDisplayId()

uint32 GameObject::GetDisplayId ( ) const
inline

Definition at line 283 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDynamicFlags()

uint32 GameObject::GetDynamicFlags ( ) const
inlineoverridevirtual

Reimplemented from Object.

Definition at line 97 of file GameObject.h.

+ Here is the call graph for this function:

◆ GetFaction()

uint32 GameObject::GetFaction ( ) const
inlineoverridevirtual

Implements WorldObject.

Definition at line 285 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFishLoot()

void GameObject::getFishLoot ( Loot loot,
Player loot_owner 
)

Definition at line 974 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFishLootJunk()

void GameObject::getFishLootJunk ( Loot loot,
Player loot_owner 
)

Definition at line 994 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGameObjectData()

GameObjectData const * GameObject::GetGameObjectData ( ) const
inline

Definition at line 105 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetGameObjectOverride()

GameObjectOverride const * GameObject::GetGameObjectOverride ( ) const

Definition at line 907 of file GameObject.cpp.

+ Here is the caller graph for this function:

◆ GetGoAnimProgress()

uint8 GameObject::GetGoAnimProgress ( ) const
inline

Definition at line 183 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGoArtKit()

uint8 GameObject::GetGoArtKit ( ) const
inline

Definition at line 181 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGOInfo()

GameObjectTemplate const * GameObject::GetGOInfo ( ) const
inline

Definition at line 102 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetGoState()

GOState GameObject::GetGoState ( ) const
inline

Definition at line 178 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGoType()

GameobjectTypes GameObject::GetGoType ( ) const
inline

Definition at line 176 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGOValue()

GameObjectValue const * GameObject::GetGOValue ( ) const
inline

Definition at line 106 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetInteractionDistance()

float GameObject::GetInteractionDistance ( ) const

Definition at line 2786 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLevelForTarget()

uint8 GameObject::GetLevelForTarget ( WorldObject const *  target) const
overridevirtual

Reimplemented from WorldObject.

Definition at line 1338 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ GetLinkedTrap()

GameObject * GameObject::GetLinkedTrap ( )

Definition at line 2682 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLocalRotation()

QuaternionData const & GameObject::GetLocalRotation ( ) const
inline

Definition at line 118 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetLootGenerationTime()

uint32 GameObject::GetLootGenerationTime ( ) const
inline

Definition at line 204 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetLootMode()

uint16 GameObject::GetLootMode ( ) const
inline

Definition at line 197 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetLootRecipient()

Player * GameObject::GetLootRecipient ( ) const

Definition at line 2624 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ GetLootRecipientGroup()

Group * GameObject::GetLootRecipientGroup ( ) const

Definition at line 2631 of file GameObject.cpp.

+ Here is the caller graph for this function:

◆ getLootState()

LootState GameObject::getLootState ( ) const
inline

Definition at line 193 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetNameForLocaleIdx()

std::string const & GameObject::GetNameForLocaleIdx ( LocaleConstant  locale) const
overridevirtual

Reimplemented from WorldObject.

Definition at line 2310 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ GetOwnerGUID()

ObjectGuid GameObject::GetOwnerGUID ( ) const
inlineoverridevirtual

Implements WorldObject.

Definition at line 141 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPackedLocalRotation()

int64 GameObject::GetPackedLocalRotation ( ) const
inline

Definition at line 119 of file GameObject.h.

◆ GetRespawnCompatibilityMode()

bool GameObject::GetRespawnCompatibilityMode ( )
inline

Definition at line 271 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetRespawnDelay()

uint32 GameObject::GetRespawnDelay ( ) const
inline

Definition at line 163 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetRespawnPosition()

void GameObject::GetRespawnPosition ( float &  x,
float &  y,
float &  z,
float *  ori = nullptr 
) const

Definition at line 2768 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRespawnTime()

time_t GameObject::GetRespawnTime ( ) const
inline

Definition at line 150 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetRespawnTimeEx()

time_t GameObject::GetRespawnTimeEx ( ) const

Definition at line 1354 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetScriptId()

uint32 GameObject::GetScriptId ( ) const

Definition at line 2272 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSpawnId()

ObjectGuid::LowType GameObject::GetSpawnId ( ) const
inline

Definition at line 112 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetSpellForLock()

SpellInfo const * GameObject::GetSpellForLock ( Player const *  player) const

Definition at line 2912 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSpellId()

uint32 GameObject::GetSpellId ( ) const
inline

Definition at line 148 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetStationaryO()

float GameObject::GetStationaryO ( ) const
inlineoverridevirtual

Reimplemented from WorldObject.

Definition at line 297 of file GameObject.h.

+ Here is the call graph for this function:

◆ GetStationaryX()

float GameObject::GetStationaryX ( ) const
inlineoverridevirtual

Reimplemented from WorldObject.

Definition at line 294 of file GameObject.h.

+ Here is the call graph for this function:

◆ GetStationaryY()

float GameObject::GetStationaryY ( ) const
inlineoverridevirtual

Reimplemented from WorldObject.

Definition at line 295 of file GameObject.h.

+ Here is the call graph for this function:

◆ GetStationaryZ()

float GameObject::GetStationaryZ ( ) const
inlineoverridevirtual

Reimplemented from WorldObject.

Definition at line 296 of file GameObject.h.

+ Here is the call graph for this function:

◆ GetStringId()

std::string_view GameObject::GetStringId ( StringIdType  type) const
inline

Definition at line 280 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetTemplateAddon()

GameObjectTemplateAddon const * GameObject::GetTemplateAddon ( ) const
inline

Definition at line 103 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetTransportPeriod()

uint32 GameObject::GetTransportPeriod ( ) const
virtual

Reimplemented in Transport.

Definition at line 2578 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUniqueUseCount()

uint32 GameObject::GetUniqueUseCount ( ) const
inline

Definition at line 217 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetUseCount()

uint32 GameObject::GetUseCount ( ) const
inline

Definition at line 216 of file GameObject.h.

+ Here is the caller graph for this function:

◆ GetWorldRotation()

QuaternionData GameObject::GetWorldRotation ( ) const

Definition at line 2363 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasFlag()

bool GameObject::HasFlag ( GameObjectFlags  flags) const
inline

Definition at line 170 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasInvolvedQuest()

bool GameObject::hasInvolvedQuest ( uint32  quest_id) const
overridevirtual

Reimplemented from Object.

Definition at line 1235 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ HasLootMode()

bool GameObject::HasLootMode ( uint16  lootMode) const
inline

Definition at line 198 of file GameObject.h.

◆ HasLootRecipient()

bool GameObject::HasLootRecipient ( ) const
inline

Definition at line 227 of file GameObject.h.

+ Here is the caller graph for this function:

◆ hasQuest()

bool GameObject::hasQuest ( uint32  quest_id) const
overridevirtual

Reimplemented from Object.

Definition at line 1230 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ HasStringId()

bool GameObject::HasStringId ( std::string_view  id) const

Definition at line 2290 of file GameObject.cpp.

+ Here is the caller graph for this function:

◆ InheritStringIds()

void GameObject::InheritStringIds ( GameObject const *  parent)

Definition at line 2281 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ IsAlwaysVisibleFor()

bool GameObject::IsAlwaysVisibleFor ( WorldObject const *  seer) const
overridevirtual

Reimplemented from WorldObject.

Definition at line 1300 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ IsAtInteractDistance() [1/2]

bool GameObject::IsAtInteractDistance ( Player const *  player,
SpellInfo const *  spell = nullptr 
) const

Definition at line 2867 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ IsAtInteractDistance() [2/2]

bool GameObject::IsAtInteractDistance ( Position const &  pos,
float  radius 
) const

Definition at line 2883 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsDestructibleBuilding()

bool GameObject::IsDestructibleBuilding ( ) const

Definition at line 1261 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsDynTransport()

bool GameObject::IsDynTransport ( ) const

Definition at line 1251 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ IsInRange()

bool GameObject::IsInRange ( float  x,
float  y,
float  z,
float  radius 
) const

Check if the distance between the 2 objects is 0, can happen if both objects are on the same position. The code below this check wont crash if dist is 0 because 0/0 in float operations is valid, and returns infinite

Definition at line 2230 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInSkillupList()

bool GameObject::IsInSkillupList ( ObjectGuid const &  playerGuid) const
inline

Definition at line 207 of file GameObject.h.

+ Here is the caller graph for this function:

◆ IsInvisibleDueToDespawn()

bool GameObject::IsInvisibleDueToDespawn ( ) const
overridevirtual

Reimplemented from WorldObject.

Definition at line 1326 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ IsLootAllowedFor()

bool GameObject::IsLootAllowedFor ( Player const *  player) const

Definition at line 2667 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsNeverVisible()

bool GameObject::IsNeverVisible ( bool  allowServersideObjects) const
overridevirtual

Reimplemented from WorldObject.

Definition at line 1289 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ isSpawned()

bool GameObject::isSpawned ( ) const
inline

Definition at line 155 of file GameObject.h.

+ Here is the caller graph for this function:

◆ isSpawnedByDefault()

bool GameObject::isSpawnedByDefault ( ) const
inline

Definition at line 161 of file GameObject.h.

+ Here is the caller graph for this function:

◆ IsTransport()

bool GameObject::IsTransport ( ) const

Definition at line 1240 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsWithinDistInMap() [1/2]

bool GameObject::IsWithinDistInMap ( Player const *  player) const

Definition at line 2907 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsWithinDistInMap() [2/2]

bool WorldObject::IsWithinDistInMap ( WorldObject const *  obj,
float  dist2compare,
bool  is3D = true,
bool  incOwnRadius = true,
bool  incTargetRadius = true 
) const

Definition at line 402 of file Object.cpp.

◆ LoadFromDB()

bool GameObject::LoadFromDB ( ObjectGuid::LowType  spawnId,
Map map,
bool  addToMap,
bool  = true 
)

Definition at line 1087 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LookupFishingHoleAround()

GameObject * GameObject::LookupFishingHoleAround ( float  range)

Definition at line 1449 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ModifyHealth()

void GameObject::ModifyHealth ( int32  change,
WorldObject attackerOrHealer = nullptr,
uint32  spellId = 0 
)

Definition at line 2380 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Refresh()

void GameObject::Refresh ( )

Definition at line 918 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RelocateStationaryPosition()

void GameObject::RelocateStationaryPosition ( float  x,
float  y,
float  z,
float  o 
)
inline

Definition at line 298 of file GameObject.h.

+ Here is the caller graph for this function:

◆ RemoveFlag()

void GameObject::RemoveFlag ( GameObjectFlags  flags)
inline

Definition at line 172 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromOwner()

void GameObject::RemoveFromOwner ( )
private

Definition at line 186 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromWorld()

void GameObject::RemoveFromWorld ( )
overridevirtual
  • Remove the gameobject from the accessor

Reimplemented from Object.

Definition at line 232 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveLootMode()

void GameObject::RemoveLootMode ( uint16  lootMode)
inline

Definition at line 201 of file GameObject.h.

◆ ReplaceAllDynamicFlags()

void GameObject::ReplaceAllDynamicFlags ( uint32  flag)
inlineoverridevirtual

Reimplemented from Object.

Definition at line 98 of file GameObject.h.

+ Here is the call graph for this function:

◆ ReplaceAllFlags()

void GameObject::ReplaceAllFlags ( GameObjectFlags  flags)
inline

Definition at line 173 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetDoorOrButton()

void GameObject::ResetDoorOrButton ( )

Definition at line 1458 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetLootMode()

void GameObject::ResetLootMode ( )
inline

Definition at line 202 of file GameObject.h.

+ Here is the caller graph for this function:

◆ Respawn()

void GameObject::Respawn ( )

Definition at line 1374 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveRespawnTime()

void GameObject::SaveRespawnTime ( uint32  forceDelay = 0)

Definition at line 1270 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveToDB() [1/2]

void GameObject::SaveToDB ( )

Definition at line 1014 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveToDB() [2/2]

void GameObject::SaveToDB ( uint32  mapid,
uint8  spawnMask,
uint32  phaseMask 
)

Definition at line 1028 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ SendCustomAnim()

void GameObject::SendCustomAnim ( uint32  anim)

Definition at line 2222 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDestructibleState()

void GameObject::SetDestructibleState ( GameObjectDestructibleState  state,
WorldObject attackerOrHealer = nullptr,
bool  setHealth = false 
)

Definition at line 2427 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDisplayId()

void GameObject::SetDisplayId ( uint32  displayid)

Definition at line 2587 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetFaction()

void GameObject::SetFaction ( uint32  faction)
inlineoverridevirtual

Reimplemented from WorldObject.

Definition at line 286 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetFlag()

void GameObject::SetFlag ( GameObjectFlags  flags)
inline

Definition at line 171 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGoAnimProgress()

void GameObject::SetGoAnimProgress ( uint8  animprogress)
inline

Definition at line 184 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGoArtKit() [1/2]

void GameObject::SetGoArtKit ( uint8  artkit)

Definition at line 1578 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGoArtKit() [2/2]

void GameObject::SetGoArtKit ( uint8  artkit,
GameObject go,
ObjectGuid::LowType  lowguid = 0 
)
static

Definition at line 1586 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ SetGoState()

void GameObject::SetGoState ( GOState  state)

Definition at line 2559 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGoType()

void GameObject::SetGoType ( GameobjectTypes  type)
inline

Definition at line 177 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLevel()

void GameObject::SetLevel ( uint32  level)
inline

Definition at line 175 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLinkedTrap()

void GameObject::SetLinkedTrap ( GameObject linkedTrap)
inline

Definition at line 232 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLocalRotation()

void GameObject::SetLocalRotation ( float  qx,
float  qy,
float  qz,
float  qw 
)

Definition at line 2338 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLocalRotationAngles()

void GameObject::SetLocalRotationAngles ( float  z_rot,
float  y_rot,
float  x_rot 
)

Definition at line 2357 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ SetLootGenerationTime()

void GameObject::SetLootGenerationTime ( )

Definition at line 2554 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLootMode()

void GameObject::SetLootMode ( uint16  lootMode)
inline

Definition at line 199 of file GameObject.h.

◆ SetLootRecipient()

void GameObject::SetLootRecipient ( Unit unit,
Group group = nullptr 
)

Definition at line 2638 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLootState()

void GameObject::SetLootState ( LootState  s,
Unit unit = nullptr 
)

Definition at line 2518 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetOwnerGUID()

void GameObject::SetOwnerGUID ( ObjectGuid  owner)
inline

Definition at line 131 of file GameObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetParentRotation()

void GameObject::SetParentRotation ( QuaternionData const &  rotation)

Definition at line 2349 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPhaseMask()

void GameObject::SetPhaseMask ( uint32  newPhaseMask,
bool  update 
)
overridevirtual

Reimplemented from WorldObject.

Definition at line 2593 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetRespawnCompatibilityMode()

void GameObject::SetRespawnCompatibilityMode ( bool  mode = true)
inline

Definition at line 270 of file GameObject.h.

+ Here is the caller graph for this function:

◆ SetRespawnTime()

void GameObject::SetRespawnTime ( int32  respawn)

Definition at line 1363 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetScriptStringId()

void GameObject::SetScriptStringId ( std::string  id)

Definition at line 2295 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSpawnedByDefault()

void GameObject::SetSpawnedByDefault ( bool  b)
inline

Definition at line 162 of file GameObject.h.

+ Here is the caller graph for this function:

◆ SetSpellId()

void GameObject::SetSpellId ( uint32  id)
inline

Definition at line 143 of file GameObject.h.

+ Here is the caller graph for this function:

◆ SwitchDoorOrButton()

void GameObject::SwitchDoorOrButton ( bool  activate,
bool  alternative = false 
)
private

Definition at line 1601 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToTransport() [1/2]

Transport * GameObject::ToTransport ( )
inline

Definition at line 291 of file GameObject.h.

+ Here is the caller graph for this function:

◆ ToTransport() [2/2]

Transport const * GameObject::ToTransport ( ) const
inline

Definition at line 292 of file GameObject.h.

◆ TriggeringLinkedGameObject()

void GameObject::TriggeringLinkedGameObject ( uint32  trapEntry,
Unit target 
)

Definition at line 1435 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void GameObject::Update ( uint32  p_time)
overridevirtual
Todo:
This is activation radius. Casting radius must be selected from spell data.
Todo:
this hack with search required until GO casting not implemented
Todo:
nullptr target won't work for target type 1

Reimplemented from WorldObject.

Reimplemented in Transport.

Definition at line 455 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ UpdateModel()

void GameObject::UpdateModel ( )
protected

Definition at line 2611 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateModelPosition()

void GameObject::UpdateModelPosition ( )

Definition at line 2824 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdatePackedRotation()

void GameObject::UpdatePackedRotation ( )
private

Definition at line 2323 of file GameObject.cpp.

+ Here is the caller graph for this function:

◆ Use()

void GameObject::Use ( Unit user)
Todo:
find reasonable value for fishing hole search
Todo:
I do not understand this hack. Need some explanation.

Definition at line 1614 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UseDoorOrButton()

void GameObject::UseDoorOrButton ( uint32  time_to_restore = 0,
bool  alternative = false,
Unit user = nullptr 
)

Definition at line 1470 of file GameObject.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ChairListSlots

ChairSlotAndUser GameObject::ChairListSlots
protected

Definition at line 340 of file GameObject.h.

◆ loot

Loot GameObject::loot

Definition at line 221 of file GameObject.h.

◆ lootingGroupLowGUID

ObjectGuid::LowType GameObject::lootingGroupLowGUID

Definition at line 229 of file GameObject.h.

◆ m_AI

GameObjectAI* GameObject::m_AI
private

Definition at line 373 of file GameObject.h.

◆ m_cooldownTime

time_t GameObject::m_cooldownTime
protected

Definition at line 329 of file GameObject.h.

◆ m_despawnDelay

uint32 GameObject::m_despawnDelay
protected

Definition at line 323 of file GameObject.h.

◆ m_despawnRespawnTime

Seconds GameObject::m_despawnRespawnTime
protected

Definition at line 324 of file GameObject.h.

◆ m_goData

GameObjectData const* GameObject::m_goData
protected

Definition at line 345 of file GameObject.h.

◆ m_goInfo

GameObjectTemplate const* GameObject::m_goInfo
protected

Definition at line 343 of file GameObject.h.

◆ m_goTemplateAddon

GameObjectTemplateAddon const* GameObject::m_goTemplateAddon
protected

Definition at line 344 of file GameObject.h.

◆ m_goValue

GameObjectValue GameObject::m_goValue
protected

Definition at line 346 of file GameObject.h.

◆ m_groupLootTimer

uint32 GameObject::m_groupLootTimer

Definition at line 228 of file GameObject.h.

◆ m_linkedTrap

ObjectGuid GameObject::m_linkedTrap
protected

Definition at line 359 of file GameObject.h.

◆ m_localRotation

QuaternionData GameObject::m_localRotation
protected

Definition at line 351 of file GameObject.h.

◆ m_lootGenerationTime

uint32 GameObject::m_lootGenerationTime
protected

Definition at line 357 of file GameObject.h.

◆ m_LootMode

uint16 GameObject::m_LootMode
protected

Definition at line 356 of file GameObject.h.

◆ m_lootRecipient

ObjectGuid GameObject::m_lootRecipient
protected

Definition at line 354 of file GameObject.h.

◆ m_lootRecipientGroup

uint32 GameObject::m_lootRecipientGroup
protected

Definition at line 355 of file GameObject.h.

◆ m_lootState

LootState GameObject::m_lootState
protected

Definition at line 325 of file GameObject.h.

◆ m_lootStateUnitGUID

ObjectGuid GameObject::m_lootStateUnitGUID
protected

Definition at line 326 of file GameObject.h.

◆ m_model

GameObjectModel* GameObject::m_model

Definition at line 288 of file GameObject.h.

◆ m_packedRotation

int64 GameObject::m_packedRotation
protected

Definition at line 350 of file GameObject.h.

◆ m_prevGoState

GOState GameObject::m_prevGoState
protected

Definition at line 331 of file GameObject.h.

◆ m_respawnCompatibilityMode

bool GameObject::m_respawnCompatibilityMode
private

Definition at line 374 of file GameObject.h.

◆ m_respawnDelayTime

uint32 GameObject::m_respawnDelayTime
protected

Definition at line 322 of file GameObject.h.

◆ m_respawnTime

time_t GameObject::m_respawnTime
protected

Definition at line 321 of file GameObject.h.

◆ m_restockTime

time_t GameObject::m_restockTime
protected

Definition at line 328 of file GameObject.h.

◆ m_ritualOwnerGUID

ObjectGuid GameObject::m_ritualOwnerGUID
protected

Definition at line 335 of file GameObject.h.

◆ m_scriptStringId

Optional<std::string> GameObject::m_scriptStringId
protected

Definition at line 348 of file GameObject.h.

◆ m_SkillupList

GuidSet GameObject::m_SkillupList
protected

Definition at line 333 of file GameObject.h.

◆ m_spawnedByDefault

bool GameObject::m_spawnedByDefault
protected

Definition at line 327 of file GameObject.h.

◆ m_spawnId

ObjectGuid::LowType GameObject::m_spawnId
protected

For new or temporary gameobjects is 0 for saved it is lowguid.

Definition at line 342 of file GameObject.h.

◆ m_spellId

uint32 GameObject::m_spellId
protected

Definition at line 320 of file GameObject.h.

◆ m_stationaryPosition

Position GameObject::m_stationaryPosition
protected

Definition at line 352 of file GameObject.h.

◆ m_stringIds

std::array<std::string const*, 3> GameObject::m_stringIds
protected

Definition at line 347 of file GameObject.h.

◆ m_unique_users

GuidSet GameObject::m_unique_users
protected

Definition at line 336 of file GameObject.h.

◆ m_usetimes

uint32 GameObject::m_usetimes
protected

Definition at line 337 of file GameObject.h.


The documentation for this class was generated from the following files: