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

Public Member Functions

 instance_violet_hold_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
bool IsEncounterInProgress () const override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void SetData (uint32 type, uint32 data) override
 
void SetGuidData (uint32 type, ObjectGuid data) override
 
uint32 GetData (uint32 type) const override
 
ObjectGuid GetGuidData (uint32 identifier) const override
 
void StartBossEncounter (uint8 uiBoss)
 
void Update (uint32 diff) override
 
void OnPlayerEnter (Player *plr) override
 
bool DoNeedCleanup (bool enter)
 
void InstanceCleanup ()
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *, Unit const *, uint32) 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)
 

Public Attributes

uint32 m_auiEncounter [MAX_ENCOUNTER]
 
bool CLEANED
 
uint8 EncounterStatus
 
uint32 uiFirstBoss
 
uint32 uiSecondBoss
 
std::string str_data
 
EventMap events
 
uint8 GateHealth
 
uint8 WaveCount
 
uint8 PortalLocation
 
bool bAchiev
 
bool bDefensesUsed
 
GuidVector GO_ActivationCrystalGUID
 
ObjectGuid GO_MainGateGUID
 
ObjectGuid GO_MoraggCellGUID
 
ObjectGuid GO_ErekemCellGUID
 
ObjectGuid GO_ErekemRightGuardCellGUID
 
ObjectGuid GO_ErekemLeftGuardCellGUID
 
ObjectGuid GO_IchoronCellGUID
 
ObjectGuid GO_LavanthorCellGUID
 
ObjectGuid GO_XevozzCellGUID
 
ObjectGuid GO_ZuramatCellGUID
 
GuidSet trashMobs
 
ObjectGuid NPC_SinclariGUID
 
ObjectGuid NPC_GuardGUID [4]
 
ObjectGuid NPC_PortalGUID
 
ObjectGuid NPC_DoorSealGUID
 
ObjectGuid NPC_MoraggGUID
 
ObjectGuid NPC_ErekemGUID
 
ObjectGuid NPC_ErekemGuardGUID [2]
 
ObjectGuid NPC_IchoronGUID
 
ObjectGuid NPC_LavanthorGUID
 
ObjectGuid NPC_XevozzGUID
 
ObjectGuid NPC_ZuramatGUID
 
ObjectGuid NPC_CyanigosaGUID
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 

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

instance_violet_hold::instance_violet_hold_InstanceMapScript::instance_violet_hold_InstanceMapScript ( Map pMap)
inline
44: InstanceScript(pMap) {}
Definition: InstanceScript.h:142

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_violet_hold::instance_violet_hold_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

640 {
641 switch (criteria_id)
642 {
644 return GateHealth == 100 && !bDefensesUsed;
647 return bAchiev;
648 }
649 return false;
650 }
@ CRITERIA_DEFENSELESS
Definition: violet_hold.h:156
@ CRITERIA_DEHYDRATION
Definition: violet_hold.h:158
@ CRITERIA_A_VOID_DANCE
Definition: violet_hold.h:157
bool bAchiev
Definition: instance_violet_hold.cpp:55
uint8 GateHealth
Definition: instance_violet_hold.cpp:52
bool bDefensesUsed
Definition: instance_violet_hold.cpp:56

References bAchiev, bDefensesUsed, CRITERIA_A_VOID_DANCE, CRITERIA_DEFENSELESS, CRITERIA_DEHYDRATION, and GateHealth.

◆ DoNeedCleanup()

bool instance_violet_hold::instance_violet_hold_InstanceMapScript::DoNeedCleanup ( bool  enter)
inline
541 {
542 uint8 aliveCount = 0;
543 Map::PlayerList const& pl = instance->GetPlayers();
544 for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
545 if (Player* plr = itr->GetSource())
546 if (plr->IsAlive() && !plr->IsGameMaster() && !plr->HasAura(27827)/*spirit of redemption aura*/ )
547 ++aliveCount;
548
549 bool need = enter ? aliveCount <= 1 : aliveCount == 0;
550 if (!need && CLEANED)
551 CLEANED = false;
552 return need;
553 }
std::uint8_t uint8
Definition: Define.h:109
Definition: LinkedList.h:139
Definition: Player.h:1081
Map * instance
Definition: InstanceScript.h:148
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
bool CLEANED
Definition: instance_violet_hold.cpp:47

References MapRefMgr::begin(), CLEANED, MapRefMgr::end(), Map::GetPlayers(), and InstanceScript::instance.

Referenced by OnPlayerEnter(), and Update().

◆ GetData()

uint32 instance_violet_hold::instance_violet_hold_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

293 {
294 switch (type)
295 {
297 return (uint32)EncounterStatus;
298 case DATA_WAVE_COUNT:
299 return (uint32)WaveCount;
301 return PortalLocation;
303 return uiFirstBoss;
305 return uiSecondBoss;
306 }
307
308 return 0;
309 }
std::uint32_t uint32
Definition: Define.h:107
@ DATA_ENCOUNTER_STATUS
Definition: eye_of_eternity.h:57
@ DATA_FIRST_BOSS_NUMBER
Definition: violet_hold.h:141
@ DATA_WAVE_COUNT
Definition: violet_hold.h:137
@ DATA_SECOND_BOSS_NUMBER
Definition: violet_hold.h:142
@ DATA_PORTAL_LOCATION
Definition: violet_hold.h:138
uint8 WaveCount
Definition: instance_violet_hold.cpp:53
uint8 PortalLocation
Definition: instance_violet_hold.cpp:54
uint32 uiSecondBoss
Definition: instance_violet_hold.cpp:49
uint8 EncounterStatus
Definition: instance_violet_hold.cpp:48
uint32 uiFirstBoss
Definition: instance_violet_hold.cpp:49

