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

Public Member Functions

 instance_scholomance_InstanceMapScript (Map *map)
 
void OnCreatureCreate (Creature *cr) override
 
void OnGameObjectCreate (GameObject *go) override
 
ObjectGuid GetGuidData (uint32 type) const 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)
 

Protected Attributes

ObjectGuid GateKirtonosGUID
 
ObjectGuid GateMiliciaGUID
 
ObjectGuid GateTheolenGUID
 
ObjectGuid GatePolkeltGUID
 
ObjectGuid GateRavenianGUID
 
ObjectGuid GateBarovGUID
 
ObjectGuid GateIlluciaGUID
 
ObjectGuid BrazierKirtonosGUID
 
ObjectGuid GandlingGatesGUID [7]
 
ObjectGuid GandlingGUID
 
uint32 _kirtonosState
 
uint32 _miniBosses
 
uint32 _rasHuman
 

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 LoadSummonData (ObjectData const *data)
 
void SetSummoner (Creature *creature)
 
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_scholomance_InstanceMapScript()

instance_scholomance::instance_scholomance_InstanceMapScript::instance_scholomance_InstanceMapScript ( Map map)
inline
43 : InstanceScript(map)
44 {
45 _miniBosses = 0;
47 _rasHuman = 0;
48 }
Definition: InstanceScript.h:142
uint32 _rasHuman
Definition: instance_scholomance.cpp:245
uint32 _kirtonosState
Definition: instance_scholomance.cpp:243
uint32 _miniBosses
Definition: instance_scholomance.cpp:244

References _kirtonosState, _miniBosses, and _rasHuman.

Member Function Documentation

◆ GetData()

uint32 instance_scholomance::instance_scholomance_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

206 {
207 switch (type)
208 {
210 return _kirtonosState;
211 case DATA_MINI_BOSSES:
212 return _miniBosses;
213 case DATA_RAS_HUMAN:
214 return _rasHuman;
215 }
216 return 0;
217 }
@ DATA_MINI_BOSSES
Definition: scholomance.h:28
@ DATA_KIRTONOS_THE_HERALD
Definition: scholomance.h:27
@ DATA_RAS_HUMAN
Definition: scholomance.h:29

References _kirtonosState, _miniBosses, _rasHuman, DATA_KIRTONOS_THE_HERALD, DATA_MINI_BOSSES, and DATA_RAS_HUMAN.

◆ GetGuidData()

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

98 {
99 switch (type)
100 {
101 case GO_GATE_KIRTONOS:
102 return GateKirtonosGUID;
104 return BrazierKirtonosGUID;
106 return GandlingGatesGUID[0];
108 return GandlingGatesGUID[1];
110 return GandlingGatesGUID[2];
112 return GandlingGatesGUID[3];
114 return GandlingGatesGUID[4];
116 return GandlingGatesGUID[5];
118 return GandlingGatesGUID[6];
120 return GandlingGUID;
121 }
122 return ObjectGuid::Empty;
123 }
@ NPC_DARKMASTER_GANDLING
Definition: scholomance.h:46
@ GO_GATE_KIRTONOS
Definition: scholomance.h:53
@ GO_GATE_GANDLING_UP_SOUTH
Definition: scholomance.h:64
@ GO_GATE_GANDLING_ENTRANCE
Definition: scholomance.h:57
@ GO_GATE_GANDLING_DOWN_EAST
Definition: scholomance.h:60
@ GO_GATE_GANDLING_UP_EAST
Definition: scholomance.h:63
@ GO_GATE_GANDLING_UP_NORTH
Definition: scholomance.h:62
@ GO_BRAZIER_KIRTONOS
Definition: scholomance.h:52
@ GO_GATE_GANDLING_DOWN_SOUTH
Definition: scholomance.h:61
@ GO_GATE_GANDLING_DOWN_NORTH
Definition: scholomance.h:59
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid GandlingGUID
Definition: instance_scholomance.cpp:241
ObjectGuid GateKirtonosGUID
Definition: instance_scholomance.cpp:231
ObjectGuid BrazierKirtonosGUID
Definition: instance_scholomance.cpp:238
ObjectGuid GandlingGatesGUID[7]
Definition: instance_scholomance.cpp:240

References BrazierKirtonosGUID, ObjectGuid::Empty, GandlingGatesGUID, GandlingGUID, GateKirtonosGUID, GO_BRAZIER_KIRTONOS, GO_GATE_GANDLING_DOWN_EAST, GO_GATE_GANDLING_DOWN_NORTH, GO_GATE_GANDLING_DOWN_SOUTH, GO_GATE_GANDLING_ENTRANCE, GO_GATE_GANDLING_UP_EAST, GO_GATE_GANDLING_UP_NORTH, GO_GATE_GANDLING_UP_SOUTH, GO_GATE_KIRTONOS, and NPC_DARKMASTER_GANDLING.

Referenced by SetData().

◆ OnCreatureCreate()

void instance_scholomance::instance_scholomance_InstanceMapScript::OnCreatureCreate ( Creature cr)
inlineoverridevirtual

Reimplemented from InstanceScript.

51 {
52 switch (cr->GetEntry())
53 {
55 GandlingGUID = cr->GetGUID();
56 break;
57 }
58 }
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112

