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

Public Member Functions

 instance_serpentshrine_cavern_InstanceMapScript (Map *map)
 
void Initialize () override
 
bool SetBossState (uint32 type, EncounterState state) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnCreatureCreate (Creature *creature) override
 
void SetData (uint32 type, uint32) override
 
uint32 GetData (uint32 type) const 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

ObjectGuid _shieldGeneratorGUID [4]
 
int32 _aliveKeepersCount
 

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_serpentshrine_cavern_InstanceMapScript()

instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::instance_serpentshrine_cavern_InstanceMapScript ( Map map)
inline
74: InstanceScript(map) { }
Definition: InstanceScript.h:142

Member Function Documentation

◆ GetData()

uint32 instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

182 {
183 if (type == DATA_ALIVE_KEEPERS)
184 return _aliveKeepersCount;
185
186 return 0;
187 }
@ DATA_ALIVE_KEEPERS
Definition: serpent_shrine.h:40
int32 _aliveKeepersCount
Definition: instance_serpent_shrine.cpp:191

References _aliveKeepersCount, and DATA_ALIVE_KEEPERS.

◆ Initialize()

void instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

77 {
84
86 }
ObjectData const gameObjectData[]
Definition: instance_serpent_shrine.cpp:46
ObjectData const creatureData[]
Definition: instance_serpent_shrine.cpp:37
MinionData const minionData[]
Definition: instance_serpent_shrine.cpp:52
DoorData const doorData[]
Definition: instance_serpent_shrine.cpp:29
BossBoundaryData const boundaries
Definition: instance_serpent_shrine.cpp:60
@ MAX_ENCOUNTERS
Definition: deadmines.h:30
#define DataHeader
Definition: blackrock_depths.h:23
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:285
void LoadMinionData(MinionData const *data)
Definition: InstanceScript.cpp:152
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:164
void LoadBossBoundaries(BossBoundaryData const &data)
Definition: InstanceScript.cpp:134
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:141
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:176

References _aliveKeepersCount, boundaries, creatureData, DataHeader, doorData, gameObjectData, InstanceScript::LoadBossBoundaries(), InstanceScript::LoadDoorData(), InstanceScript::LoadMinionData(), InstanceScript::LoadObjectData(), MAX_ENCOUNTERS, minionData, InstanceScript::SetBossNumber(), and InstanceScript::SetHeaders().

◆ OnCreatureCreate()

void instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

117 {
118 switch (creature->GetEntry())
119 {
122 if (creature->GetPositionX() > 190.0f)
124 break;
126 creature->GetMotionMaster()->MoveRandom(50.0f);
127 break;
133 vashj->AI()->JustSummoned(creature);
134 break;
135 case NPC_SEER_OLUM:
138 break;
139 default:
140 break;
141 }
143 }
@ NPC_CYCLONE_KARATHRESS
Definition: serpent_shrine.h:52
@ NPC_ENCHANTED_ELEMENTAL
Definition: serpent_shrine.h:65
@ NPC_TAINTED_ELEMENTAL
Definition: serpent_shrine.h:68
@ NPC_COILFANG_PRIESTESS
Definition: serpent_shrine.h:63
@ NPC_COILFANG_ELITE
Definition: serpent_shrine.h:66
@ NPC_SEER_OLUM
Definition: serpent_shrine.h:60
@ NPC_COILFANG_SHATTERER
Definition: serpent_shrine.h:62
@ NPC_COILFANG_STRIDER
Definition: serpent_shrine.h:67
@ DATA_LADY_VASHJ
Definition: serpent_shrine.h:35
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:295
Definition: Creature.h:43
uint32 GetEntry() const
Definition: Object.h:115
float GetPositionX() const
Definition: Position.h:116
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:727
void OnCreatureCreate(Creature *creature) override
Definition: InstanceScript.cpp:58
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:103
void MoveRandom(float wanderDistance=0.0f)
Enable a random movement in desired range around the unit. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:242

References _aliveKeepersCount, DATA_LADY_VASHJ, InstanceScript::GetCreature(), Object::GetEntry(), Unit::GetMotionMaster(), Position::GetPositionX(), MotionMaster::MoveRandom(), NPC_COILFANG_ELITE, NPC_COILFANG_PRIESTESS, NPC_COILFANG_SHATTERER, NPC_COILFANG_STRIDER, NPC_CYCLONE_KARATHRESS, NPC_ENCHANTED_ELEMENTAL, NPC_SEER_OLUM, NPC_TAINTED_ELEMENTAL, InstanceScript::OnCreatureCreate(), Unit::RemoveNpcFlag(), UNIT_NPC_FLAG_GOSSIP, and UNIT_NPC_FLAG_QUESTGIVER.

◆ OnGameObjectCreate()

void instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

102 {
103 switch (go->GetEntry())
104 {
110 break;
111 }
112
114 }
@ GO_SHIELD_GENERATOR2
Definition: serpent_shrine.h:77
@ GO_SHIELD_GENERATOR1
Definition: serpent_shrine.h:76
@ GO_SHIELD_GENERATOR3
Definition: serpent_shrine.h:78
@ GO_SHIELD_GENERATOR4
Definition: serpent_shrine.h:79
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
void OnGameObjectCreate(GameObject *go) override
Definition: InstanceScript.cpp:73
ObjectGuid _shieldGeneratorGUID[4]
Definition: instance_serpent_shrine.cpp:190

References _shieldGeneratorGUID, Object::GetEntry(), Object::GetGUID(), GO_SHIELD_GENERATOR1, GO_SHIELD_GENERATOR2, GO_SHIELD_GENERATOR3, GO_SHIELD_GENERATOR4, and InstanceScript::OnGameObjectCreate().

◆ SetBossState()

bool instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

89 {
90 if (!InstanceScript::SetBossState(type, state))
91 return false;
92
93 if (type == DATA_LADY_VASHJ)
94 for (uint8 i = 0; i < 4; ++i)
96 gobject->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
97
98 return true;
99 }
std::uint8_t uint8
Definition: Define.h:109
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
Definition: GameObject.h:120
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:373
Map * instance
Definition: InstanceScript.h:148
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3322

References _shieldGeneratorGUID, DATA_LADY_VASHJ, Map::GetGameObject(), GO_FLAG_NOT_SELECTABLE, InstanceScript::instance, and InstanceScript::SetBossState().

Referenced by SetData().

◆ SetData()

void instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::SetData ( uint32  type,
uint32   
)
inlineoverridevirtual

Reimplemented from ZoneScript.

146 {
147 switch (type)
148 {
151 {
153 }
154 break;
157 {
159 }
160 break;
164 break;
167 {
168 for (auto const& shieldGuid : _shieldGeneratorGUID)
169 {
170 if (GameObject* gobject = instance->GetGameObject(shieldGuid))
171 {
172 gobject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
173 vashj->SummonTrigger(gobject->GetPositionX(), gobject->GetPositionY(), gobject->GetPositionZ(), 0.0f, 0);
174 }
175 }
176 }
177 break;
178 }
179 }
@ MAX_KEEPER_COUNT
Definition: serpent_shrine.h:95
@ MIN_KEEPER_COUNT
Definition: serpent_shrine.h:94
@ DATA_PLATFORM_KEEPER_RESPAWNED
Definition: serpent_shrine.h:38
@ DATA_PLATFORM_KEEPER_DIED
Definition: serpent_shrine.h:39
@ DATA_ACTIVATE_SHIELD
Definition: serpent_shrine.h:42
@ DATA_BRIDGE_EMERGED
Definition: serpent_shrine.h:34
@ DATA_BRIDGE_ACTIVATED
Definition: serpent_shrine.h:41
@ DONE
Definition: InstanceScript.h:60
@ NOT_STARTED
Definition: InstanceScript.h:57
bool SetBossState(uint32 type, EncounterState state) override
Definition: instance_serpent_shrine.cpp:88

References _aliveKeepersCount, _shieldGeneratorGUID, DATA_ACTIVATE_SHIELD, DATA_BRIDGE_ACTIVATED, DATA_BRIDGE_EMERGED, DATA_LADY_VASHJ, DATA_PLATFORM_KEEPER_DIED, DATA_PLATFORM_KEEPER_RESPAWNED, DONE, InstanceScript::GetCreature(), Map::GetGameObject(), GO_FLAG_NOT_SELECTABLE, InstanceScript::instance, MAX_KEEPER_COUNT, MIN_KEEPER_COUNT, NOT_STARTED, and SetBossState().

Member Data Documentation

◆ _aliveKeepersCount

int32 instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::_aliveKeepersCount
private

◆ _shieldGeneratorGUID

ObjectGuid instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::_shieldGeneratorGUID[4]
private