TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
instance_gnomeregan::instance_gnomeregan_InstanceMapScript Struct Reference

Public Member Functions

 instance_gnomeregan_InstanceMapScript (Map *map)
 
void Load (const char *in) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void SetData (uint32 uiType, uint32 uiData) override
 
uint32 GetData (uint32 uiType) const override
 
ObjectGuid GetGuidData (uint32 uiType) const override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual void Update (uint32)
 
virtual bool IsEncounterInProgress () const
 
virtual void OnCreatureRemove (Creature *creature) override
 
virtual void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
virtual void OnPlayerEnter (Player *)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoCloseDoorOrButton (ObjectGuid guid)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=NULL)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
bool ServerAllowsTwoSideGroups ()
 
virtual bool SetBossState (uint32 id, EncounterState state)
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary constGetBossBoundary (uint32 id) const
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source)
 
void SetCompletedEncountersMask (uint32 newMask)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=NULL, uint8 param1=0, uint8 param2=0)
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
void UpdatePhasing ()
 
uint32 GetEncounterCount () const
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnUnitDeath (Unit *)
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Public Attributes

uint32 m_auiEncounter [MAX_ENCOUNTER]
 
ObjectGuid uiCaveInLeftGUID
 
ObjectGuid uiCaveInRightGUID
 
ObjectGuid uiBastmasterEmiShortfuseGUID
 
- Public Attributes inherited from InstanceScript
Mapinstance
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Protected Member Functions inherited from InstanceScript
void SetHeaders (std::string const &dataHeaders)
 
void SetBossNumber (uint32 number)
 
void LoadBossBoundaries (BossBoundaryData const &data)
 
void LoadDoorData (DoorData const *data)
 
void LoadMinionData (MinionData const *data)
 
void LoadObjectData (ObjectData const *creatureData, ObjectData const *gameObjectData)
 
void AddObject (Creature *obj, bool add)
 
void AddObject (GameObject *obj, bool add)
 
void AddObject (WorldObject *obj, uint32 type, bool add)
 
virtual void AddDoor (GameObject *door, bool add)
 
void AddMinion (Creature *minion, bool add)
 
virtual void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
BossInfoGetBossInfo (uint32 id)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
virtual void ReadSaveDataMore (std::istringstream &)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
virtual void WriteSaveDataMore (std::ostringstream &)
 
bool _SkipCheckRequiredBosses (Player const *player=nullptr) const
 

Constructor & Destructor Documentation

instance_gnomeregan::instance_gnomeregan_InstanceMapScript::instance_gnomeregan_InstanceMapScript ( Map map)
inline
37  : InstanceScript(map)
38  {
40  memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
41  }
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_gnomeregan.cpp:43
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
InstanceScript(Map *map)
Definition: InstanceScript.h:144

+ Here is the call graph for this function:

Member Function Documentation

uint32 instance_gnomeregan::instance_gnomeregan_InstanceMapScript::GetData ( uint32  uiType) const
inlineoverridevirtual

Reimplemented from ZoneScript.

110  {
111  switch (uiType)
112  {
113  case TYPE_EVENT: return m_auiEncounter[0];
114  }
115  return 0;
116  }
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_gnomeregan.cpp:43
Definition: gnomeregan.h:40
ObjectGuid instance_gnomeregan::instance_gnomeregan_InstanceMapScript::GetGuidData ( uint32  uiType) const
inlineoverridevirtual

Reimplemented from InstanceScript.

119  {
120  switch (uiType)
121  {
125  }
126 
127  return ObjectGuid::Empty;
128  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
ObjectGuid uiBastmasterEmiShortfuseGUID
Definition: instance_gnomeregan.cpp:48
ObjectGuid uiCaveInRightGUID
Definition: instance_gnomeregan.cpp:46
ObjectGuid uiCaveInLeftGUID
Definition: instance_gnomeregan.cpp:45
Definition: gnomeregan.h:46
Definition: gnomeregan.h:47
Definition: gnomeregan.h:45
void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::Load ( const char *  in)
inlineoverridevirtual

Reimplemented from InstanceScript.

51  {
52  if (!in)
53  {
55  return;
56  }
57 
59 
60  std::istringstream loadStream(in);
61  loadStream >> m_auiEncounter[0];
62 
63  for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
64  {
65  if (m_auiEncounter[i] == IN_PROGRESS)
66  m_auiEncounter[i] = NOT_STARTED;
67  }
68 
70  }
#define OUT_LOAD_INST_DATA_FAIL
Definition: InstanceScript.h:33
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_gnomeregan.cpp:43
#define OUT_LOAD_INST_DATA_COMPLETE
Definition: InstanceScript.h:32
Definition: InstanceScript.h:59
Definition: InstanceScript.h:58
#define MAX_ENCOUNTER
Definition: instance_gnomeregan.cpp:23
uint8_t uint8
Definition: Define.h:152
#define OUT_LOAD_INST_DATA(a)
Definition: InstanceScript.h:31
void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

73  {
74  switch (creature->GetEntry())
75  {
77  }
78  }
ObjectGuid uiBastmasterEmiShortfuseGUID
Definition: instance_gnomeregan.cpp:48
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: gnomeregan.h:32
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

81  {
82  switch (go->GetEntry())
83  {
84  case GO_CAVE_IN_LEFT:
85  uiCaveInLeftGUID = go->GetGUID();
86  if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
88  break;
89  case GO_CAVE_IN_RIGHT:
90  uiCaveInRightGUID = go->GetGUID();
91  if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
93  break;
94  }
95  }
Definition: gnomeregan.h:25
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: inflate.h:49
ObjectGuid uiCaveInRightGUID
Definition: instance_gnomeregan.cpp:46
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_gnomeregan.cpp:43
ObjectGuid uiCaveInLeftGUID
Definition: instance_gnomeregan.cpp:45
Definition: InstanceScript.h:58
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
Definition: gnomeregan.h:26

+ Here is the call graph for this function:

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::SetData ( uint32  uiType,
uint32  uiData 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

98  {
99  switch (uiType)
100  {
101  case TYPE_EVENT:
102  m_auiEncounter[0] = uiData;
103  if (uiData == DONE)
104  SaveToDB();
105  break;
106  }
107  }
Definition: inflate.h:49
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_gnomeregan.cpp:43
void SaveToDB()
Definition: InstanceScript.cpp:39
Definition: gnomeregan.h:40

+ Here is the call graph for this function:

Member Data Documentation

uint32 instance_gnomeregan::instance_gnomeregan_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]
ObjectGuid instance_gnomeregan::instance_gnomeregan_InstanceMapScript::uiBastmasterEmiShortfuseGUID
ObjectGuid instance_gnomeregan::instance_gnomeregan_InstanceMapScript::uiCaveInLeftGUID
ObjectGuid instance_gnomeregan::instance_gnomeregan_InstanceMapScript::uiCaveInRightGUID

The documentation for this struct was generated from the following file: