AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
instance_dire_maul::instance_dire_maul_InstanceMapScript Struct Reference
Inheritance diagram for instance_dire_maul::instance_dire_maul_InstanceMapScript:
InstanceScript ZoneScript

Public Member Functions

 instance_dire_maul_InstanceMapScript (Map *map)
 
void Initialize () override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *gameobject) override
 
void SetData (uint32 type, uint32 data) override
 
uint32 GetData (uint32 type) const 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)
 
virtual void OnPlayerInWaterStateUpdate (Player *, bool)
 
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)
 
void DoForAllMinions (uint32 id, std::function< void(Creature *)> exec)
 
void StoreGameObjectState (ObjectGuid::LowType spawnId, uint8 state)
 
uint8 GetStoredGameObjectState (ObjectGuid::LowType spawnId) const
 
void LoadInstanceSavedGameobjectStateData ()
 
bool IsBossDone (uint32 bossId) const
 
bool AllBossesDone () const
 
bool AllBossesDone (std::initializer_list< uint32 > bossIds) 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 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 _eastWingProgress
 
uint32 _westWingProgress
 
uint32 _pylonsState
 
uint32 _northWingProgress
 
uint32 _northWingBosses
 
ObjectGuid _immoltharGUID
 
std::vector< ObjectGuidHighborneSummoners
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 
- 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=true)
 
void RemoveObject (Creature *obj)
 
void AddObject (GameObject *obj, bool add=true)
 
void RemoveObject (GameObject *obj)
 
void AddObject (WorldObject *obj, uint32 type, bool add=true)
 
void RemoveObject (WorldObject *obj, uint32 type)
 
void AddDoor (GameObject *door, bool add=true)
 
void RemoveDoor (GameObject *door)
 
void AddMinion (Creature *minion, bool add=true)
 
void RemoveMinion (Creature *minion)
 
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_dire_maul_InstanceMapScript()

instance_dire_maul::instance_dire_maul_InstanceMapScript::instance_dire_maul_InstanceMapScript ( Map map)
inline
30: InstanceScript(map) { }
Definition: InstanceScript.h:142

Member Function Documentation

◆ GetData()

uint32 instance_dire_maul::instance_dire_maul_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

138 {
139 if (type == TYPE_EAST_WING_PROGRESS)
140 return _eastWingProgress;
141 else if (type == TYPE_WEST_WING_PROGRESS)
142 return _westWingProgress;
143 else if (type == TYPE_NORTH_WING_PROGRESS)
144 return _northWingProgress;
145
146 return 0;
147 }
@ TYPE_NORTH_WING_PROGRESS
Definition: dire_maul.h:32
@ TYPE_EAST_WING_PROGRESS
Definition: dire_maul.h:29
@ TYPE_WEST_WING_PROGRESS
Definition: dire_maul.h:30
uint32 _northWingProgress
Definition: instance_dire_maul.cpp:171
uint32 _eastWingProgress
Definition: instance_dire_maul.cpp:168
uint32 _westWingProgress
Definition: instance_dire_maul.cpp:169

References _eastWingProgress, _northWingProgress, _westWingProgress, TYPE_EAST_WING_PROGRESS, TYPE_NORTH_WING_PROGRESS, and TYPE_WEST_WING_PROGRESS.

◆ Initialize()

void instance_dire_maul::instance_dire_maul_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

33 {
37 _pylonsState = 0;
40 HighborneSummoners.clear();
41 }
#define DataHeader
Definition: blackrock_depths.h:23
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138
uint32 _pylonsState
Definition: instance_dire_maul.cpp:170
uint32 _northWingBosses
Definition: instance_dire_maul.cpp:172
std::vector< ObjectGuid > HighborneSummoners
Definition: instance_dire_maul.cpp:175

References _eastWingProgress, _northWingBosses, _northWingProgress, _pylonsState, _westWingProgress, DataHeader, HighborneSummoners, and InstanceScript::SetHeaders().

◆ OnCreatureCreate()

void instance_dire_maul::instance_dire_maul_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