References DATA_ENCOUNTER_STATUS, DATA_FIRST_BOSS_NUMBER, DATA_PORTAL_LOCATION, DATA_SECOND_BOSS_NUMBER, DATA_WAVE_COUNT, EncounterStatus, PortalLocation, uiFirstBoss, uiSecondBoss, and WaveCount.

Referenced by Update().

◆ GetGuidData()

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GetGuidData ( uint32  identifier) const
inlineoverridevirtual

Reimplemented from InstanceScript.

312 {
313 switch (identifier)
314 {
316 return NPC_PortalGUID;
318 return NPC_DoorSealGUID;
319 case DATA_EREKEM_GUID:
320 return NPC_ErekemGUID;
322 return NPC_ErekemGuardGUID[0];
324 return NPC_ErekemGuardGUID[1];
326 return NPC_IchoronGUID;
327 }
328
329 return ObjectGuid::Empty;
330 }
@ DATA_TELEPORTATION_PORTAL_GUID
Definition: violet_hold.h:139
@ DATA_DOOR_SEAL_GUID
Definition: violet_hold.h:140
@ DATA_ICHORON_GUID
Definition: violet_hold.h:150
@ DATA_EREKEM_GUARD_2_GUID
Definition: violet_hold.h:149
@ DATA_EREKEM_GUARD_1_GUID
Definition: violet_hold.h:148
@ DATA_EREKEM_GUID
Definition: violet_hold.h:147
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid NPC_PortalGUID
Definition: instance_violet_hold.cpp:73
ObjectGuid NPC_IchoronGUID
Definition: instance_violet_hold.cpp:79
ObjectGuid NPC_ErekemGuardGUID[2]
Definition: instance_violet_hold.cpp:78
ObjectGuid NPC_DoorSealGUID
Definition: instance_violet_hold.cpp:74
ObjectGuid NPC_ErekemGUID
Definition: instance_violet_hold.cpp:77

References DATA_DOOR_SEAL_GUID, DATA_EREKEM_GUARD_1_GUID, DATA_EREKEM_GUARD_2_GUID, DATA_EREKEM_GUID, DATA_ICHORON_GUID, DATA_TELEPORTATION_PORTAL_GUID, ObjectGuid::Empty, NPC_DoorSealGUID, NPC_ErekemGuardGUID, NPC_ErekemGUID, NPC_IchoronGUID, and NPC_PortalGUID.

◆ Initialize()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

86 {
88 memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
89 CLEANED = false;
91 uiFirstBoss = 0;
92 uiSecondBoss = 0;
93 events.Reset();
94 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
95 GateHealth = 100;
96 WaveCount = 0;
98 bDefensesUsed = false;
99
101 }
events
Definition: boss_sartura.cpp:43
@ EVENT_CHECK_PLAYERS
Definition: trial_of_the_champion.h:67
#define DataHeader
Definition: blackrock_depths.h:23
@ NOT_STARTED
Definition: InstanceScript.h:57
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:141
GuidVector GO_ActivationCrystalGUID
Definition: instance_violet_hold.cpp:58
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_violet_hold.cpp:46

References bDefensesUsed, CLEANED, DataHeader, EncounterStatus, EVENT_CHECK_PLAYERS, GateHealth, GO_ActivationCrystalGUID, m_auiEncounter, NOT_STARTED, PortalLocation, InstanceScript::SetHeaders(), uiFirstBoss, uiSecondBoss, and WaveCount.

