TrinityCore
Loading...
Searching...
No Matches
GameObject.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITYCORE_GAMEOBJECT_H
19#define TRINITYCORE_GAMEOBJECT_H
20
21#include "Object.h"
22#include "GridObject.h"
23#include "GameObjectData.h"
24#include "Loot.h"
25#include "MapObject.h"
26#include "SharedDefines.h"
27
28class GameObjectAI;
29class GameObjectModel;
30class Group;
32class Transport;
33class Unit;
37
39{
40 //6 GAMEOBJECT_TYPE_TRAP
41 struct
42 {
45 //11 GAMEOBJECT_TYPE_TRANSPORT
46 struct
47 {
52 //25 GAMEOBJECT_TYPE_FISHINGHOLE
53 struct
54 {
57 //29 GAMEOBJECT_TYPE_CAPTURE_POINT
58 struct
59 {
62 //33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
63 struct
64 {
68};
69
70// For containers: [GO_NOT_READY]->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED->GO_READY -> ...
71// For bobber: GO_NOT_READY ->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED-><deleted>
72// For door(closed):[GO_NOT_READY]->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED->GO_READY(close) -> ...
73// For door(open): [GO_NOT_READY]->GO_READY (open) ->GO_ACTIVATED (close)->GO_JUST_DEACTIVATED->GO_READY(open) -> ...
75{
77 GO_READY, // can be ready but despawned, and then not possible activate until spawn
80};
81
82// 5 sec for bobber catch
83#define FISHING_BOBBER_READY_TIME 5
84
85class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject>, public MapObject
86{
87 public:
88 explicit GameObject();
90
91 void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player const* target) const override;
92
93 void AddToWorld() override;
94 void RemoveFromWorld() override;
95 void CleanupsBeforeDelete(bool finalCleanup = true) override;
96
99
100 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);
101 void Update(uint32 p_time) override;
102 GameObjectTemplate const* GetGOInfo() const { return m_goInfo; }
103 GameObjectTemplateAddon const* GetTemplateAddon() const { return m_goTemplateAddon; }
104 GameObjectOverride const* GetGameObjectOverride() const;
105 GameObjectData const* GetGameObjectData() const { return m_goData; }
106 GameObjectValue const* GetGOValue() const { return &m_goValue; }
107
108 bool IsTransport() const;
109 bool IsDynTransport() const;
110 bool IsDestructibleBuilding() const;
111
112 ObjectGuid::LowType GetSpawnId() const { return m_spawnId; }
113
114 // z_rot, y_rot, x_rot - rotation angles around z, y and x axes
115 void SetLocalRotationAngles(float z_rot, float y_rot, float x_rot);
116 void SetLocalRotation(float qx, float qy, float qz, float qw);
117 void SetParentRotation(QuaternionData const& rotation); // transforms(rotates) transport's path
118 QuaternionData const& GetLocalRotation() const { return m_localRotation; }
119 int64 GetPackedLocalRotation() const { return m_packedRotation; }
120
121 QuaternionData GetWorldRotation() const;
122
123 // overwrite WorldObject function for proper name localization
124 std::string const& GetNameForLocaleIdx(LocaleConstant locale) const override;
125
126 void SaveToDB();
127 void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask);
128 bool LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap, bool = true); // arg4 is unused, only present to match the signature on Creature
129 static bool DeleteFromDB(ObjectGuid::LowType spawnId);
130
132 {
133 // Owner already found and different than expected owner - remove object from old owner
134 if (!owner.IsEmpty() && !GetOwnerGUID().IsEmpty() && GetOwnerGUID() != owner)
135 {
136 ABORT();
137 }
138 m_spawnedByDefault = false; // all object with owner is despawned after delay
140 }
142
144 {
145 m_spawnedByDefault = false; // all summoned object is despawned after delay
146 m_spellId = id;
147 }
148 uint32 GetSpellId() const { return m_spellId;}
149
150 time_t GetRespawnTime() const { return m_respawnTime; }
151 time_t GetRespawnTimeEx() const;
152
153 void SetRespawnTime(int32 respawn);
154 void Respawn();
155 bool isSpawned() const
156 {
157 return m_respawnDelayTime == 0 ||
158 (m_respawnTime > 0 && !m_spawnedByDefault) ||
159 (m_respawnTime == 0 && m_spawnedByDefault);
160 }
161 bool isSpawnedByDefault() const { return m_spawnedByDefault; }
162 void SetSpawnedByDefault(bool b) { m_spawnedByDefault = b; }
163 uint32 GetRespawnDelay() const { return m_respawnDelayTime; }
164 void Refresh();
165 void DespawnOrUnsummon(Milliseconds delay = 0ms, Seconds forceRespawnTime = 0s);
166 void Delete();
167 void getFishLoot(Loot* loot, Player* loot_owner);
168 void getFishLootJunk(Loot* loot, Player* loot_owner);
169
174
179 void SetGoState(GOState state);
180 virtual uint32 GetTransportPeriod() const;
182 void SetGoArtKit(uint8 artkit);
184 void SetGoAnimProgress(uint8 animprogress) { SetByteValue(GAMEOBJECT_BYTES_1, 3, animprogress); }
185 static void SetGoArtKit(uint8 artkit, GameObject* go, ObjectGuid::LowType lowguid = 0);
186
187 void SetPhaseMask(uint32 newPhaseMask, bool update) override;
188
189 void EnableCollision(bool enable);
190
191 void Use(Unit* user);
192
193 LootState getLootState() const { return m_lootState; }
194 // Note: unit is only used when s = GO_ACTIVATED
195 void SetLootState(LootState s, Unit* unit = nullptr);
196
197 uint16 GetLootMode() const { return m_LootMode; }
198 bool HasLootMode(uint16 lootMode) const { return (m_LootMode & lootMode) != 0; }
199 void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
200 void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
201 void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; }
202 void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; }
203 void SetLootGenerationTime();
204 uint32 GetLootGenerationTime() const { return m_lootGenerationTime; }
205
206 void AddToSkillupList(ObjectGuid const& PlayerGuidLow) { m_SkillupList.insert(PlayerGuidLow); }
207 bool IsInSkillupList(ObjectGuid const& playerGuid) const
208 {
209 return m_SkillupList.count(playerGuid) > 0;
210 }
211 void ClearSkillupList() { m_SkillupList.clear(); }
212
213 void AddUniqueUse(Player* player);
214 void AddUse() { ++m_usetimes; }
215
216 uint32 GetUseCount() const { return m_usetimes; }
217 uint32 GetUniqueUseCount() const { return uint32(m_unique_users.size()); }
218
219 void SaveRespawnTime(uint32 forceDelay = 0);
220
222
223 Player* GetLootRecipient() const;
224 Group* GetLootRecipientGroup() const;
225 void SetLootRecipient(Unit* unit, Group* group = nullptr);
226 bool IsLootAllowedFor(Player const* player) const;
227 bool HasLootRecipient() const { return !m_lootRecipient.IsEmpty() || !m_lootRecipientGroup.IsEmpty(); }
228 uint32 m_groupLootTimer; // (msecs)timer used for group loot
229 ObjectGuid lootingGroupLowGUID; // used to find group which is looting
230
231 GameObject* GetLinkedTrap();
232 void SetLinkedTrap(GameObject* linkedTrap) { m_linkedTrap = linkedTrap->GetGUID(); }
233
234 bool hasQuest(uint32 quest_id) const override;
235 bool hasInvolvedQuest(uint32 quest_id) const override;
236 bool ActivateToQuest(Player const* target) const;
237 void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false, Unit* user = nullptr);
238 // 0 = use `gameobject`.`spawntimesecs`
239 void ResetDoorOrButton();
240 void ActivateObject(GameObjectActions action, WorldObject* spellCaster = nullptr, uint32 spellId = 0, int32 effectIndex = -1);
241
242 void TriggeringLinkedGameObject(uint32 trapEntry, Unit* target);
243
244 bool IsNeverVisible(bool allowServersideObjects) const override;
245 bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
246 bool IsInvisibleDueToDespawn() const override;
247
248 uint8 GetLevelForTarget(WorldObject const* target) const override;
249
250 GameObject* LookupFishingHoleAround(float range);
251
252 void SendCustomAnim(uint32 anim);
253 bool IsInRange(float x, float y, float z, float radius) const;
254
255 void ModifyHealth(int32 change, WorldObject* attackerOrHealer = nullptr, uint32 spellId = 0);
256 // sets GameObject type 33 destruction flags and optionally default health for that state
257 void SetDestructibleState(GameObjectDestructibleState state, WorldObject* attackerOrHealer = nullptr, bool setHealth = false);
266
267 void EventInform(uint32 eventId, WorldObject* invoker = nullptr);
268
269 // There's many places not ready for dynamic spawns. This allows them to live on for now.
270 void SetRespawnCompatibilityMode(bool mode = true) { m_respawnCompatibilityMode = mode; }
271 bool GetRespawnCompatibilityMode() {return m_respawnCompatibilityMode; }
272
273 std::string const& GetAIName() const;
274 uint32 GetScriptId() const;
275 GameObjectAI* AI() const { return m_AI; }
276
277 void InheritStringIds(GameObject const* parent);
278 bool HasStringId(std::string_view id) const;
279 void SetScriptStringId(std::string id);
280 std::string_view GetStringId(StringIdType type) const { return m_stringIds[size_t(type)] ? std::string_view(*m_stringIds[size_t(type)]) : std::string_view(); }
281
282 void SetDisplayId(uint32 displayid);
284
286 void SetFaction(uint32 faction) override { SetUInt32Value(GAMEOBJECT_FACTION, faction); }
287
289 void GetRespawnPosition(float &x, float &y, float &z, float* ori = nullptr) const;
290
291 Transport* ToTransport() { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT) return reinterpret_cast<Transport*>(this); else return nullptr; }
292 Transport const* ToTransport() const { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT) return reinterpret_cast<Transport const*>(this); else return nullptr; }
293
294 float GetStationaryX() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
295 float GetStationaryY() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
296 float GetStationaryZ() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
297 float GetStationaryO() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
298 void RelocateStationaryPosition(float x, float y, float z, float o) { m_stationaryPosition.Relocate(x, y, z, o); }
299
300 float GetInteractionDistance() const;
301
302 void UpdateModelPosition();
303
304 bool IsAtInteractDistance(Position const& pos, float radius) const;
305 bool IsAtInteractDistance(Player const* player, SpellInfo const* spell = nullptr) const;
306
307 bool IsWithinDistInMap(Player const* player) const;
309
310 SpellInfo const* GetSpellForLock(Player const* player) const;
311
312 void AIM_Destroy();
313 bool AIM_Initialize();
314
315 std::string GetDebugInfo() const override;
316
317 protected:
318 void CreateModel();
319 void UpdateModel(); // updates model in case displayId were changed
321 time_t m_respawnTime; // (secs) time of next respawn (or despawn if GO have owner()),
322 uint32 m_respawnDelayTime; // (secs) if 0 then current GO state no dependent from timer
324 Seconds m_despawnRespawnTime; // override respawn time after delayed despawn
326 ObjectGuid m_lootStateUnitGUID; // GUID of the unit passed with SetLootState(LootState, Unit*)
329 time_t m_cooldownTime; // used as internal reaction delay time store (not state change reaction).
330 // For traps this: spell casting cooldown, for doors/buttons: reset time.
331 GOState m_prevGoState; // What state to set whenever resetting
332
334
335 ObjectGuid m_ritualOwnerGUID; // used for GAMEOBJECT_TYPE_RITUAL where GO is not summoned (no owner)
338
339 typedef std::map<uint32, ObjectGuid> ChairSlotAndUser;
341
347 std::array<std::string const*, 3> m_stringIds;
349
353
356 uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
358
360
361 private:
362 void RemoveFromOwner();
363 void SwitchDoorOrButton(bool activate, bool alternative = false);
364 void UpdatePackedRotation();
365
367 bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/, bool /*incOwnRadius*/, bool /*incTargetRadius*/) const override
368 {
370 return IsInRange(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), dist2compare);
371 }
372
375};
376#endif
LocaleConstant
Definition Common.h:48
#define TC_GAME_API
Definition Define.h:114
uint8_t uint8
Definition Define.h:135
int64_t int64
Definition Define.h:128
int32_t int32
Definition Define.h:129
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
uint16 flags
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:27
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
#define ABORT
Definition Errors.h:74
GameObjectActions
LootState
Definition GameObject.h:75
@ GO_ACTIVATED
Definition GameObject.h:78
@ GO_READY
Definition GameObject.h:77
@ GO_NOT_READY
Definition GameObject.h:76
@ GO_JUST_DEACTIVATED
Definition GameObject.h:79
std::set< ObjectGuid > GuidSet
Definition ObjectGuid.h:260
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
static void SaveToDB(QuestPool const &pool, CharacterDatabaseTransaction trans)
GameobjectTypes
@ GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT
StringIdType
GameObjectDestructibleState
@ GO_DESTRUCTIBLE_DESTROYED
@ GO_DESTRUCTIBLE_INTACT
@ GO_DESTRUCTIBLE_DAMAGED
@ LOOT_MODE_DEFAULT
GameObjectFlags
@ GO_FLAG_DESTROYED
@ GO_FLAG_DAMAGED
GOState
TriggerCastFlags
SpellTargetCheckTypes
Definition SpellInfo.h:78
@ GAMEOBJECT_LEVEL
@ GAMEOBJECT_FACTION
@ GAMEOBJECT_DYNAMIC
@ OBJECT_FIELD_CREATED_BY
@ GAMEOBJECT_FLAGS
@ GAMEOBJECT_BYTES_1
@ GAMEOBJECT_DISPLAYID
uint32 GetRespawnDelay() const
Definition GameObject.h:163
ObjectGuid GetOwnerGUID() const override
Definition GameObject.h:141
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...
Definition GameObject.h:367
GameObjectValue m_goValue
Definition GameObject.h:346
void AddLootMode(uint16 lootMode)
Definition GameObject.h:200
GameObjectTemplate const * GetGOInfo() const
Definition GameObject.h:102
GOState GetGoState() const
Definition GameObject.h:178
time_t m_respawnTime
Definition GameObject.h:321
time_t m_cooldownTime
Definition GameObject.h:329
void AddUse()
Definition GameObject.h:214
void RemoveFlag(GameObjectFlags flags)
Definition GameObject.h:172
bool HasFlag(GameObjectFlags flags) const
Definition GameObject.h:170
float GetStationaryZ() const override
Definition GameObject.h:296
GameObjectData const * m_goData
Definition GameObject.h:345
LootState getLootState() const
Definition GameObject.h:193
uint32 GetSpellId() const
Definition GameObject.h:148
uint8 GetGoAnimProgress() const
Definition GameObject.h:183
int64 m_packedRotation
Definition GameObject.h:350
Position m_stationaryPosition
Definition GameObject.h:352
ObjectGuid m_lootRecipientGroup
Definition GameObject.h:355
QuaternionData const & GetLocalRotation() const
Definition GameObject.h:118
time_t m_restockTime
Definition GameObject.h:328
uint32 GetUniqueUseCount() const
Definition GameObject.h:217
void ReplaceAllFlags(GameObjectFlags flags)
Definition GameObject.h:173
uint32 GetFaction() const override
Definition GameObject.h:285
uint16 m_LootMode
Definition GameObject.h:356
uint32 GetDynamicFlags() const override
Definition GameObject.h:97
uint8 GetGoArtKit() const
Definition GameObject.h:181
void SetGoAnimProgress(uint8 animprogress)
Definition GameObject.h:184
ObjectGuid m_lootStateUnitGUID
Definition GameObject.h:326
float GetStationaryY() const override
Definition GameObject.h:295
bool isSpawned() const
Definition GameObject.h:155
void SetOwnerGUID(ObjectGuid owner)
Definition GameObject.h:131
bool isSpawnedByDefault() const
Definition GameObject.h:161
ChairSlotAndUser ChairListSlots
Definition GameObject.h:340
bool HasLootMode(uint16 lootMode) const
Definition GameObject.h:198
GameObjectValue const * GetGOValue() const
Definition GameObject.h:106
void SetFlag(GameObjectFlags flags)
Definition GameObject.h:171
uint32 m_spellId
Definition GameObject.h:320
std::array< std::string const *, 3 > m_stringIds
Definition GameObject.h:347
time_t GetRespawnTime() const
Definition GameObject.h:150
uint32 GetLootGenerationTime() const
Definition GameObject.h:204
bool HasLootRecipient() const
Definition GameObject.h:227
void AddToSkillupList(ObjectGuid const &PlayerGuidLow)
Definition GameObject.h:206
float GetStationaryX() const override
Definition GameObject.h:294
uint32 m_respawnDelayTime
Definition GameObject.h:322
GameObjectAI * AI() const
Definition GameObject.h:275
void ResetLootMode()
Definition GameObject.h:202
GuidSet m_unique_users
Definition GameObject.h:336
void RemoveLootMode(uint16 lootMode)
Definition GameObject.h:201
void SetSpawnedByDefault(bool b)
Definition GameObject.h:162
bool IsInSkillupList(ObjectGuid const &playerGuid) const
Definition GameObject.h:207
void SetRespawnCompatibilityMode(bool mode=true)
Definition GameObject.h:270
GameobjectTypes GetGoType() const
Definition GameObject.h:176
Transport const * ToTransport() const
Definition GameObject.h:292
void SetGoType(GameobjectTypes type)
Definition GameObject.h:177
uint32 m_despawnDelay
Definition GameObject.h:323
Seconds m_despawnRespawnTime
Definition GameObject.h:324
QuaternionData m_localRotation
Definition GameObject.h:351
void SetLinkedTrap(GameObject *linkedTrap)
Definition GameObject.h:232
GameObjectData const * GetGameObjectData() const
Definition GameObject.h:105
bool m_respawnCompatibilityMode
Definition GameObject.h:374
GameObjectTemplateAddon const * m_goTemplateAddon
Definition GameObject.h:344
ObjectGuid::LowType GetSpawnId() const
Definition GameObject.h:112
bool GetRespawnCompatibilityMode()
Definition GameObject.h:271
GameObjectAI * m_AI
Definition GameObject.h:373
uint32 GetDisplayId() const
Definition GameObject.h:283
int64 GetPackedLocalRotation() const
Definition GameObject.h:119
GameObjectModel * m_model
Definition GameObject.h:288
void SetLevel(uint32 level)
Definition GameObject.h:175
Optional< std::string > m_scriptStringId
Definition GameObject.h:348
GameObjectTemplateAddon const * GetTemplateAddon() const
Definition GameObject.h:103
void SetLootMode(uint16 lootMode)
Definition GameObject.h:199
uint32 GetUseCount() const
Definition GameObject.h:216
void RelocateStationaryPosition(float x, float y, float z, float o)
Definition GameObject.h:298
GameObjectTemplate const * m_goInfo
Definition GameObject.h:343
ObjectGuid::LowType m_spawnId
For new or temporary gameobjects is 0 for saved it is lowguid.
Definition GameObject.h:342
std::map< uint32, ObjectGuid > ChairSlotAndUser
Definition GameObject.h:339
uint32 m_groupLootTimer
Definition GameObject.h:228
std::string_view GetStringId(StringIdType type) const
Definition GameObject.h:280
ObjectGuid m_linkedTrap
Definition GameObject.h:359
uint16 GetLootMode() const
Definition GameObject.h:197
Transport * ToTransport()
Definition GameObject.h:291
void ClearSkillupList()
Definition GameObject.h:211
bool m_spawnedByDefault
Definition GameObject.h:327
GameObjectDestructibleState GetDestructibleState() const
Definition GameObject.h:258
float GetStationaryO() const override
Definition GameObject.h:297
LootState m_lootState
Definition GameObject.h:325
ObjectGuid lootingGroupLowGUID
Definition GameObject.h:229
ObjectGuid m_ritualOwnerGUID
Definition GameObject.h:335
uint32 m_usetimes
Definition GameObject.h:337
void ReplaceAllDynamicFlags(uint32 flag) override
Definition GameObject.h:98
void SetSpellId(uint32 id)
Definition GameObject.h:143
GOState m_prevGoState
Definition GameObject.h:331
ObjectGuid m_lootRecipient
Definition GameObject.h:354
void SetFaction(uint32 faction) override
Definition GameObject.h:286
uint32 m_lootGenerationTime
Definition GameObject.h:357
GuidSet m_SkillupList
Definition GameObject.h:333
Definition Group.h:165
Definition Map.h:281
bool IsEmpty() const
Definition ObjectGuid.h:172
uint32 LowType
Definition ObjectGuid.h:142
uint8 GetByteValue(uint16 index, uint8 offset) const
Definition Object.cpp:267
void SetByteValue(uint16 index, uint8 offset, uint8 value)
Definition Object.cpp:668
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:249
virtual void BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, Player const *target) const
Definition Object.cpp:447
virtual bool hasQuest(uint32) const
Definition Object.h:155
void SetFlag(uint16 index, uint32 newFlag)
Definition Object.cpp:760
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition Object.cpp:775
void SetGuidValue(uint16 index, ObjectGuid value)
Definition Object.cpp:699
bool HasFlag(uint16 index, uint32 flag) const
Definition Object.cpp:799
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
virtual bool hasInvolvedQuest(uint32) const
Definition Object.h:156
void SetUInt32Value(uint16 index, uint32 value)
Definition Object.cpp:585
ObjectGuid GetGuidValue(uint16 index) const
Definition Object.cpp:281
Definition Unit.h:769
virtual void SetPhaseMask(uint32 newPhaseMask, bool update)
Definition Object.cpp:3417
void AddToWorld() override
Definition Object.cpp:1060
void RemoveFromWorld() override
Definition Object.cpp:1066
virtual uint8 GetLevelForTarget(WorldObject const *) const
Definition Object.h:423
virtual bool IsInvisibleDueToDespawn() const
Definition Object.h:625
std::string GetDebugInfo() const override
Definition Object.cpp:3614
virtual bool IsAlwaysVisibleFor(WorldObject const *) const
Definition Object.h:624
virtual std::string const & GetNameForLocaleIdx(LocaleConstant) const
Definition Object.h:385
virtual bool IsNeverVisible(bool allowServersideObjects) const
Definition Object.h:623
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:1192
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
Definition Object.cpp:1283
virtual ObjectGuid GetOwnerGUID() const =0
virtual void Update(uint32 diff)
Definition Object.cpp:960
virtual void CleanupsBeforeDelete(bool finalCleanup=true)
Definition Object.cpp:1031
Definition Loot.h:207
float GetPositionZ() const
Definition Position.h:81
float GetOrientation() const
Definition Position.h:82
float GetPositionX() const
Definition Position.h:79
float GetPositionY() const
Definition Position.h:80
struct GameObjectValue::@189 CapturePoint
struct GameObjectValue::@190 Building
struct GameObjectValue::@187 Transport
OPvPCapturePoint * OPvPObj
Definition GameObject.h:60
struct GameObjectValue::@188 FishingHole
uint32 CurrentSeg
Definition GameObject.h:50
SpellTargetCheckTypes TargetSearcherCheckType
Definition GameObject.h:43
uint32 PathProgress
Definition GameObject.h:48
TransportAnimation const * AnimationInfo
Definition GameObject.h:49
struct GameObjectValue::@186 Trap