44 {
45 switch (creature->GetEntry())
46 {
47 case NPC_IMMOL_THAR:
48 _immoltharGUID = creature->GetGUID();
50 {
52 }
53 else
54 {
56 }
57 break;
60 {
61 creature->DespawnOrUnsummon(5000);
62 }
63 else
64 {
66 }
67 HighborneSummoners.push_back(creature->GetGUID());
68 break;
69 }
70 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ NPC_IMMOL_THAR
Definition: dire_maul.h:47
@ NPC_HIGHBORNE_SUMMONER
Definition: dire_maul.h:48
@ ALL_PYLONS_OFF
Definition: dire_maul.h:36
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:683
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:684
ObjectGuid _immoltharGUID
Definition: instance_dire_maul.cpp:174

References _immoltharGUID, _pylonsState, ALL_PYLONS_OFF, Creature::DespawnOrUnsummon(), Object::GetEntry(), Object::GetGUID(), HighborneSummoners, NPC_HIGHBORNE_SUMMONER, NPC_IMMOL_THAR, Unit::RemoveUnitFlag(), Unit::SetUnitFlag(), and UNIT_FLAG_NON_ATTACKABLE.

◆ OnGameObjectCreate()

void instance_dire_maul::instance_dire_maul_InstanceMapScript::OnGameObjectCreate ( GameObject gameobject)
inlineoverridevirtual

Reimplemented from InstanceScript.

73 {
74 switch (gameobject->GetEntry())
75 {
78 gameobject->SetGoState(GO_STATE_ACTIVE);
79 break;
81 {
82 uint32 fullLootMode = 0x3F;
83 for (uint32 i = 0; i < _northWingBosses; ++i)
84 fullLootMode >>= 1;
85
86 gameobject->SetLootMode(fullLootMode);
87 break;
88 }
89 }
90 }
std::uint32_t uint32
Definition: Define.h:107
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ GO_GORDOK_TRIBUTE
Definition: dire_maul.h:42
@ GO_DIRE_MAUL_FORCE_FIELD
Definition: dire_maul.h:41
void SetGoState(GOState state)
Definition: GameObject.cpp:2477
void SetLootMode(uint16 lootMode)
Definition: GameObject.h:231

References _northWingBosses, _pylonsState, ALL_PYLONS_OFF, Object::GetEntry(), GO_DIRE_MAUL_FORCE_FIELD, GO_GORDOK_TRIBUTE, GO_STATE_ACTIVE, GameObject::SetGoState(), and GameObject::SetLootMode().

◆ ReadSaveDataMore()

void instance_dire_maul::instance_dire_maul_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

150 {
151 data >> _eastWingProgress;
152 data >> _westWingProgress;
153 data >> _pylonsState;
154 data >> _northWingProgress;
155 data >> _northWingBosses;
156 }

References _eastWingProgress, _northWingBosses, _northWingProgress, _pylonsState, and _westWingProgress.

◆ SetData()

void instance_dire_maul::instance_dire_maul_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

93 {
94 switch (type)
95 {
97 _eastWingProgress = data;
98 instance->LoadGrid(-56.59f, -269.12f);
99 break;
101 _westWingProgress = data;
102 instance->LoadGrid(132.626f, 625.913f);
103 break;
105 _northWingProgress = data;
106 break;
109 break;
111 if (_pylonsState & data)
112 return;
113 _pylonsState |= data;
114 if (_pylonsState == ALL_PYLONS_OFF) // all five active, 31
115 {
116 instance->LoadGrid(-38.08f, 812.44f);
118 {
119 immol->setActive(true);
120 immol->GetAI()->SetData(1, 1);
121 immol->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
122 }
123 for (auto const& guid : HighborneSummoners)
124 {
125 if (Creature* summoner = instance->GetCreature(guid))
126 {
127 summoner->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
128 }
129 }
130 }
131 break;
132 }
133
134 SaveToDB();
135 }
@ TYPE_PYLONS_STATE
Definition: dire_maul.h:31
@ TYPE_NORTH_WING_BOSSES
Definition: dire_maul.h:33
Definition: Creature.h:46
Map * instance
Definition: InstanceScript.h:148
void SaveToDB()
Definition: InstanceScript.cpp:41
void LoadGrid(float x, float y)
Definition: Map.cpp:492
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314

References _eastWingProgress, _immoltharGUID, _northWingBosses, _northWingProgress, _pylonsState, _westWingProgress, ALL_PYLONS_OFF, Map::GetCreature(), HighborneSummoners, InstanceScript::instance, Map::LoadGrid(), InstanceScript::SaveToDB(), TYPE_EAST_WING_PROGRESS, TYPE_NORTH_WING_BOSSES, TYPE_NORTH_WING_PROGRESS, TYPE_PYLONS_STATE, TYPE_WEST_WING_PROGRESS, and UNIT_FLAG_NON_ATTACKABLE.

◆ WriteSaveDataMore()

void instance_dire_maul::instance_dire_maul_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

159 {
160 data << _eastWingProgress << ' '
161 << _westWingProgress << ' '
162 << _pylonsState << ' '
163 << _northWingProgress << ' '
165 }

References _eastWingProgress, _northWingBosses, _northWingProgress, _pylonsState, and _westWingProgress.

Member Data Documentation

◆ _eastWingProgress

uint32 instance_dire_maul::instance_dire_maul_InstanceMapScript::_eastWingProgress
private

◆ _immoltharGUID

ObjectGuid instance_dire_maul::instance_dire_maul_InstanceMapScript::_immoltharGUID
private

Referenced by OnCreatureCreate(), and SetData().

◆ _northWingBosses

uint32 instance_dire_maul::instance_dire_maul_InstanceMapScript::_northWingBosses
private

◆ _northWingProgress

uint32 instance_dire_maul::instance_dire_maul_InstanceMapScript::_northWingProgress
private

◆ _pylonsState

uint32 instance_dire_maul::instance_dire_maul_InstanceMapScript::_pylonsState
private

◆ _westWingProgress

uint32 instance_dire_maul::instance_dire_maul_InstanceMapScript::_westWingProgress
private

◆ HighborneSummoners

std::vector<ObjectGuid> instance_dire_maul::instance_dire_maul_InstanceMapScript::HighborneSummoners
private