◆ InstanceCleanup()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::InstanceCleanup ( )
inline
556 {
557 if (CLEANED)
558 return;
559 CLEANED = true;
560
561 // reset defense crystals
562 for (ObjectGuid const& guid : GO_ActivationCrystalGUID)
563 if (GameObject* go = instance->GetGameObject(guid))
564 {
565 HandleGameObject(ObjectGuid::Empty, false, go); // not used yet
566 go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); // not useable at the beginning
567 }
568
569 // reset positions of Sinclari and Guards
570 if (Creature* c = instance->GetCreature(NPC_SinclariGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); }
571 for (uint8 i = 0; i < 4; ++i)
573 {
574 c->DespawnOrUnsummon();
575 c->SetRespawnTime(3);
577 c->SetVisible(false);
578 else
579 c->SetVisible(true);
580 c->SetReactState(REACT_AGGRESSIVE);
581 }
582
583 // remove portal if any
585 c->DespawnOrUnsummon();
587
588 // remove trash
589 for (ObjectGuid const& guid : trashMobs)
590 if (Creature* c = instance->GetCreature(guid))
591 c->DespawnOrUnsummon();
592
593 trashMobs.clear();
594
595 // clear door seal damaging auras:
597 c->RemoveAllAuras();
598
599 // open main gate
601
602 if (m_auiEncounter[MAX_ENCOUNTER - 1] != DONE) // instance not finished
603 {
604 // close all cells
613
614 // respawn bosses
615 if (Creature* c = instance->GetCreature(NPC_MoraggGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
616 if (Creature* c = instance->GetCreature(NPC_MoraggGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
617 if (Creature* c = instance->GetCreature(NPC_ErekemGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
618 if (Creature* c = instance->GetCreature(NPC_ErekemGuardGUID[0])) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
619 if (Creature* c = instance->GetCreature(NPC_ErekemGuardGUID[1])) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
620 if (Creature* c = instance->GetCreature(NPC_IchoronGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
621 if (Creature* c = instance->GetCreature(NPC_LavanthorGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
622 if (Creature* c = instance->GetCreature(NPC_XevozzGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
623 if (Creature* c = instance->GetCreature(NPC_ZuramatGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); c->SetImmuneToNPC(true); }
624 if (Creature* c = instance->GetCreature(NPC_CyanigosaGUID)) { c->DespawnOrUnsummon(); }
625 }
626
627 // reinitialize variables and events
630 GateHealth = 100;
631 WaveCount = 0;
632 bDefensesUsed = false;
635 events.Reset();
636 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 5s);
637 }
@ WORLD_STATE_VH_SHOW
Definition: violet_hold.h:94
#define MAX_ENCOUNTER
Definition: violet_hold.h:21
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
@ DONE
Definition: InstanceScript.h:60
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
Definition: Creature.h:43
Definition: GameObject.h:120
Definition: ObjectGuid.h:118
void Clear()
Definition: ObjectGuid.h:138
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:113
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:603
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3322
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3317
ObjectGuid GO_MoraggCellGUID
Definition: instance_violet_hold.cpp:61
ObjectGuid NPC_MoraggGUID
Definition: instance_violet_hold.cpp:76
ObjectGuid GO_ErekemLeftGuardCellGUID
Definition: instance_violet_hold.cpp:64
ObjectGuid GO_XevozzCellGUID
Definition: instance_violet_hold.cpp:67
ObjectGuid NPC_SinclariGUID
Definition: instance_violet_hold.cpp:71
ObjectGuid NPC_ZuramatGUID
Definition: instance_violet_hold.cpp:82
GuidSet trashMobs
Definition: instance_violet_hold.cpp:70
ObjectGuid GO_LavanthorCellGUID
Definition: instance_violet_hold.cpp:66
ObjectGuid NPC_CyanigosaGUID
Definition: instance_violet_hold.cpp:83
ObjectGuid NPC_GuardGUID[4]
Definition: instance_violet_hold.cpp:72
ObjectGuid GO_MainGateGUID
Definition: instance_violet_hold.cpp:59
ObjectGuid GO_IchoronCellGUID
Definition: instance_violet_hold.cpp:65
ObjectGuid NPC_XevozzGUID
Definition: instance_violet_hold.cpp:81
ObjectGuid NPC_LavanthorGUID
Definition: instance_violet_hold.cpp:80
ObjectGuid GO_ZuramatCellGUID
Definition: instance_violet_hold.cpp:68
ObjectGuid GO_ErekemCellGUID
Definition: instance_violet_hold.cpp:62
ObjectGuid GO_ErekemRightGuardCellGUID
Definition: instance_violet_hold.cpp:63

References bDefensesUsed, CLEANED, ObjectGuid::Clear(), DONE, InstanceScript::DoUpdateWorldState(), ObjectGuid::Empty, EncounterStatus, EVENT_CHECK_PLAYERS, GateHealth, Map::GetCreature(), Map::GetGameObject(), GO_ActivationCrystalGUID, GO_ErekemCellGUID, GO_ErekemLeftGuardCellGUID, GO_ErekemRightGuardCellGUID, GO_FLAG_NOT_SELECTABLE, GO_IchoronCellGUID, GO_LavanthorCellGUID, GO_MainGateGUID, GO_MoraggCellGUID, GO_XevozzCellGUID, GO_ZuramatCellGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, m_auiEncounter, MAX_ENCOUNTER, NOT_STARTED, NPC_CyanigosaGUID, NPC_DoorSealGUID, NPC_ErekemGuardGUID, NPC_ErekemGUID, NPC_GuardGUID, NPC_IchoronGUID, NPC_LavanthorGUID, NPC_MoraggGUID, NPC_PortalGUID, NPC_SinclariGUID, NPC_XevozzGUID, NPC_ZuramatGUID, REACT_AGGRESSIVE, trashMobs, UNIT_FLAG_NON_ATTACKABLE, WaveCount, and WORLD_STATE_VH_SHOW.

Referenced by OnPlayerEnter(), SetData(), and Update().

◆ IsEncounterInProgress()

bool instance_violet_hold::instance_violet_hold_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

104 {
105 return false;
106 }

◆ OnCreatureCreate()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

109 {
110 switch (creature->GetEntry())
111 {
112 case NPC_SINCLARI:
113 NPC_SinclariGUID = creature->GetGUID();
114 break;
116 for (uint8 i = 0; i < 4; ++i)
117 if (!NPC_GuardGUID[i])
118 {
119 NPC_GuardGUID[i] = creature->GetGUID();
120 break;
121 }
122 break;
125 break;
127 NPC_PortalGUID = creature->GetGUID();
128 break;
130 NPC_DoorSealGUID = creature->GetGUID();
131 break;
132 // BOSSES BELOW:
133 case NPC_XEVOZZ:
134 NPC_XevozzGUID = creature->GetGUID();
135 break;
136 case NPC_LAVANTHOR:
137 NPC_LavanthorGUID = creature->GetGUID();
138 break;
139 case NPC_ICHORON:
140 NPC_IchoronGUID = creature->GetGUID();
141 break;
142 case NPC_ZURAMAT:
143 NPC_ZuramatGUID = creature->GetGUID();
144 break;
145 case NPC_EREKEM:
146 NPC_ErekemGUID = creature->GetGUID();
147 break;
148 case NPC_EREKEM_GUARD:
149 if (!NPC_ErekemGuardGUID[0])
150 NPC_ErekemGuardGUID[0] = creature->GetGUID();
151 else
152 NPC_ErekemGuardGUID[1] = creature->GetGUID();
153 break;
154 case NPC_MORAGG:
155 NPC_MoraggGUID = creature->GetGUID();
156 break;
157 case NPC_CYANIGOSA:
158 NPC_CyanigosaGUID = creature->GetGUID();
159 break;
160 }
161 }
@ NPC_EREKEM_GUARD
Definition: violet_hold.h:45
@ NPC_PRISON_DOOR_SEAL
Definition: violet_hold.h:33
@ NPC_LAVANTHOR
Definition: violet_hold.h:41
@ NPC_EREKEM
Definition: violet_hold.h:44
@ NPC_MORAGG
Definition: violet_hold.h:46
@ NPC_VIOLET_HOLD_GUARD
Definition: violet_hold.h:37
@ NPC_CYANIGOSA
Definition: violet_hold.h:47
@ NPC_ICHORON
Definition: violet_hold.h:42
@ NPC_ZURAMAT
Definition: violet_hold.h:43
@ NPC_SINCLARI
Definition: violet_hold.h:36
@ NPC_XEVOZZ
Definition: violet_hold.h:40
@ NPC_TELEPORTATION_PORTAL
Definition: violet_hold.h:31
@ NPC_DEFENSE_DUMMY_TARGET
Definition: violet_hold.h:34
@ SPELL_ARCANE_LIGHTNING
Definition: violet_hold.h:104
@ IMMUNITY_ID
Definition: SharedDefines.h:1400
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13389

References Unit::ApplySpellImmune(), Object::GetEntry(), Object::GetGUID(), IMMUNITY_ID, NPC_CYANIGOSA, NPC_CyanigosaGUID, NPC_DEFENSE_DUMMY_TARGET, NPC_DoorSealGUID, NPC_EREKEM, NPC_EREKEM_GUARD, NPC_ErekemGuardGUID, NPC_ErekemGUID, NPC_GuardGUID, NPC_ICHORON, NPC_IchoronGUID, NPC_LAVANTHOR, NPC_LavanthorGUID, NPC_MORAGG, NPC_MoraggGUID, NPC_PortalGUID, NPC_PRISON_DOOR_SEAL, NPC_SINCLARI, NPC_SinclariGUID, NPC_TELEPORTATION_PORTAL, NPC_VIOLET_HOLD_GUARD, NPC_XEVOZZ, NPC_XevozzGUID, NPC_ZURAMAT, NPC_ZuramatGUID, and SPELL_ARCANE_LIGHTNING.

◆ OnGameObjectCreate()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

164 {
165 switch (go->GetEntry())
166 {
168 HandleGameObject(ObjectGuid::Empty, false, go); // make go not used yet
169 go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); // not useable at the beginning
170 GO_ActivationCrystalGUID.push_back(go->GetGUID());
171 break;
172 case GO_MAIN_DOOR:
173 GO_MainGateGUID = go->GetGUID();
174 break;
175 // BOSS GATES BELOW:
178 break;
181 break;
182 case GO_EREKEM_DOOR:
184 break;
185 case GO_ZURAMAT_DOOR:
187 break;
190 break;
191 case GO_MORAGG_DOOR:
193 break;
194 case GO_ICHORON_DOOR:
196 break;
197 case GO_XEVOZZ_DOOR:
199 break;
200 }
201 }
@ GO_XEVOZZ_DOOR
Definition: violet_hold.h:68
@ GO_ICHORON_DOOR
Definition: violet_hold.h:70
@ GO_ACTIVATION_CRYSTAL
Definition: violet_hold.h:77
@ GO_LAVANTHOR_DOOR
Definition: violet_hold.h:69
@ GO_EREKEM_DOOR
Definition: violet_hold.h:72
@ GO_MORAGG_DOOR
Definition: violet_hold.h:75
@ GO_ZURAMAT_DOOR
Definition: violet_hold.h:71
@ GO_EREKEM_GUARD_2_DOOR
Definition: violet_hold.h:74
@ GO_EREKEM_GUARD_1_DOOR
Definition: violet_hold.h:73
@ GO_MAIN_DOOR
Definition: violet_hold.h:67
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:218

References ObjectGuid::Empty, Object::GetEntry(), Object::GetGUID(), GO_ACTIVATION_CRYSTAL, GO_ActivationCrystalGUID, GO_EREKEM_DOOR, GO_EREKEM_GUARD_1_DOOR, GO_EREKEM_GUARD_2_DOOR, GO_ErekemCellGUID, GO_ErekemLeftGuardCellGUID, GO_ErekemRightGuardCellGUID, GO_FLAG_NOT_SELECTABLE, GO_ICHORON_DOOR, GO_IchoronCellGUID, GO_LAVANTHOR_DOOR, GO_LavanthorCellGUID, GO_MAIN_DOOR, GO_MainGateGUID, GO_MORAGG_DOOR, GO_MoraggCellGUID, GO_XEVOZZ_DOOR, GO_XevozzCellGUID, GO_ZURAMAT_DOOR, GO_ZuramatCellGUID, InstanceScript::HandleGameObject(), and GameObject::SetGameObjectFlag().

◆ OnPlayerEnter()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::OnPlayerEnter ( Player plr)
inlineoverridevirtual

Reimplemented from InstanceScript.

524 {
525 if (DoNeedCleanup(plr->IsAlive()))
527
529 {
533 }
534 else
536
537 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 5s);
538 }
@ WORLD_STATE_VH_WAVE_COUNT
Definition: violet_hold.h:96
@ WORLD_STATE_VH_PRISON_STATE
Definition: violet_hold.h:95
@ IN_PROGRESS
Definition: InstanceScript.h:58
void SendUpdateWorldState(uint32 variable, uint32 value) const
Definition: PlayerUpdates.cpp:2197
bool IsAlive() const
Definition: Unit.h:1654
bool DoNeedCleanup(bool enter)
Definition: instance_violet_hold.cpp:540
void InstanceCleanup()
Definition: instance_violet_hold.cpp:555

References DoNeedCleanup(), EncounterStatus, EVENT_CHECK_PLAYERS, GateHealth, IN_PROGRESS, InstanceCleanup(), Unit::IsAlive(), Player::SendUpdateWorldState(), WaveCount, WORLD_STATE_VH_PRISON_STATE, WORLD_STATE_VH_SHOW, and WORLD_STATE_VH_WAVE_COUNT.

◆ ReadSaveDataMore()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

653 {
655 CLEANED = false;
656 events.Reset();
657 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
658
659 data >> m_auiEncounter[0];
660 data >> m_auiEncounter[1];
661 data >> m_auiEncounter[2];
662 data >> uiFirstBoss;
663 }

References CLEANED, EncounterStatus, EVENT_CHECK_PLAYERS, m_auiEncounter, NOT_STARTED, and uiFirstBoss.

◆ SetData()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

204 {
205 switch (type)
206 {
208 {
209 if (data)
210 bDefensesUsed = true;
211 const Position pos = {1919.09546f, 812.29724f, 86.2905f, M_PI};
213 }
214 break;
217 {
220 c->AI()->Talk(SAY_SINCLARI_LEAVING);
221 events.RescheduleEvent(EVENT_GUARDS_FALL_BACK, 4s);
222 }
223 break;
225 events.RescheduleEvent(EVENT_SUMMON_PORTAL, 3s);
226 break;
228 PortalLocation = data;
229 break;
231 if (GateHealth > 0)
232 --GateHealth;
233 if (GateHealth == 0)
234 {
235 CLEANED = false;
237 }
239 break;
241 if (WaveCount == 6)
243 else
245 break;
246 case DATA_BOSS_DIED:
247 if (WaveCount == 6)
248 m_auiEncounter[0] = DONE;
249 else if (WaveCount == 12)
250 m_auiEncounter[1] = DONE;
251 else if (WaveCount == 18)
252 {
253 m_auiEncounter[2] = DONE;
258 {
259 c->AI()->Talk(SAY_SINCLARI_COMPLETE);
260 c->DespawnOrUnsummon();
261 c->SetRespawnTime(3);
262 }
263 }
264 SaveToDB();
265 if (WaveCount < 18)
266 events.RescheduleEvent(EVENT_SUMMON_PORTAL, 35s);
267 break;
268 case DATA_FAILED:
269 CLEANED = false;
271 break;
272 case DATA_ACHIEV:
273 bAchiev = !!data;
274 break;
275 }
276 }
@ NPC_DEFENSE_SYSTEM
Definition: violet_hold.h:32
@ DATA_ACHIEV
Definition: violet_hold.h:151
@ DATA_START_INSTANCE
Definition: violet_hold.h:133
@ DATA_BOSS_DIED
Definition: violet_hold.h:145
@ DATA_PORTAL_DEFEATED
Definition: violet_hold.h:136
@ DATA_DECRASE_DOOR_HEALTH
Definition: violet_hold.h:144
@ DATA_FAILED
Definition: violet_hold.h:146
@ DATA_ACTIVATE_DEFENSE_SYSTEM
Definition: violet_hold.h:131
@ DATA_RELEASE_BOSS
Definition: violet_hold.h:143
@ EVENT_SUMMON_PORTAL
Definition: violet_hold.h:120
@ EVENT_GUARDS_FALL_BACK
Definition: violet_hold.h:116
@ SAY_SINCLARI_LEAVING
Definition: instance_violet_hold.cpp:27
@ SAY_SINCLARI_COMPLETE
Definition: instance_violet_hold.cpp:29
Definition: Position.h:27
void SaveToDB()
Definition: InstanceScript.cpp:41
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
void StartBossEncounter(uint8 uiBoss)
Definition: instance_violet_hold.cpp:332

References bAchiev, bDefensesUsed, CLEANED, DATA_ACHIEV, DATA_ACTIVATE_DEFENSE_SYSTEM, DATA_BOSS_DIED, DATA_DECRASE_DOOR_HEALTH, DATA_FAILED, DATA_PORTAL_DEFEATED, DATA_PORTAL_LOCATION, DATA_RELEASE_BOSS, DATA_START_INSTANCE, DONE, InstanceScript::DoUpdateWorldState(), EncounterStatus, EVENT_GUARDS_FALL_BACK, EVENT_SUMMON_PORTAL, GateHealth, Map::GetCreature(), GO_MainGateGUID, InstanceScript::HandleGameObject(), IN_PROGRESS, InstanceScript::instance, InstanceCleanup(), m_auiEncounter, NOT_STARTED, NPC_DEFENSE_SYSTEM, NPC_SinclariGUID, PortalLocation, InstanceScript::SaveToDB(), SAY_SINCLARI_COMPLETE, SAY_SINCLARI_LEAVING, StartBossEncounter(), Map::SummonCreature(), uiFirstBoss, uiSecondBoss, WaveCount, WORLD_STATE_VH_PRISON_STATE, and WORLD_STATE_VH_SHOW.

Referenced by Update().

◆ SetGuidData()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::SetGuidData ( uint32  type,
ObjectGuid  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

279 {
280 switch (type)
281 {
283 trashMobs.insert(data);
284 break;
286 if (!CLEANED)
287 trashMobs.erase(data);
288 break;
289 }
290 }
@ DATA_DELETE_TRASH_MOB
Definition: violet_hold.h:135
@ DATA_ADD_TRASH_MOB
Definition: violet_hold.h:134

References CLEANED, DATA_ADD_TRASH_MOB, DATA_DELETE_TRASH_MOB, and trashMobs.

◆ StartBossEncounter()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::StartBossEncounter ( uint8  uiBoss)
inline
333 {
334 Creature* pBoss = nullptr;
335
336 switch (uiBoss)
337 {
338 case BOSS_MORAGG:
341 if (pBoss)
343 break;
344 case BOSS_EREKEM:
349 if (pBoss)
352 {
353 pGuard1->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
354 pGuard1->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
355 pGuard1->SetImmuneToNPC(false);
356 pGuard1->GetMotionMaster()->MovePoint(0, BossStartMove21);
357 }
359 {
360 pGuard2->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
361 pGuard2->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
362 pGuard2->SetImmuneToNPC(false);
363 pGuard2->GetMotionMaster()->MovePoint(0, BossStartMove22);
364 }
365 break;
366 case BOSS_ICHORON:
369 if (pBoss)
371 break;
372 case BOSS_LAVANTHOR:
375 if (pBoss)
377 break;
378 case BOSS_XEVOZZ:
381 if (pBoss)
383 break;
384 case BOSS_ZURAMAT:
387 if (pBoss)
389 break;
390 }
391
392 if (pBoss)
393 {
396 pBoss->SetImmuneToNPC(false);
398 if ((WaveCount == 6 && m_auiEncounter[0] == DONE) || (WaveCount == 12 && m_auiEncounter[1] == DONE))
399 pBoss->SetLootMode(0);
400 }
401 }
const Position BossStartMove3
Definition: violet_hold.h:174
const Position BossStartMove22
Definition: violet_hold.h:173
const Position BossStartMove6
Definition: violet_hold.h:177
@ BOSS_XEVOZZ
Definition: violet_hold.h:87
@ BOSS_ZURAMAT
Definition: violet_hold.h:88
@ BOSS_MORAGG
Definition: violet_hold.h:83
@ BOSS_LAVANTHOR
Definition: violet_hold.h:86
@ BOSS_EREKEM
Definition: violet_hold.h:84
@ BOSS_ICHORON
Definition: violet_hold.h:85
const Position BossStartMove2
Definition: violet_hold.h:171
const Position BossStartMove21
Definition: violet_hold.h:172
const Position BossStartMove1
Definition: violet_hold.h:170
const Position BossStartMove4
Definition: violet_hold.h:175
const Position BossStartMove5
Definition: violet_hold.h:176
@ MOVEMENTFLAG_WALKING
Definition: UnitDefines.h:352
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:94
void SetLootMode(uint16 lootMode)
Definition: Creature.h:242
void SetImmuneToNPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:13620
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void RemoveUnitMovementFlag(uint32 f)
Definition: Unit.h:735
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:714
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:213

References BOSS_EREKEM, BOSS_ICHORON, BOSS_LAVANTHOR, BOSS_MORAGG, BOSS_XEVOZZ, BOSS_ZURAMAT, BossStartMove1, BossStartMove2, BossStartMove21, BossStartMove22, BossStartMove3, BossStartMove4, BossStartMove5, BossStartMove6, DONE, Map::GetCreature(), Unit::GetMotionMaster(), GO_ErekemCellGUID, GO_ErekemLeftGuardCellGUID, GO_ErekemRightGuardCellGUID, GO_IchoronCellGUID, GO_LavanthorCellGUID, GO_MoraggCellGUID, GO_XevozzCellGUID, GO_ZuramatCellGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, m_auiEncounter, MOVEMENTFLAG_WALKING, MotionMaster::MovePoint(), NPC_ErekemGuardGUID, NPC_ErekemGUID, NPC_IchoronGUID, NPC_LavanthorGUID, NPC_MoraggGUID, NPC_XevozzGUID, NPC_ZuramatGUID, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), Unit::RemoveUnitMovementFlag(), Unit::SetImmuneToNPC(), Creature::SetLootMode(), Creature::SetReactState(), UNIT_FLAG_NON_ATTACKABLE, and WaveCount.

Referenced by SetData().

◆ Update()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

404 {
405 events.Update(diff);
406 switch (events.ExecuteEvent())
407 {
408 case 0:
409 break;
411 {
412 if (DoNeedCleanup(false))
414 events.Repeat(5s);
415 }
416 break;
418 {
419 for (uint8 i = 0; i < 4; ++i)
421 {
422 c->SetReactState(REACT_PASSIVE);
423 c->CombatStop();
424 c->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
425 c->GetMotionMaster()->MovePoint(0, guardMovePosition);
426 }
427 events.RescheduleEvent(EVENT_GUARDS_DISAPPEAR, 5s);
428 }
429 break;
431 {
432 for (uint8 i = 0; i < 4; ++i)
434 c->SetVisible(false);
435 events.RescheduleEvent(EVENT_SINCLARI_FALL_BACK, 2s);
436 }
437 break;
439 {
441 {
442 c->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
443 c->GetMotionMaster()->MovePoint(0, sinclariOutsidePosition);
444 }
446 events.RescheduleEvent(EVENT_START_ENCOUNTER, 4s);
447 }
448 break;
450 {
452 {
453 c->AI()->Talk(SAY_SINCLARI_DOOR_LOCK);
454 }
456 {
457 c->RemoveAllAuras(); // just to be sure...
458 }
459 GateHealth = 100;
464
465 for (ObjectGuid const& guid : GO_ActivationCrystalGUID)
466 if (GameObject* go = instance->GetGameObject(guid))
467 {
468 HandleGameObject(ObjectGuid::Empty, false, go); // not used yet
469 go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); // make it useable
470 }
471 events.RescheduleEvent(EVENT_SUMMON_PORTAL, 4s);
472 }
473 break;
475 ++WaveCount;
479 {
480 if (WaveCount % 6 != 0)
482 else if (WaveCount == 6 || WaveCount == 12) // first or second boss
483 {
484 if (!uiFirstBoss || !uiSecondBoss)
485 {
486 uiFirstBoss = urand(1, 6);
487 do { uiSecondBoss = urand(1, 6); }
488 while (uiFirstBoss == uiSecondBoss);
489 SaveToDB();
490 }
492 }
493 else // cyanigossa
494 {
496 {
497 cyanigosa->CastSpell(cyanigosa, SPELL_CYANIGOSA_BLUE_AURA, false);
498 cyanigosa->AI()->Talk(CYANIGOSA_SAY_SPAWN);
499 cyanigosa->GetMotionMaster()->MoveJump(MiddleRoomLocation.GetPositionX(), MiddleRoomLocation.GetPositionY(), MiddleRoomLocation.GetPositionZ(), 10.0f, 20.0f);
500 }
501 events.RescheduleEvent(EVENT_CYANIGOSSA_TRANSFORM, 10s);
502 }
503 }
504 break;
507 {
508 c->RemoveAurasDueToSpell(SPELL_CYANIGOSA_BLUE_AURA);
509 c->CastSpell(c, SPELL_CYANIGOSA_TRANSFORM, 0);
510 events.RescheduleEvent(EVENT_CYANIGOSA_ATTACK, 2500ms);
511 }
512 break;
515 {
516 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
517 c->SetImmuneToNPC(false);
518 }
519 break;
520 }
521 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
const Position PortalLocations[]
Definition: violet_hold.h:184
const Position sinclariOutsidePosition
Definition: violet_hold.h:167
@ SPELL_CYANIGOSA_BLUE_AURA
Definition: violet_hold.h:110
@ SPELL_CYANIGOSA_TRANSFORM
Definition: violet_hold.h:109
const Position guardMovePosition
Definition: violet_hold.h:165
const Position MiddleRoomLocation
Definition: violet_hold.h:180
const Position MiddleRoomPortalSaboLocation
Definition: violet_hold.h:168
const Position CyanigosasSpawnLocation
Definition: violet_hold.h:179
@ EVENT_START_ENCOUNTER
Definition: violet_hold.h:119
@ EVENT_GUARDS_DISAPPEAR
Definition: violet_hold.h:117
@ EVENT_CYANIGOSSA_TRANSFORM
Definition: violet_hold.h:121
@ EVENT_SINCLARI_FALL_BACK
Definition: violet_hold.h:118
@ EVENT_CYANIGOSA_ATTACK
Definition: violet_hold.h:122
@ SAY_SINCLARI_DOOR_LOCK
Definition: instance_violet_hold.cpp:28
@ CYANIGOSA_SAY_SPAWN
Definition: instance_violet_hold.cpp:26
@ TEMPSUMMON_DEAD_DESPAWN
Definition: Object.h:52
@ TEMPSUMMON_CORPSE_DESPAWN
Definition: Object.h:50
@ REACT_PASSIVE
Definition: Unit.h:548
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2366
float GetPositionZ() const
Definition: Position.h:118
float GetPositionX() const
Definition: Position.h:116
float GetPositionY() const
Definition: Position.h:117
void SetData(uint32 type, uint32 data) override
Definition: instance_violet_hold.cpp:203
uint32 GetData(uint32 type) const override
Definition: instance_violet_hold.cpp:292

References CYANIGOSA_SAY_SPAWN, CyanigosasSpawnLocation, DATA_ACTIVATE_DEFENSE_SYSTEM, DATA_PORTAL_LOCATION, DoNeedCleanup(), InstanceScript::DoUpdateWorldState(), ObjectGuid::Empty, EVENT_CHECK_PLAYERS, EVENT_CYANIGOSA_ATTACK, EVENT_CYANIGOSSA_TRANSFORM, EVENT_GUARDS_DISAPPEAR, EVENT_GUARDS_FALL_BACK, EVENT_SINCLARI_FALL_BACK, EVENT_START_ENCOUNTER, EVENT_SUMMON_PORTAL, GateHealth, Map::GetCreature(), GetData(), Map::GetGameObject(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_ActivationCrystalGUID, GO_FLAG_NOT_SELECTABLE, GO_MainGateGUID, guardMovePosition, InstanceScript::HandleGameObject(), InstanceScript::instance, InstanceCleanup(), MiddleRoomLocation, MiddleRoomPortalSaboLocation, MOVEMENTFLAG_WALKING, NPC_CYANIGOSA, NPC_CyanigosaGUID, NPC_DoorSealGUID, NPC_GuardGUID, NPC_SinclariGUID, NPC_TELEPORTATION_PORTAL, PortalLocations, REACT_PASSIVE, InstanceScript::SaveToDB(), SAY_SINCLARI_DOOR_LOCK, SetData(), sinclariOutsidePosition, SPELL_CYANIGOSA_BLUE_AURA, SPELL_CYANIGOSA_TRANSFORM, WorldObject::SummonCreature(), TEMPSUMMON_CORPSE_DESPAWN, TEMPSUMMON_DEAD_DESPAWN, uiFirstBoss, uiSecondBoss, UNIT_FLAG_NON_ATTACKABLE, urand(), WaveCount, WORLD_STATE_VH_PRISON_STATE, WORLD_STATE_VH_SHOW, and WORLD_STATE_VH_WAVE_COUNT.

◆ WriteSaveDataMore()

void instance_violet_hold::instance_violet_hold_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

666 {
667 data << m_auiEncounter[0] << ' '
668 << m_auiEncounter[1] << ' '
669 << m_auiEncounter[2] << ' '
670 << uiFirstBoss << ' '
671 << uiSecondBoss << ' ';
672 }

References m_auiEncounter, uiFirstBoss, and uiSecondBoss.

Member Data Documentation

◆ bAchiev

bool instance_violet_hold::instance_violet_hold_InstanceMapScript::bAchiev

◆ bDefensesUsed

bool instance_violet_hold::instance_violet_hold_InstanceMapScript::bDefensesUsed

◆ CLEANED

bool instance_violet_hold::instance_violet_hold_InstanceMapScript::CLEANED

◆ EncounterStatus

uint8 instance_violet_hold::instance_violet_hold_InstanceMapScript::EncounterStatus

◆ events

EventMap instance_violet_hold::instance_violet_hold_InstanceMapScript::events

◆ GateHealth

uint8 instance_violet_hold::instance_violet_hold_InstanceMapScript::GateHealth

◆ GO_ActivationCrystalGUID

GuidVector instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_ActivationCrystalGUID

◆ GO_ErekemCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_ErekemCellGUID

◆ GO_ErekemLeftGuardCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_ErekemLeftGuardCellGUID

◆ GO_ErekemRightGuardCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_ErekemRightGuardCellGUID

◆ GO_IchoronCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_IchoronCellGUID

◆ GO_LavanthorCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_LavanthorCellGUID

◆ GO_MainGateGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_MainGateGUID

◆ GO_MoraggCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_MoraggCellGUID

◆ GO_XevozzCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_XevozzCellGUID

◆ GO_ZuramatCellGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::GO_ZuramatCellGUID

◆ m_auiEncounter

uint32 instance_violet_hold::instance_violet_hold_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]

◆ NPC_CyanigosaGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_CyanigosaGUID

◆ NPC_DoorSealGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_DoorSealGUID

◆ NPC_ErekemGuardGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_ErekemGuardGUID[2]

◆ NPC_ErekemGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_ErekemGUID

◆ NPC_GuardGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_GuardGUID[4]

◆ NPC_IchoronGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_IchoronGUID

◆ NPC_LavanthorGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_LavanthorGUID

◆ NPC_MoraggGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_MoraggGUID

◆ NPC_PortalGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_PortalGUID

◆ NPC_SinclariGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_SinclariGUID

◆ NPC_XevozzGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_XevozzGUID

◆ NPC_ZuramatGUID

ObjectGuid instance_violet_hold::instance_violet_hold_InstanceMapScript::NPC_ZuramatGUID

◆ PortalLocation

uint8 instance_violet_hold::instance_violet_hold_InstanceMapScript::PortalLocation

Referenced by GetData(), Initialize(), and SetData().

◆ str_data

std::string instance_violet_hold::instance_violet_hold_InstanceMapScript::str_data

◆ trashMobs

GuidSet instance_violet_hold::instance_violet_hold_InstanceMapScript::trashMobs

Referenced by InstanceCleanup(), and SetGuidData().

◆ uiFirstBoss

uint32 instance_violet_hold::instance_violet_hold_InstanceMapScript::uiFirstBoss

◆ uiSecondBoss

uint32 instance_violet_hold::instance_violet_hold_InstanceMapScript::uiSecondBoss

◆ WaveCount

uint8 instance_violet_hold::instance_violet_hold_InstanceMapScript::WaveCount