References GandlingGUID, Object::GetEntry(), Object::GetGUID(), and NPC_DARKMASTER_GANDLING.

◆ OnGameObjectCreate()

void instance_scholomance::instance_scholomance_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

◆ ReadSaveDataMore()

void instance_scholomance::instance_scholomance_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

220 {
221 data >> _kirtonosState;
222 data >> _miniBosses;
223 }

References _kirtonosState, and _miniBosses.

◆ SetData()

void instance_scholomance::instance_scholomance_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

126 {
127 switch (type)
128 {
130 switch (data)
131 {
132 case IN_PROGRESS:
133 // summon kirtonos and close door
135 {
137 {
138 kirtonos->AI()->DoAction(IN_PROGRESS);
139 }
141 {
142 gate->SetGoState(GO_STATE_READY);
143 }
144 }
145 _kirtonosState = data;
146 break;
147 case FAIL:
148 // open door and reset brazier
150 {
151 gate->SetGoState(GO_STATE_ACTIVE);
152 }
153
155 {
156 brazier->SetGoState(GO_STATE_READY);
157 brazier->SetLootState(GO_JUST_DEACTIVATED);
158 brazier->Respawn();
159 }
161 break;
162 case DONE:
163 // open door
165 {
166 gate->SetGoState(GO_STATE_ACTIVE);
167 }
168 [[fallthrough]];
169 default:
170 _kirtonosState = data;
171 break;
172 }
173 break;
174 case DATA_MINI_BOSSES:
175 ++_miniBosses;
176 if (_miniBosses == 6)
177 {
178 if (Creature* Gandling = instance->GetCreature(GandlingGUID))
179 {
180 Gandling->AI()->Talk(0);
181 Gandling->AI()->Reset();
182 }
183 }
184 break;
186 switch (data)
187 {
188 case DONE:
189 case NOT_STARTED:
190 case FAIL:
192 break;
193 case IN_PROGRESS:
195 break;
196 }
197 break;
198 case DATA_RAS_HUMAN:
199 _rasHuman = data;
200 break;
201 }
202 SaveToDB();
203 }
@ NPC_KIRTONOS
Definition: scholomance.h:47
@ DATA_DARKMASTER_GANDLING
Definition: scholomance.h:30
Position KirtonosSpawn
Definition: instance_scholomance.cpp:29
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ FAIL
Definition: InstanceScript.h:59
@ DONE
Definition: InstanceScript.h:60
@ NOT_STARTED
Definition: InstanceScript.h:57
@ GO_JUST_DEACTIVATED
Definition: GameObject.h:113
@ GO_STATE_READY
Definition: GameObjectData.h:690
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:689
Definition: Creature.h:43
Definition: GameObject.h:120
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:113
Map * instance
Definition: InstanceScript.h:148
void SaveToDB()
Definition: InstanceScript.cpp:41
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3322
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3317
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, bool visibleBySummonerOnly=false)
Definition: Object.cpp:2174
ObjectGuid GetGuidData(uint32 type) const override
Definition: instance_scholomance.cpp:97

References _kirtonosState, _miniBosses, _rasHuman, DATA_DARKMASTER_GANDLING, DATA_KIRTONOS_THE_HERALD, DATA_MINI_BOSSES, DATA_RAS_HUMAN, DONE, FAIL, GandlingGatesGUID, GandlingGUID, Map::GetCreature(), Map::GetGameObject(), GetGuidData(), GO_BRAZIER_KIRTONOS, GO_GATE_KIRTONOS, GO_JUST_DEACTIVATED, GO_STATE_ACTIVE, GO_STATE_READY, InstanceScript::HandleGameObject(), IN_PROGRESS, InstanceScript::instance, KirtonosSpawn, NOT_STARTED, NPC_KIRTONOS, InstanceScript::SaveToDB(), and Map::SummonCreature().

◆ WriteSaveDataMore()

void instance_scholomance::instance_scholomance_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

226 {
227 data << _kirtonosState << ' ' << _miniBosses;
228 }

References _kirtonosState, and _miniBosses.

Member Data Documentation

◆ _kirtonosState

uint32 instance_scholomance::instance_scholomance_InstanceMapScript::_kirtonosState
protected

◆ _miniBosses

uint32 instance_scholomance::instance_scholomance_InstanceMapScript::_miniBosses
protected

◆ _rasHuman

uint32 instance_scholomance::instance_scholomance_InstanceMapScript::_rasHuman
protected

◆ BrazierKirtonosGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::BrazierKirtonosGUID
protected

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GandlingGatesGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GandlingGatesGUID[7]
protected

◆ GandlingGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GandlingGUID
protected

◆ GateBarovGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GateBarovGUID
protected

◆ GateIlluciaGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GateIlluciaGUID
protected

◆ GateKirtonosGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GateKirtonosGUID
protected

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GateMiliciaGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GateMiliciaGUID
protected

◆ GatePolkeltGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GatePolkeltGUID
protected

◆ GateRavenianGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GateRavenianGUID
protected

◆ GateTheolenGUID

ObjectGuid instance_scholomance::instance_scholomance_InstanceMapScript::GateTheolenGUID
protected