AzerothCore 3.3.5a
OpenSource WoW Emulator
No Matches
instance_gnomeregan::instance_gnomeregan_InstanceMapScript Struct Reference
Inheritance diagram for instance_gnomeregan::instance_gnomeregan_InstanceMapScript:
InstanceScript ZoneScript

Public Member Functions

 instance_gnomeregan_InstanceMapScript (Map *map)
void OnCreatureCreate (Creature *creature) override
void OnGameObjectCreate (GameObject *gameobject) override
void SetData (uint32 type, uint32 data) override
void ReadSaveDataMore (std::istringstream &data) override
void WriteSaveDataMore (std::ostringstream &data) override
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 ~InstanceScript () override
virtual void Initialize ()
virtual void Load (char const *data)
virtual void CreatureLooted (Creature *, LootType)
virtual std::string GetSaveData ()
void SaveToDB ()
virtual void Update (uint32)
virtual bool IsEncounterInProgress () const
void OnCreatureCreate (Creature *creature) override
void OnCreatureRemove (Creature *creature) override
void OnGameObjectCreate (GameObject *go) override
void OnGameObjectRemove (GameObject *go) override
ObjectGuid GetObjectGuid (uint32 type) const
ObjectGuid GetGuidData (uint32 type) const override
CreatureGetCreature (uint32 type)
GameObjectGetGameObject (uint32 type)
virtual void OnPlayerEnter (Player *)
virtual void OnPlayerAreaUpdate (Player *, uint32, uint32)
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
void DoRespawnCreature (ObjectGuid guid, bool force=false)
void DoRespawnCreature (uint32 type, bool force=false)
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
void DoSendNotifyToInstance (char const *format,...)
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
void DoCastSpellOnPlayers (uint32 spell)
void DoCastSpellOnPlayer (Player *player, uint32 spell, bool includePets, bool includeControlled)
bool ServerAllowsTwoSideGroups ()
virtual bool SetBossState (uint32 id, EncounterState state)
EncounterState GetBossState (uint32 id) const
CreatureBoundary const * GetBossBoundary (uint32 id) const
BossInfo const * GetBossInfo (uint32 id) const
uint32 GetPersistentData (uint32 index) const
void StorePersistentData (uint32 index, uint32 data)
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=nullptr, uint32=0)
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
void SetCompletedEncountersMask (uint32 newMask, bool save)
uint32 GetCompletedEncounterMask () const
void SendEncounterUnit (uint32 type, Unit *unit=nullptr, uint8 param1=0, uint8 param2=0)
virtual void FillInitialWorldStates (WorldPacket &)
uint32 GetEncounterCount () const
void MarkAreaTriggerDone (uint32 id)
void ResetAreaTriggerDone (uint32 id)
bool IsAreaTriggerDone (uint32 id) const
virtual void DoAction (int32)
- 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 OnCreatureCreate (Creature *)
virtual void OnCreatureRemove (Creature *)
virtual void OnGameObjectCreate (GameObject *)
virtual void OnGameObjectRemove (GameObject *)
virtual void OnUnitDeath (Unit *)
virtual void OnCreatureEvade (Creature *)
virtual ObjectGuid GetGuidData (uint32) const
virtual void SetGuidData (uint32, ObjectGuid)
virtual uint64 GetData64 (uint32) const
virtual void SetData64 (uint32, uint64)
virtual uint32 GetData (uint32) const
virtual void SetData (uint32, uint32)
virtual void ProcessEvent (WorldObject *, uint32)

Private Attributes

uint32 _encounters [MAX_ENCOUNTERS]

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
- Public Attributes inherited from InstanceScript
- Protected Member Functions inherited from InstanceScript
void SetHeaders (std::string const &dataHeaders)
void SetBossNumber (uint32 number)
void SetPersistentDataCount (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)
void AddDoor (GameObject *door, bool add)
void AddMinion (Creature *minion, bool add)
void UpdateDoorState (GameObject *door)
void UpdateMinionState (Creature *minion, EncounterState state)
bool ReadSaveDataHeaders (std::istringstream &data)
void ReadSaveDataBossStates (std::istringstream &data)
void ReadSavePersistentData (std::istringstream &data)
virtual void ReadSaveDataMore (std::istringstream &)
void WriteSaveDataHeaders (std::ostringstream &data)
void WriteSaveDataBossStates (std::ostringstream &data)
void WritePersistentData (std::ostringstream &data)
virtual void WriteSaveDataMore (std::ostringstream &)

Detailed Description

Constructor & Destructor Documentation

◆ instance_gnomeregan_InstanceMapScript()

instance_gnomeregan::instance_gnomeregan_InstanceMapScript::instance_gnomeregan_InstanceMapScript ( Map map)
37 : InstanceScript(map)
38 {
40 }
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:140
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:137

References DataHeader, and InstanceScript::SetHeaders().

Member Function Documentation

◆ OnCreatureCreate()

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::OnCreatureCreate ( Creature creature)

Reimplemented from InstanceScript.

43 {
44 switch (creature->GetEntry())
45 {
48 {
49 creature->DespawnOrUnsummon();
50 }
51 break;
52 }
53 }
Definition: InstanceScript.h:59
Definition: gnomeregan.h:49
Definition: gnomeregan.h:35
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2108
uint32 GetEntry() const
Definition: Object.h:109
uint32 _encounters[MAX_ENCOUNTERS]
Definition: instance_gnomeregan.cpp:92

References _encounters, Creature::DespawnOrUnsummon(), DONE, Object::GetEntry(), NPC_EMI_SHORTFUSE, and TYPE_GRUBBIS.

◆ OnGameObjectCreate()

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::OnGameObjectCreate ( GameObject gameobject)

Reimplemented from InstanceScript.

56 {
57 switch (gameobject->GetEntry())
58 {
59 case GO_CAVE_IN_1:
60 case GO_CAVE_IN_2:
63 gameobject->UpdateSaveToDb(true);
64 break;
65 }
66 }
Definition: gnomeregan.h:43
Definition: gnomeregan.h:41
Definition: gnomeregan.h:44
Definition: gnomeregan.h:42
void UpdateSaveToDb(bool enable)
Definition: GameObject.cpp:2575

References Object::GetEntry(), GO_CAVE_IN_1, GO_CAVE_IN_2, GO_FINAL_CHAMBER_DOOR, GO_WORKSHOP_DOOR, and GameObject::UpdateSaveToDb().

◆ ReadSaveDataMore()

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)

Reimplemented from InstanceScript.

82 {
84 }

References _encounters, and TYPE_GRUBBIS.

◆ SetData()

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::SetData ( uint32  type,
uint32  data 

Reimplemented from ZoneScript.

69 {
70 switch (type)
71 {
73 _encounters[type] = data;
74 break;
75 }
77 if (data == DONE)
78 SaveToDB();
79 }
void SaveToDB()
Definition: InstanceScript.cpp:41

References _encounters, DONE, InstanceScript::SaveToDB(), and TYPE_GRUBBIS.

◆ WriteSaveDataMore()

void instance_gnomeregan::instance_gnomeregan_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)

Reimplemented from InstanceScript.

87 {
89 }

References _encounters, and TYPE_GRUBBIS.

Member Data Documentation

◆ _encounters

uint32 instance_gnomeregan::instance_gnomeregan_InstanceMapScript::_encounters[MAX_ENCOUNTERS]