OregonCore  revision be9e804-git
Your Favourite TBC server
GameObject.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore 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 <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef OREGONCORE_GAMEOBJECT_H
19 #define OREGONCORE_GAMEOBJECT_H
20 
21 #include "Common.h"
22 #include "SharedDefines.h"
23 #include "Unit.h"
24 #include "Object.h"
25 #include "LootMgr.h"
26 #include "Database/DatabaseEnv.h"
27 
28 // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform
29 #if defined(__GNUC__)
30 #pragma pack(1)
31 #else
32 #pragma pack(push,1)
33 #endif
34 
35 // from `gameobject_template`
37 {
41  char* name;
45  float size;
46  union // different GO types have different data field
47  {
48  //0 GAMEOBJECT_TYPE_DOOR
49  struct
50  {
51  uint32 startOpen; //0 used client side to determine GO_ACTIVATED means open/closed
52  uint32 lockId; //1 -> Lock.dbc
53  uint32 autoCloseTime; //2 secs till autoclose = autoCloseTime / 0x10000
54  uint32 noDamageImmune; //3 break opening whenever you recieve damage?
55  uint32 openTextID; //4 can be used to replace castBarCaption?
57  } door;
58  //1 GAMEOBJECT_TYPE_BUTTON
59  struct
60  {
61  uint32 startOpen; //0
62  uint32 lockId; //1 -> Lock.dbc
63  uint32 autoCloseTime; //2 secs till autoclose = autoCloseTime / 0x10000
65  uint32 noDamageImmune; //4 isBattlegroundObject
67  uint32 openTextID; //6 can be used to replace castBarCaption?
68  uint32 closeTextID; //7
70  } button;
71  //2 GAMEOBJECT_TYPE_QUESTGIVER
72  struct
73  {
74  uint32 lockId; //0 -> Lock.dbc
80  uint32 openTextID; //6 can be used to replace castBarCaption?
81  uint32 losOK; //7
83  uint32 large; //9
84  } questgiver;
85  //3 GAMEOBJECT_TYPE_CHEST
86  struct
87  {
88  uint32 lockId; //0 -> Lock.dbc
94  uint32 eventId; //6 lootedEvent
95  uint32 linkedTrapId; //7
96  uint32 questId; //8 not used currently but store quest required for GO activation for player
98  uint32 losOK; //10
102  uint32 openTextID; //14 can be used to replace castBarCaption?
104  } chest;
105  //4 GAMEOBJECT_TYPE_BINDER - empty
106  //5 GAMEOBJECT_TYPE_GENERIC
107  struct
108  {
112  uint32 large; //3
115  } _generic;
116  //6 GAMEOBJECT_TYPE_TRAP
117  struct
118  {
119  uint32 lockId; //0 -> Lock.dbc
120  uint32 level; //1
121  uint32 radius; //2 radius for trap activation
123  uint32 type; //4 0 trap with no despawn after cast. 1 trap despawns after cast. 2 bomb casts on spawn.
124  uint32 cooldown; //5 time in secs
125  uint32 autoCloseTime; //6
127  uint32 serverOnly; //8
129  uint32 large; //10
131  uint32 openTextID; //12 can be used to replace castBarCaption?
132  uint32 closeTextID; //13
133  } trap;
134  //7 GAMEOBJECT_TYPE_CHAIR
135  struct
136  {
140  } chair;
141  //8 GAMEOBJECT_TYPE_SPELL_FOCUS
142  struct
143  {
146  uint32 linkedTrapId; //2
147  uint32 serverOnly; //3
148  uint32 questID; //4
149  uint32 large; //5
150  } spellFocus;
151  //9 GAMEOBJECT_TYPE_TEXT
152  struct
153  {
156  uint32 pageMaterial; //2
157  uint32 allowMounted; //3
158  } text;
159  //10 GAMEOBJECT_TYPE_GOOBER
160  struct
161  {
162  uint32 lockId; //0 -> Lock.dbc
163  uint32 questId; //1
164  uint32 eventId; //2
165  uint32 autoCloseTime; //3
166  uint32 customAnim; //4
167  uint32 consumable; //5
168  uint32 cooldown; //6
170  uint32 language; //8
171  uint32 pageMaterial; //9
172  uint32 spellId; //10
173  uint32 noDamageImmune; //11
174  uint32 linkedTrapId; //12
175  uint32 large; //13
176  uint32 openTextID; //14 can be used to replace castBarCaption?
177  uint32 closeTextID; //15
178  uint32 losOK; //16 isBattlegroundObject
179  uint32 allowMounted; //17
180  uint32 floatingTooltip; //18
181  uint32 gossipID; //19
182  } goober;
183  //11 GAMEOBJECT_TYPE_TRANSPORT
184  struct
185  {
187  uint32 startOpen; //1
188  uint32 autoCloseTime; //2 secs till autoclose = autoCloseTime / 0x10000
189  } transport;
190  //12 GAMEOBJECT_TYPE_AREADAMAGE
191  struct
192  {
193  uint32 lockId; //0
194  uint32 radius; //1
198  uint32 autoCloseTime; //5 secs till autoclose = autoCloseTime / 0x10000
199  uint32 openTextID; //6
200  uint32 closeTextID; //7
201  } areadamage;
202  //13 GAMEOBJECT_TYPE_CAMERA
203  struct
204  {
205  uint32 lockId; //0 -> Lock.dbc
208  uint32 openTextID; //3 can be used to replace castBarCaption?
209  } camera;
210  //14 GAMEOBJECT_TYPE_MAPOBJECT - empty
211  //15 GAMEOBJECT_TYPE_MO_TRANSPORT
212  struct
213  {
221  } moTransport;
222  //16 GAMEOBJECT_TYPE_DUELFLAG - empty
223  //17 GAMEOBJECT_TYPE_FISHINGNODE
224  struct
225  {
227  uint32 lootId; //1
228  } fishnode;
229  //18 GAMEOBJECT_TYPE_SUMMONING_RITUAL
230  struct
231  {
233  uint32 spellId; //1
240  } summoningRitual;
241  //19 GAMEOBJECT_TYPE_MAILBOX - empty
242  //20 GAMEOBJECT_TYPE_AUCTIONHOUSE
243  struct
244  {
246  } auctionhouse;
247  //21 GAMEOBJECT_TYPE_GUARDPOST
248  struct
249  {
252  } guardpost;
253  //22 GAMEOBJECT_TYPE_SPELLCASTER
254  struct
255  {
256  uint32 spellId; //0
257  uint32 charges; //1
259  } spellcaster;
260  //23 GAMEOBJECT_TYPE_MEETINGSTONE
261  struct
262  {
266  } meetingstone;
267  //24 GAMEOBJECT_TYPE_FLAGSTAND
268  struct
269  {
270  uint32 lockId; //0
272  uint32 radius; //2
276  uint32 openTextID; //6
277  uint32 losOK; //7
278  } flagstand;
279  //25 GAMEOBJECT_TYPE_FISHINGHOLE // not implemented yet
280  struct
281  {
282  uint32 radius; //0 how close bobber must land for sending loot
283  uint32 lootId; //1
286  uint32 lockId; //4 -> Lock.dbc; possibly 1628 for all?
287  } fishinghole;
288  //26 GAMEOBJECT_TYPE_FLAGDROP
289  struct
290  {
291  uint32 lockId; //0
292  uint32 eventID; //1
293  uint32 pickupSpell; //2
295  uint32 openTextID; //4
296  } flagdrop;
297  //27 GAMEOBJECT_TYPE_MINI_GAME
298  struct
299  {
301  } miniGame;
302  //29 GAMEOBJECT_TYPE_CAPTURE_POINT
303  struct
304  {
305  uint32 radius; //0
323  uint32 large; //18
324  uint32 highlight; //19
325  } capturePoint;
326  //30 GAMEOBJECT_TYPE_AURA_GENERATOR
327  struct
328  {
329  uint32 startOpen; //0
330  uint32 radius; //1
335  uint32 serverOnly; //6
336  } auraGenerator;
337  //31 GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY
338  struct
339  {
340  uint32 mapID; //0
343  //32 GAMEOBJECT_TYPE_DO_NOT_USE_YET
344  struct
345  {
346  uint32 mapID; //0
347  uint32 difficulty; //1
348  } doNotUseYet;
349  //33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
350  struct
351  {
357  //34 GAMEOBJECT_TYPE_GUILDBANK - empty
358 
359  // not use for specific field access (only for output with loop by all filed), also this determinate max union size
360  struct
361  {
363  } raw;
364  };
365 
366  char const* AIName;
368 
369  // helpers
370  bool IsDespawnAtAction() const
371  {
372  switch (type)
373  {
374  case GAMEOBJECT_TYPE_CHEST: return chest.consumable;
375  case GAMEOBJECT_TYPE_GOOBER: return goober.consumable;
376  default: return false;
377  }
378  }
379 
380  uint32 GetCharges() const // despawn at uses amount
381  {
382  switch (type)
383  {
384  //case GAMEOBJECT_TYPE_TRAP: return trap.charges;
385  case GAMEOBJECT_TYPE_GUARDPOST: return guardpost.charges;
386  case GAMEOBJECT_TYPE_SPELLCASTER: return spellcaster.charges;
387  default: return 0;
388  }
389  }
390 
392  {
393  uint32 autoCloseTime = 0;
394  switch (type)
395  {
397  autoCloseTime = door.autoCloseTime;
398  break;
400  autoCloseTime = button.autoCloseTime;
401  break;
403  autoCloseTime = trap.autoCloseTime;
404  break;
406  autoCloseTime = goober.autoCloseTime;
407  break;
409  autoCloseTime = transport.autoCloseTime;
410  break;
412  autoCloseTime = areadamage.autoCloseTime;
413  break;
414  default:
415  break;
416  }
417  return autoCloseTime / 0x10000;
418  }
419 
421  {
422  switch(type)
423  {
424  case GAMEOBJECT_TYPE_CHEST: return chest.lootId;
425  case GAMEOBJECT_TYPE_FISHINGHOLE: return fishinghole.lootId;
426  default: return 0;
427  }
428  }
429 
431  {
432  switch (type)
433  {
435  return door.lockId;
437  return button.lockId;
439  return questgiver.lockId;
441  return chest.lockId;
443  return trap.lockId;
445  return goober.lockId;
447  return areadamage.lockId;
449  return camera.lockId;
451  return flagstand.lockId;
453  return fishinghole.lockId;
455  return flagdrop.lockId;
456  default:
457  return 0;
458  }
459  }
460 
461  bool GetDespawnPossibility() const // despawn at targeting of cast?
462  {
463  switch (type)
464  {
466  return door.noDamageImmune;
468  return button.noDamageImmune;
470  return questgiver.noDamageImmune;
472  return goober.noDamageImmune;
474  return flagstand.noDamageImmune;
476  return flagdrop.noDamageImmune;
477  default:
478  return true;
479  }
480  }
481 
483  {
484  switch (type)
485  {
487  return chest.linkedTrapId;
489  return spellFocus.linkedTrapId;
491  return goober.linkedTrapId;
492  default:
493  return 0;
494  }
495  }
496 
498  {
499  switch (type)
500  {
501  case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.gossipID;
502  case GAMEOBJECT_TYPE_GOOBER: return goober.gossipID;
503  default: return 0;
504  }
505  }
506 
507  bool IsLargeGameObject() const
508  {
509  switch (type)
510  {
511  case GAMEOBJECT_TYPE_BUTTON: return button.large != 0;
512  case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.large != 0;
513  case GAMEOBJECT_TYPE_GENERIC: return _generic.large != 0;
514  case GAMEOBJECT_TYPE_TRAP: return trap.large != 0;
515  case GAMEOBJECT_TYPE_SPELL_FOCUS: return spellFocus.large != 0;
516  case GAMEOBJECT_TYPE_GOOBER: return goober.large != 0;
517  case GAMEOBJECT_TYPE_CAPTURE_POINT: return capturePoint.large != 0;
518  default: return false;
519  }
520  }
521 
522  std::string GetAIName() const
523  {
524  return AIName;
525  }
526 };
527 
528 // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
529 #if defined( __GNUC__ )
530 #pragma pack()
531 #else
532 #pragma pack(pop)
533 #endif
534 
536 {
537  std::vector<std::string> Name;
538  std::vector<std::string> CastBarCaption;
539 };
540 
541 // client side GO show states
543 {
544  GO_STATE_ACTIVE = 0, // show in world as used and not reset (closed door open)
545  GO_STATE_READY = 1, // show in world as ready (closed door close)
546  GO_STATE_ACTIVE_ALTERNATIVE = 2 // show in world as used in alt way and not reset (closed door open by cannon fire)
547 };
548 
549 #define MAX_GO_STATE 3
550 
551 // from `gameobject`
553 {
554  explicit GameObjectData() : dbData(true) {}
555  uint32 id; // entry in gamobject_template
560  float posX;
561  float posY;
562  float posZ;
563  float orientation;
564  float rotation0;
565  float rotation1;
566  float rotation2;
567  float rotation3;
573  bool dbData;
574 };
575 
576 // For containers: [GO_NOT_READY]->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED->GO_READY -> ...
577 // For bobber: GO_NOT_READY ->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED-><deleted>
578 // For door(closed):[GO_NOT_READY]->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED->GO_READY(close) -> ...
579 // For door(open): [GO_NOT_READY]->GO_READY (open) ->GO_ACTIVATED (close)->GO_JUST_DEACTIVATED->GO_READY(open) -> ...
581 {
583  GO_READY, // can be ready but despawned, and then not possible activate until spawn
586 };
587 
588 class GameObjectAI;
589 class Unit;
590 class GameObjectModel;
591 class Transport;
592 
593 // 5 sec for bobber catch
594 #define FISHING_BOBBER_READY_TIME 5
595 
596 class GameObject : public WorldObject, public GridObject<GameObject>
597 {
598  public:
599  explicit GameObject();
600  ~GameObject() override;
601 
602  void AddToWorld() override;
603  void RemoveFromWorld() override;
604  void CleanupsBeforeDelete() override;
605 
606  bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 ArtKit = 0);
607  void Update(uint32 diff) override;
608  static GameObject* GetGameObject(WorldObject& object, uint64 guid);
609  GameObjectInfo const* GetGOInfo() const
610  {
611  return m_goInfo;
612  }
613  GameObjectData const* GetGOData() const
614  {
615  return m_goData;
616  }
617 
618  void SetGoState(GOState state);
619  void SetPhaseMask(uint32 newPhaseMask, bool update) override;
620  void EnableCollision(bool enable);
621 
622  bool IsTransport() const;
623 
625  {
626  return m_DBTableGuid;
627  }
628 
629  void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f);
630 
631  void Say(const char* text, uint32 language, uint64 TargetGuid)
632  {
633  MonsterSay(text, language, TargetGuid);
634  }
635  void Yell(const char* text, uint32 language, uint64 TargetGuid)
636  {
637  MonsterYell(text, language, TargetGuid);
638  }
639  void TextEmote(const char* text, uint64 TargetGuid)
640  {
641  MonsterTextEmote(text, TargetGuid);
642  }
643  void Whisper(const char* text, uint64 receiver)
644  {
645  MonsterWhisper(text, receiver);
646  }
647  void Say(int32 textId, uint32 language, uint64 TargetGuid)
648  {
649  MonsterSay(textId, language, TargetGuid);
650  }
651  void Yell(int32 textId, uint32 language, uint64 TargetGuid)
652  {
653  MonsterYell(textId, language, TargetGuid);
654  }
655  void TextEmote(int32 textId, uint64 TargetGuid)
656  {
657  MonsterTextEmote(textId, TargetGuid);
658  }
659  void Whisper(int32 textId, uint64 receiver)
660  {
661  MonsterWhisper(textId, receiver);
662  }
663 
664  // overwrite WorldObject function for proper name localization
665  const char* GetNameForLocaleIdx(int32 locale_idx) const override;
666 
667  void SaveToDB();
668  void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask);
669  bool LoadFromDB(uint32 guid, Map* map) { return LoadGameObjectFromDB(guid, map, false); }
670  bool LoadGameObjectFromDB(uint32 guid, Map* map, bool addToMap = true);
671  void DeleteFromDB();
672 
673  void SetOwnerGUID(uint64 owner)
674  {
675  // Owner already found and different than expected owner - remove object from old owner
676  if (owner && GetOwnerGUID() && GetOwnerGUID() != owner)
677  assert(false);
678  m_spawnedByDefault = false; // all object with owner is despawned after delay
679  SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner);
680  }
682  {
683  return GetUInt64Value(OBJECT_FIELD_CREATED_BY);
684  }
685  Unit* GetOwner() const;
686 
688  {
689  m_spawnedByDefault = false; // all summoned object is despawned after delay
690  m_spellId = id;
691  }
693  {
694  return m_spellId;
695  }
696 
697  time_t GetRespawnTime() const
698  {
699  return m_respawnTime;
700  }
701  time_t GetRespawnTimeEx() const
702  {
703  time_t now = time(NULL);
704  if (m_respawnTime > now)
705  return m_respawnTime;
706  else
707  return now;
708  }
709 
710  void SetRespawnTime(int32 respawn)
711  {
712  m_respawnTime = respawn > 0 ? time(NULL) + respawn : 0;
713  m_respawnDelayTime = respawn > 0 ? respawn : 0;
714  }
715  void Respawn();
716  bool isSpawned() const
717  {
718  return m_respawnDelayTime == 0 ||
719  (m_respawnTime > 0 && !m_spawnedByDefault) ||
720  (m_respawnTime == 0 && m_spawnedByDefault);
721  }
722  bool isSpawnedByDefault() const
723  {
724  return m_spawnedByDefault;
725  }
726  void SetSpawnedByDefault(bool b)
727  {
728  m_spawnedByDefault = b;
729  }
731  {
732  return m_respawnDelayTime;
733  }
734  void Refresh();
735  void Delete();
736  void getFishLoot(Loot* loot, Player* loot_owner);
738  {
739  return GameobjectTypes(GetUInt32Value(GAMEOBJECT_TYPE_ID));
740  }
742  {
743  SetUInt32Value(GAMEOBJECT_TYPE_ID, type);
744  }
746  {
747  return GOState(GetUInt32Value(GAMEOBJECT_STATE));
748  }
750  {
751  return GetUInt32Value(GAMEOBJECT_ARTKIT);
752  }
753  void SetGoArtKit(uint32 artkit);
755  {
756  return GetUInt32Value(GAMEOBJECT_ANIMPROGRESS);
757  }
758  void SetGoAnimProgress(uint32 animprogress)
759  {
760  SetUInt32Value(GAMEOBJECT_ANIMPROGRESS, animprogress);
761  }
762 
763  void Use(Unit* user);
764 
766  {
767  return m_lootState;
768  }
769  void SetLootState(LootState s, Unit* unit = NULL);
770 
771  void AddToSkillupList(uint32 PlayerGuidLow)
772  {
773  m_SkillupList.push_back(PlayerGuidLow);
774  }
775  bool IsInSkillupList(uint32 PlayerGuidLow) const
776  {
777  for (std::list<uint32>::const_iterator i = m_SkillupList.begin(); i != m_SkillupList.end(); ++i)
778  if (*i == PlayerGuidLow) return true;
779  return false;
780  }
782  {
783  m_SkillupList.clear();
784  }
785 
786  void AddUniqueUse(Player* player);
787  void AddUse()
788  {
789  ++m_usetimes;
790  }
791 
793  {
794  return m_usetimes;
795  }
797  {
798  return m_unique_users.size();
799  }
800 
801  bool IsUsedBy(uint64 guid)
802  {
803  return m_unique_users.find(guid) != m_unique_users.end();
804  }
805 
806  void SaveRespawnTime() override;
807 
809 
810  bool hasQuest(uint32 quest_id) const override;
811  bool hasInvolvedQuest(uint32 quest_id) const override;
812  bool ActivateToQuest(Player* pTarget) const;
813  void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false, Unit* user = NULL);
814  // 0 = use `gameobject`.`spawntimesecs`
815  void ResetDoorOrButton();
816 
817  void Animate(uint32 anim = 0);
818 
819  uint32 GetCooldown() const // Cooldown preventing goober and traps to cast spell
820  {
821  switch (GetGoType())
822  {
824  return GetGOInfo()->trap.cooldown;
826  return GetGOInfo()->goober.cooldown;
827  default:
828  return 0;
829  }
830  }
831 
832  void TriggeringLinkedGameObject(uint32 trapEntry, Unit* target);
833 
834  bool IsNeverVisible() const override;
835 
836  bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
837  bool IsInvisibleDueToDespawn() const override;
838 
839  uint8 getLevelForTarget(WorldObject const* target) const override
840  {
841  if (Unit* owner = GetOwner())
842  return owner->getLevelForTarget(target);
843 
844  return 1;
845  }
846 
847  Transport* ToTransport() { if (GetGOInfo()->type == GAMEOBJECT_TYPE_TRANSPORT) return reinterpret_cast<Transport*>(this); else return NULL; }
848  Transport const* ToTransport() const { if (GetGOInfo()->type == GAMEOBJECT_TYPE_TRANSPORT) return reinterpret_cast<Transport const*>(this); else return NULL; }
849 
850  float GetInteractionDistance() const;
851 
852  void UpdateModelPosition();
853  GameObject* LookupFishingHoleAround(float range);
854 
855  void CastSpell(Unit* target, uint32 spellId, bool triggered = true);
856 
857  GameObjectAI* AI() const { return m_AI; }
858 
859  std::string GetAIName() const;
860  protected:
861  bool AIM_Initialize();
863  time_t m_respawnTime; // (secs) time of next respawn (or despawn if GO have owner()),
864  uint32 m_respawnDelayTime; // (secs) if 0 then current GO state no dependent from timer
867  time_t m_cooldownTime; // used as internal reaction delay time store (not state change reaction).
868  // For traps this: spell casting cooldown, for doors/buttons: reset time.
869  std::list<uint32> m_SkillupList;
870 
871  uint64 m_ritualOwnerGUID; // used for GAMEOBJECT_TYPE_SUMMONING_RITUAL where GO is not summoned (no owner)
872  std::set<uint64> m_unique_users;
874 
875  uint32 m_DBTableGuid; // For new or temporary gameobjects is 0 for saved it is lowguid
878  void SetDisplayId(uint32 displayid);
879 
881  private:
882  void SwitchDoorOrButton(bool activate, bool alternative = false);
883 
885 
886  void UpdateModel(); // updates model in case displayId were changed
887 };
888 #endif
889 
uint32 GetLinkedGameObjectEntry() const
Definition: GameObject.h:482
uint32 invisible
Definition: GameObject.h:130
GameobjectTypes
struct GameObjectInfo::@59::@80 meetingstone
struct GameObjectInfo::@59::@69 text
uint32 gameType
Definition: GameObject.h:300
uint32 returnAura
Definition: GameObject.h:273
uint32 GetCooldown() const
Definition: GameObject.h:819
uint32 questId
Definition: GameObject.h:96
uint32 linkedTrapId
Definition: GameObject.h:64
uint32 onlyCreatorUse
Definition: GameObject.h:139
struct GameObjectInfo::@59::@73 camera
struct GameObjectInfo::@59::@66 trap
LootState m_lootState
Definition: GameObject.h:865
uint32 data[24]
Definition: GameObject.h:362
GameObjectAI * AI() const
Definition: GameObject.h:857
GameObjectInfo const * m_goInfo
Definition: GameObject.h:876
struct GameObjectInfo::@59::@86 auraGenerator
uint32 minSuperiority
Definition: GameObject.h:319
struct GameObjectInfo::@59::@76 summoningRitual
bool IsLargeGameObject() const
Definition: GameObject.h:507
uint32 maxSuccessOpens
Definition: GameObject.h:93
uint32 auraID2
Definition: GameObject.h:333
uint32 damageMin
Definition: GameObject.h:195
uint32 worldstate3
Definition: GameObject.h:318
struct GameObjectInfo::@59::@71 transport
GOState GetGoState() const
Definition: GameObject.h:745
uint32 cinematicId
Definition: GameObject.h:206
LootState
Definition: GameObject.h:580
uint32 cooldown
Definition: GameObject.h:124
LootState getLootState() const
Definition: GameObject.h:765
int32 spawntimesecs
Definition: GameObject.h:568
void Say(int32 textId, uint32 language, uint64 TargetGuid)
Definition: GameObject.h:647
uint32 m_usetimes
Definition: GameObject.h:873
uint32 level
Definition: GameObject.h:97
uint32 contestedEventID1
Definition: GameObject.h:311
uint32 moveSpeed
Definition: GameObject.h:215
uint32 m_respawnDelayTime
Definition: GameObject.h:864
uint32 returnSpell
Definition: GameObject.h:274
uint32 serverOnly
Definition: GameObject.h:111
uint32 maxLevel
Definition: GameObject.h:264
uint32 logLoot
Definition: GameObject.h:101
struct GameObjectInfo::@59::@77 auctionhouse
GameObjectData const * GetGOData() const
Definition: GameObject.h:613
struct GameObjectInfo::@59::@83 flagdrop
void SetGoType(GameobjectTypes type)
Definition: GameObject.h:741
uint32 questID
Definition: GameObject.h:114
time_t GetRespawnTime() const
Definition: GameObject.h:697
uint32 dmgPctState2
Definition: GameObject.h:353
struct GameObjectInfo::@59::@64 chest
uint64 GetOwnerGUID() const
Definition: GameObject.h:681
uint32 damageMax
Definition: GameObject.h:196
uint32 lootId
Definition: GameObject.h:89
GameObjectAI * m_AI
Definition: GameObject.h:884
struct GameObjectInfo::@59::@63 questgiver
uint32 maxTime
Definition: GameObject.h:322
uint32 minSuccessOpens
Definition: GameObject.h:92
struct GameObjectInfo::@59::@74 moTransport
uint32 gossipID
Definition: GameObject.h:77
uint32 questList
Definition: GameObject.h:75
uint32 accelRate
Definition: GameObject.h:216
std::vector< std::string > CastBarCaption
Definition: GameObject.h:538
ACE_INT32 int32
Definition: Define.h:67
uint32 displayId
Definition: GameObject.h:40
uint32 floatingTooltip
Definition: GameObject.h:109
uint32 winEventID2
Definition: GameObject.h:310
time_t GetRespawnTimeEx() const
Definition: GameObject.h:701
bool IsUsedBy(uint64 guid)
Definition: GameObject.h:801
struct GameObjectInfo::@59::@65 _generic
struct GameObjectInfo::@59::@88 doNotUseYet
uint32 GetGoArtKit() const
Definition: GameObject.h:749
uint32 maxSuperiority
Definition: GameObject.h:320
void SetRespawnTime(int32 respawn)
Definition: GameObject.h:710
uint32 neutralEventID2
Definition: GameObject.h:316
bool IsDespawnAtAction() const
Definition: GameObject.h:370
uint8 getLevelForTarget(WorldObject const *target) const override
Definition: GameObject.h:839
struct GameObjectInfo::@59::@75 fishnode
uint32 focusId
Definition: GameObject.h:144
GameObjectData const * m_goData
Definition: GameObject.h:877
bool LoadFromDB(uint32 guid, Map *map)
Definition: GameObject.h:669
float orientation
Definition: GameObject.h:563
void TextEmote(const char *text, uint64 TargetGuid)
Definition: GameObject.h:639
uint32 winEventID1
Definition: GameObject.h:309
uint32 groupLootRules
Definition: GameObject.h:103
uint32 casterTargetSpell
Definition: GameObject.h:236
time_t m_cooldownTime
Definition: GameObject.h:867
uint32 auraID1
Definition: GameObject.h:331
char const * AIName
Definition: GameObject.h:366
uint32 worldstate2
Definition: GameObject.h:308
struct GameObjectInfo::@59::@89 destructibleBuilding
struct GameObjectInfo::@59::@62 button
uint32 GetRespawnDelay() const
Definition: GameObject.h:730
uint32 ritualPersistent
Definition: GameObject.h:235
uint32 closeTextID
Definition: GameObject.h:56
uint32 dmgPctState1
Definition: GameObject.h:352
uint32 pageMaterial
Definition: GameObject.h:76
char * castBarCaption
Definition: GameObject.h:42
uint32 transportPhysics
Definition: GameObject.h:219
uint32 GetGoAnimProgress() const
Definition: GameObject.h:754
uint32 neutralPercent
Definition: GameObject.h:317
struct GameObjectInfo::@59::@85 capturePoint
uint32 worldState1
Definition: GameObject.h:307
struct GameObjectInfo::@59::@87 dungeonDifficulty
time_t m_respawnTime
Definition: GameObject.h:863
ACE_UINT8 uint8
Definition: Define.h:73
uint32 spellId
Definition: GameObject.h:122
GameObjectModel * m_model
Definition: GameObject.h:880
uint32 progressEventID1
Definition: GameObject.h:313
uint32 eventId
Definition: GameObject.h:94
struct GameObjectInfo::@59::@81 flagstand
uint32 language
Definition: GameObject.h:155
void TextEmote(int32 textId, uint64 TargetGuid)
Definition: GameObject.h:655
uint32 castersGrouped
Definition: GameObject.h:238
uint32 GetCharges() const
Definition: GameObject.h:380
struct GameObjectInfo::@59::@72 areadamage
uint32 state1Name
Definition: GameObject.h:354
Definition: LootMgr.h:290
uint32 partyOnly
Definition: GameObject.h:258
uint64 m_ritualOwnerGUID
Definition: GameObject.h:871
void SetSpawnedByDefault(bool b)
Definition: GameObject.h:726
Transport const * ToTransport() const
Definition: GameObject.h:848
uint32 m_DBTableGuid
Definition: GameObject.h:875
uint32 autoCloseTime
Definition: GameObject.h:53
uint32 chestRestockTime
Definition: GameObject.h:90
uint32 casterTargetSpellTargets
Definition: GameObject.h:237
Transport * ToTransport()
Definition: GameObject.h:847
void Whisper(int32 textId, uint64 receiver)
Definition: GameObject.h:659
uint32 leaveLoot
Definition: GameObject.h:99
uint32 minTime
Definition: GameObject.h:321
uint32 creatureID
Definition: GameObject.h:250
uint32 contestedEventID2
Definition: GameObject.h:312
void Whisper(const char *text, uint64 receiver)
Definition: GameObject.h:643
uint32 GetAutoCloseTime() const
Definition: GameObject.h:391
uint32 conditionID2
Definition: GameObject.h:334
uint32 startEventID
Definition: GameObject.h:217
struct GameObjectInfo::@59::@82 fishinghole
uint32 ritualNoTargetCheck
Definition: GameObject.h:239
Definition: Map.h:266
void SetGoAnimProgress(uint32 animprogress)
Definition: GameObject.h:758
uint32 conditionID1
Definition: GameObject.h:332
std::string GetAIName() const
Definition: GameObject.h:522
std::set< uint64 > m_unique_users
Definition: GameObject.h:872
uint32 GetLockId() const
Definition: GameObject.h:430
uint32 damageSchool
Definition: GameObject.h:197
uint32 ScriptId
Definition: GameObject.h:367
GOState
Definition: GameObject.h:542
void Yell(int32 textId, uint32 language, uint64 TargetGuid)
Definition: GameObject.h:651
struct GameObjectInfo::@59::@68 spellFocus
ACE_UINT64 uint64
Definition: Define.h:70
uint32 minLevel
Definition: GameObject.h:263
uint32 stopEventID
Definition: GameObject.h:218
bool isSpawned() const
Definition: GameObject.h:716
uint32 highlight
Definition: GameObject.h:110
uint32 charges
Definition: GameObject.h:251
uint32 eventID
Definition: GameObject.h:207
bool m_spawnedByDefault
Definition: GameObject.h:866
GameobjectTypes GetGoType() const
Definition: GameObject.h:737
void SetOwnerGUID(uint64 owner)
Definition: GameObject.h:673
uint32 GetLootId() const
Definition: GameObject.h:420
uint32 state2Name
Definition: GameObject.h:355
uint32 m_spellId
Definition: GameObject.h:862
void AddUse()
Definition: GameObject.h:787
uint32 pickupSpell
Definition: GameObject.h:271
uint32 GetGossipMenuId() const
Definition: GameObject.h:497
uint32 openTextID
Definition: GameObject.h:55
void Yell(const char *text, uint32 language, uint64 TargetGuid)
Definition: GameObject.h:635
uint32 neutralEventID1
Definition: GameObject.h:315
GameObjectInfo const * GetGOInfo() const
Definition: GameObject.h:609
uint32 animprogress
Definition: GameObject.h:569
void SetSpellId(uint32 id)
Definition: GameObject.h:687
uint32 allowMounted
Definition: GameObject.h:82
uint32 animSpell
Definition: GameObject.h:234
uint32 startDelay
Definition: GameObject.h:126
uint32 floatOnWater
Definition: GameObject.h:113
uint32 large
Definition: GameObject.h:66
void AddToSkillupList(uint32 PlayerGuidLow)
Definition: GameObject.h:771
struct GameObjectInfo::@59::@79 spellcaster
uint32 flags
Definition: GameObject.h:44
std::list< uint32 > m_SkillupList
Definition: GameObject.h:869
uint32 customAnim
Definition: GameObject.h:78
uint32 startOpen
Definition: GameObject.h:51
uint32 GetUniqueUseCount() const
Definition: GameObject.h:796
uint32 GetSpellId() const
Definition: GameObject.h:692
uint32 GetDBTableGUIDLow() const
Definition: GameObject.h:624
uint32 reqParticipants
Definition: GameObject.h:232
uint32 stealthed
Definition: GameObject.h:128
uint32 lockId
Definition: GameObject.h:52
uint32 taxiPathId
Definition: GameObject.h:214
ACE_UINT32 uint32
Definition: Define.h:71
uint32 progressEventID2
Definition: GameObject.h:314
void Say(const char *text, uint32 language, uint64 TargetGuid)
Definition: GameObject.h:631
struct GameObjectInfo::@59::@90 raw
bool isSpawnedByDefault() const
Definition: GameObject.h:722
uint32 faction
Definition: GameObject.h:43
uint32 notInCombat
Definition: GameObject.h:100
true
Definition: Log.cpp:534
struct GameObjectInfo::@59::@70 goober
Definition: Unit.h:908
bool GetDespawnPossibility() const
Definition: GameObject.h:461
uint32 phaseMask
Definition: GameObject.h:557
std::vector< std::string > Name
Definition: GameObject.h:537
Definition: Player.h:923
bool IsInSkillupList(uint32 PlayerGuidLow) const
Definition: GameObject.h:775
uint32 difficulty
Definition: GameObject.h:341
uint32 losOK
Definition: GameObject.h:69
struct GameObjectInfo::@59::@67 chair
struct GameObjectInfo::@59::@78 guardpost
uint32 actionHouseID
Definition: GameObject.h:245
GOState go_state
Definition: GameObject.h:570
uint32 consumable
Definition: GameObject.h:91
uint32 noDamageImmune
Definition: GameObject.h:54
struct GameObjectInfo::@59::@84 miniGame
struct GameObjectInfo::@59::@61 door
void ClearSkillupList()
Definition: GameObject.h:781
uint32 GetUseCount() const
Definition: GameObject.h:792