AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
InstanceScript Class Reference

#include "InstanceScript.h"

Inheritance diagram for InstanceScript:
ZoneScript instance_ahnkahet::instance_ahnkahet_InstanceScript instance_arcatraz::instance_arcatraz_InstanceMapScript instance_auchenai_crypts::instance_auchenai_crypts_InstanceMapScript instance_azjol_nerub::instance_azjol_nerub_InstanceScript instance_black_temple::instance_black_temple_InstanceMapScript instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript instance_blackrock_spire::instance_blackrock_spireMapScript instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript instance_blood_furnace::instance_blood_furnace_InstanceMapScript instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript instance_deadmines::instance_deadmines_InstanceMapScript instance_dire_maul::instance_dire_maul_InstanceMapScript instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript instance_forge_of_souls::instance_forge_of_souls_InstanceScript instance_gnomeregan::instance_gnomeregan_InstanceMapScript instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript instance_gundrak::instance_gundrak_InstanceMapScript instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript instance_hyjal::instance_mount_hyjal_InstanceMapScript instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript instance_karazhan::instance_karazhan_InstanceMapScript instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript instance_mana_tombs::instance_mana_tombs_InstanceMapScript instance_maraudon::instance_maraudon_InstanceMapScript instance_mechanar::instance_mechanar_InstanceMapScript instance_molten_core::instance_molten_core_InstanceMapScript instance_naxxramas::instance_naxxramas_InstanceMapScript instance_nexus::instance_nexus_InstanceMapScript instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript instance_oculus::instance_oculus_InstanceMapScript instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript instance_pit_of_saron::instance_pit_of_saron_InstanceScript instance_ragefire_chasm::instance_ragefire_chasm_InstanceMapScript instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript instance_razorfen_kraul::instance_razorfen_kraul_InstanceMapScript instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript instance_scholomance::instance_scholomance_InstanceMapScript instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript instance_shattered_halls::instance_shattered_halls_InstanceMapScript instance_steam_vault::instance_steam_vault_InstanceMapScript instance_stratholme::instance_stratholme_InstanceMapScript instance_sunken_temple::instance_sunken_temple_InstanceMapScript instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript instance_the_black_morass::instance_the_black_morass_InstanceMapScript instance_the_botanica::instance_the_botanica_InstanceMapScript instance_the_eye::instance_the_eye_InstanceMapScript instance_the_slave_pens::instance_the_slave_pens_InstanceMapScript instance_the_stockade::instance_the_stockade_InstanceMapScript instance_the_underbog::instance_the_underbog_InstanceMapScript instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript instance_uldaman::instance_uldaman_InstanceMapScript instance_ulduar::instance_ulduar_InstanceMapScript instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript instance_violet_hold::instance_violet_hold_InstanceMapScript instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript instance_zulaman::instance_zulaman_InstanceMapScript instance_zulfarrak::instance_zulfarrak_InstanceMapScript instance_zulgurub::instance_zulgurub_InstanceMapScript

Public Member Functions

 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)
 

Static Public Member Functions

static std::string GetBossStateName (uint8 state)
 

Public Attributes

Mapinstance
 
TaskScheduler scheduler
 

Protected Member Functions

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 &)
 

Static Private Member Functions

static void LoadObjectData (ObjectData const *creatureData, ObjectInfoMap &objectInfo)
 

Private Attributes

std::vector< char > headers
 
std::vector< BossInfobosses
 
std::vector< uint32persistentData
 
DoorInfoMap doors
 
MinionInfoMap minions
 
ObjectInfoMap _creatureInfo
 
ObjectInfoMap _gameObjectInfo
 
ObjectGuidMap _objectGuids
 
ObjectStateMap _objectStateMap
 
uint32 completedEncounters
 
std::unordered_set< uint32_activatedAreaTriggers
 

Detailed Description

Constructor & Destructor Documentation

◆ InstanceScript()

InstanceScript::InstanceScript ( Map map)
inlineexplicit
144: instance(map), completedEncounters(0) {}
uint32 completedEncounters
Definition: InstanceScript.h:329
Map * instance
Definition: InstanceScript.h:148

◆ ~InstanceScript()

InstanceScript::~InstanceScript ( )
inlineoverride
146{}

Member Function Documentation

◆ AddDoor()

void InstanceScript::AddDoor ( GameObject door,
bool  add = true 
)
protected
308{
309 DoorInfoMapBounds range = doors.equal_range(door->GetEntry());
310 if (range.first == range.second)
311 return;
312
313 for (; range.first != range.second; ++range.first)
314 {
315 DoorInfo const& data = range.first->second;
316
317 if (add)
318 {
319 data.bossInfo->door[data.type].insert(door);
320 }
321 else
322 data.bossInfo->door[data.type].erase(door);
323 }
324
325 if (add)
326 UpdateDoorState(door);
327}
std::pair< DoorInfoMap::const_iterator, DoorInfoMap::const_iterator > DoorInfoMapBounds
Definition: InstanceScript.h:134
uint32 GetEntry() const
Definition: Object.h:112
DoorSet door[MAX_DOOR_TYPES]
Definition: InstanceScript.h:114
Definition: InstanceScript.h:120
BossInfo * bossInfo
Definition: InstanceScript.h:123
DoorType type
Definition: InstanceScript.h:124
DoorInfoMap doors
Definition: InstanceScript.h:323
void UpdateDoorState(GameObject *door)
Definition: InstanceScript.cpp:228

References DoorInfo::bossInfo, BossInfo::door, doors, Object::GetEntry(), DoorInfo::type, and UpdateDoorState().

Referenced by instance_gundrak::instance_gundrak_InstanceMapScript::OnGameObjectCreate(), instance_nexus::instance_nexus_InstanceMapScript::OnGameObjectCreate(), instance_mechanar::instance_mechanar_InstanceMapScript::OnGameObjectCreate(), OnGameObjectCreate(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::OnGameObjectCreate(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::OnGameObjectCreate(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::OnGameObjectCreate(), instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript::OnGameObjectCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnGameObjectCreate(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::OnGameObjectCreate(), instance_arcatraz::instance_arcatraz_InstanceMapScript::OnGameObjectCreate(), and RemoveDoor().

◆ AddMinion()

void InstanceScript::AddMinion ( Creature minion,
bool  add = true 
)
protected
335{
336 MinionInfoMap::iterator itr = minions.find(minion->GetEntry());
337 if (itr == minions.end())
338 return;
339
340 if (add)
341 itr->second.bossInfo->minion.insert(minion);
342 else
343 itr->second.bossInfo->minion.erase(minion);
344}
MinionInfoMap minions
Definition: InstanceScript.h:324

References Object::GetEntry(), and minions.

Referenced by OnCreatureCreate(), instance_blackrock_spire::instance_blackrock_spireMapScript::OnCreatureCreate(), instance_molten_core::instance_molten_core_InstanceMapScript::OnCreatureCreate(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::OnCreatureCreate(), and RemoveMinion().

◆ AddObject() [1/3]

void InstanceScript::AddObject ( Creature obj,
bool  add = true 
)
protected
259{
260 ObjectInfoMap::const_iterator j = _creatureInfo.find(obj->GetEntry());
261 if (j != _creatureInfo.end())
262 {
263 AddObject(obj, j->second, add);
264 }
265}
ObjectInfoMap _creatureInfo
Definition: InstanceScript.h:325
void AddObject(Creature *obj, bool add=true)
Definition: InstanceScript.cpp:258

References _creatureInfo, AddObject(), and Object::GetEntry().

Referenced by AddObject(), OnCreatureCreate(), OnGameObjectCreate(), and RemoveObject().

◆ AddObject() [2/3]

void InstanceScript::AddObject ( GameObject obj,
bool  add = true 
)
protected
273{
274 ObjectInfoMap::const_iterator j = _gameObjectInfo.find(obj->GetEntry());
275 if (j != _gameObjectInfo.end())
276 {
277 AddObject(obj, j->second, add);
278 }
279}
ObjectInfoMap _gameObjectInfo
Definition: InstanceScript.h:326

References _gameObjectInfo, AddObject(), and Object::GetEntry().

◆ AddObject() [3/3]

void InstanceScript::AddObject ( WorldObject obj,
uint32  type,
bool  add = true 
)
protected
287{
288 if (add)
289 {
290 _objectGuids[type] = obj->GetGUID();
291 }
292 else
293 {
294 ObjectGuidMap::iterator i = _objectGuids.find(type);
295 if (i != _objectGuids.end() && i->second == obj->GetGUID())
296 {
297 _objectGuids.erase(i);
298 }
299 }
300}
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
ObjectGuidMap _objectGuids
Definition: InstanceScript.h:327

References _objectGuids, and Object::GetGUID().

◆ AllBossesDone() [1/2]

bool InstanceScript::AllBossesDone ( ) const
765{
766 for (auto const& boss : bosses)
767 if (boss.state != DONE)
768 return false;
769
770 return true;
771}
@ DONE
Definition: InstanceScript.h:60
std::vector< BossInfo > bosses
Definition: InstanceScript.h:321

References bosses, and DONE.

Referenced by instance_black_temple::instance_black_temple_InstanceMapScript::SetBossState().

◆ AllBossesDone() [2/2]

bool InstanceScript::AllBossesDone ( std::initializer_list< uint32 bossIds) const
774{
775 for (auto const& bossId : bossIds)
776 if (!IsBossDone(bossId))
777 return false;
778
779 return true;
780}
bool IsBossDone(uint32 bossId) const
Definition: InstanceScript.h:278

References IsBossDone().

◆ CheckAchievementCriteriaMeet()

bool InstanceScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  = nullptr,
uint32  = 0 
)
virtual

Reimplemented in instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, and instance_oculus::instance_oculus_InstanceMapScript.

688{
689 LOG_ERROR("scripts.ai", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map {} not have implementation for achievement criteria {}",
690 instance->GetId(), criteria_id);
691 return false;
692}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
uint32 GetId() const
Definition: Map.h:379

References Map::GetId(), instance, and LOG_ERROR.

Referenced by AchievementCriteriaData::Meets().

◆ CheckRequiredBosses()

◆ CreatureLooted()

virtual void InstanceScript::CreatureLooted ( Creature ,
LootType   
)
inlinevirtual

◆ DoAction()

◆ DoCastSpellOnPlayer()

void InstanceScript::DoCastSpellOnPlayer ( Player player,
uint32  spell,
bool  includePets,
bool  includeControlled 
)
659{
660 if (!player)
661 return;
662
663 player->CastSpell(player, spell, true);
664
665 if (!includePets)
666 return;
667
668 for (uint8 itr2 = 0; itr2 < MAX_SUMMON_SLOT; ++itr2)
669 {
670 ObjectGuid summonGUID = player->m_SummonSlot[itr2];
671 if (!summonGUID.IsEmpty())
672 if (Creature* summon = instance->GetCreature(summonGUID))
673 summon->CastSpell(player, spell, true);
674 }
675
676 if (!includeControlled)
677 return;
678
679 for (auto itr2 = player->m_Controlled.begin(); itr2 != player->m_Controlled.end(); ++itr2)
680 {
681 if (Unit* controlled = *itr2)
682 if (controlled->IsInWorld() && controlled->IsCreature())
683 controlled->CastSpell(player, spell, true);
684 }
685}
std::uint8_t uint8
Definition: Define.h:109
#define MAX_SUMMON_SLOT
Definition: Unit.h:601
Definition: Creature.h:46
Definition: ObjectGuid.h:118
bool IsEmpty() const
Definition: ObjectGuid.h:161
Definition: Unit.h:630
ControlSet m_Controlled
Definition: Unit.h:1776
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
ObjectGuid m_SummonSlot[MAX_SUMMON_SLOT]
Definition: Unit.h:1780
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314

References Unit::CastSpell(), Map::GetCreature(), instance, ObjectGuid::IsEmpty(), Unit::m_Controlled, Unit::m_SummonSlot, and MAX_SUMMON_SLOT.

Referenced by instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnPlayerEnter().

◆ DoCastSpellOnPlayers()

◆ DoForAllMinions()

void InstanceScript::DoForAllMinions ( uint32  id,
std::function< void(Creature *)>  exec 
)
400{
401 BossInfo* bossInfo = &bosses[id];
402 MinionSet listCopy = bossInfo->minion;
403
404 for (auto const& minion : listCopy)
405 {
406 if (minion)
407 {
408 exec(minion);
409 }
410 }
411}
std::set< Creature * > MinionSet
Definition: InstanceScript.h:41
Definition: InstanceScript.h:111
MinionSet minion
Definition: InstanceScript.h:115

References bosses, and BossInfo::minion.

Referenced by boss_fathomlord_karathress::DoAction(), boss_hydromancer_thespia::JustDied(), boss_warlord_kalithresh::JustDied(), boss_fathomlord_karathress::JustEngagedWith(), boss_magtheridon::JustEngagedWith(), boss_fathomlord_karathress::JustReachedHome(), boss_fathomlord_karathress::Reset(), and boss_warlord_kalithresh::Reset().

◆ DoRemoveAurasDueToSpellOnPlayers()

void InstanceScript::DoRemoveAurasDueToSpellOnPlayers ( uint32  spell)
640{
641 instance->DoForAllPlayers([&](Player* player)
642 {
643 player->RemoveAurasDueToSpell(spell);
644 if (Pet* pet = player->GetPet())
645 pet->RemoveAurasDueToSpell(spell);
646 });
647}
Definition: Pet.h:41
Pet * GetPet() const
Definition: Player.cpp:8906
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4891

References Map::DoForAllPlayers(), Player::GetPet(), instance, and Unit::RemoveAurasDueToSpell().

Referenced by boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI::CleanAuras(), boss_sartharion_dragonAI::ClearInstance(), boss_sartharion_vesperon::boss_sartharion_vesperonAI::ClearInstance(), boss_kalecgos::boss_kalecgosAI::ClearPlayerAuras(), boss_hodir::boss_hodirAI::DamageTaken(), boss_twin_valkyrAI::DoAction(), instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript::DoAction(), boss_amanitar::EnterEvadeMode(), boss_sartharion_tenebron::boss_sartharion_tenebronAI::ExecuteEvent(), npc_echo_of_medivh::HandlePieceJustDied(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::HealReceived(), boss_amanitar::JustDied(), boss_twin_valkyrAI::JustDied(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustDied(), boss_rotface::boss_rotfaceAI::JustDied(), boss_sindragosa::boss_sindragosaAI::JustDied(), boss_toravon::boss_toravonAI::JustDied(), boss_moroes::JustDied(), boss_felmyst::boss_felmystAI::JustDied(), boss_buru::JustDied(), boss_thaddius::boss_thaddiusAI::JustDied(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustEngagedWith(), boss_professor_putricide::boss_professor_putricideAI::JustEngagedWith(), boss_professor_putricide::boss_professor_putricideAI::JustReachedHome(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnPlayerEnter(), instance_stratholme::instance_stratholme_InstanceMapScript::OnUnitDeath(), boss_baroness_anastari::boss_baroness_anastariAI::Reset(), boss_felmyst::boss_felmystAI::Reset(), boss_sartharion::boss_sartharionAI::Reset(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::Reset(), boss_thaddius::boss_thaddiusAI::Reset(), boss_hodir::boss_hodirAI::Reset(), boss_yoggsaron_sara::boss_yoggsaron_saraAI::Reset(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetData(), instance_karazhan::instance_karazhan_InstanceMapScript::SetData(), npc_echo_of_medivh::sGossipSelect(), boss_sartharion_vesperon::boss_sartharion_vesperonAI::SummonedCreatureDies(), instance_stratholme::instance_stratholme_InstanceMapScript::Update(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::Update(), boss_icehowl::boss_icehowlAI::UpdateAI(), boss_professor_putricide::boss_professor_putricideAI::UpdateAI(), and boss_yoggsaron_sara::boss_yoggsaron_saraAI::UpdateAI().

◆ DoRespawnCreature() [1/2]

void InstanceScript::DoRespawnCreature ( ObjectGuid  guid,
bool  force = false 
)

◆ DoRespawnCreature() [2/2]

void InstanceScript::DoRespawnCreature ( uint32  type,
bool  force = false 
)
570{
571 if (Creature* creature = instance->GetCreature(GetObjectGuid(type)))
572 {
573 creature->Respawn(force);
574 }
575}
ObjectGuid GetObjectGuid(uint32 type) const
Definition: InstanceScript.cpp:83

References Map::GetCreature(), GetObjectGuid(), and instance.

◆ DoRespawnGameObject()

void InstanceScript::DoRespawnGameObject ( ObjectGuid  guid,
uint32  timeToDespawn = MINUTE 
)
536{
537 if (GameObject* go = instance->GetGameObject(uiGuid))
538 {
539 switch (go->GetGoType())
540 {
545 // not expect any of these should ever be handled
546 LOG_ERROR("scripts", "InstanceScript: DoRespawnGameObject can't respawn gameobject entry {}, because type is {}.", go->GetEntry(), go->GetGoType());
547 return;
548 default:
549 break;
550 }
551
552 if (go->isSpawned())
553 return;
554
555 go->SetRespawnTime(uiTimeToDespawn);
556 }
557 else
558 LOG_DEBUG("scripts", "InstanceScript: DoRespawnGameObject failed");
559}
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:168
@ GAMEOBJECT_TYPE_BUTTON
Definition: SharedDefines.h:1561
@ GAMEOBJECT_TYPE_TRAP
Definition: SharedDefines.h:1566
@ GAMEOBJECT_TYPE_FISHINGNODE
Definition: SharedDefines.h:1577
@ GAMEOBJECT_TYPE_DOOR
Definition: SharedDefines.h:1560
Definition: GameObject.h:121
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3319

References GAMEOBJECT_TYPE_BUTTON, GAMEOBJECT_TYPE_DOOR, GAMEOBJECT_TYPE_FISHINGNODE, GAMEOBJECT_TYPE_TRAP, Map::GetGameObject(), instance, LOG_DEBUG, and LOG_ERROR.

Referenced by npc_echo_of_medivh::HandlePieceJustDied(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::SetData(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetData(), instance_karazhan::instance_karazhan_InstanceMapScript::SetData(), and instance_oculus::instance_oculus_InstanceMapScript::SetData().

◆ DoSendNotifyToInstance()

void InstanceScript::DoSendNotifyToInstance ( char const *  format,
  ... 
)
595{
596 if (!instance->GetPlayers().IsEmpty())
597 {
598 va_list ap;
599 va_start(ap, format);
600 char buff[1024];
601 vsnprintf(buff, 1024, format, ap);
602 va_end(ap);
603
604 instance->DoForAllPlayers([&, buff](Player* player)
605 {
606 ChatHandler(player->GetSession()).SendNotification("{}", buff);
607 });
608 }
609}
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: Chat.h:39
void SendNotification(std::string_view str)
Definition: Chat.cpp:107
WorldSession * GetSession() const
Definition: Player.h:1978
PlayerList const & GetPlayers() const
Definition: Map.h:486

References Map::DoForAllPlayers(), Map::GetPlayers(), Player::GetSession(), instance, LinkedListHead::IsEmpty(), and ChatHandler::SendNotification().

◆ DoStartTimedAchievement()

◆ DoStopTimedAchievement()

◆ DoUpdateAchievementCriteria()

◆ DoUpdateWorldState()

void InstanceScript::DoUpdateWorldState ( uint32  worldstateId,
uint32  worldstateValue 
)
578{
579 Map::PlayerList const& lPlayers = instance->GetPlayers();
580
581 if (!lPlayers.IsEmpty())
582 {
583 for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
584 if (Player* player = itr->GetSource())
585 player->SendUpdateWorldState(uiStateId, uiStateData);
586 }
587 else
588 {
589 LOG_DEBUG("scripts.ai", "DoUpdateWorldState attempt send data but no players in map.");
590 }
591}
Definition: LinkedList.h:139
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

References MapRefMgr::begin(), MapRefMgr::end(), Map::GetPlayers(), instance, LinkedListHead::IsEmpty(), and LOG_DEBUG.

Referenced by instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::AddWave1(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::DoWipe1(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::HandleDropAttempt(), spell_halion_twilight_division::HandleDummy(), instance_violet_hold::instance_violet_hold_InstanceMapScript::InstanceCleanup(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::OnCreatureCreate(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::OnUnitDeath(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::ScheduleNextPortal(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::SetBossState(), instance_zulaman::instance_zulaman_InstanceMapScript::SetData(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetData(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::SetData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_oculus::instance_oculus_InstanceMapScript::SetData(), instance_ulduar::instance_ulduar_InstanceMapScript::SetData(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SetData(), instance_zulaman::instance_zulaman_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::Update(), instance_violet_hold::instance_violet_hold_InstanceMapScript::Update(), npc_arthas::npc_arthasAI::UpdateAI(), npc_halion_controller::npc_halion_controllerAI::UpdateCorporeality(), and instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::UpdateEventState().

◆ DoUseDoorOrButton()

void InstanceScript::DoUseDoorOrButton ( ObjectGuid  guid,
uint32  withRestoreTime = 0,
bool  useAlternativeState = false 
)
515{
516 if (!uiGuid)
517 return;
518
519 GameObject* go = instance->GetGameObject(uiGuid);
520
521 if (go)
522 {
524 {
525 if (go->getLootState() == GO_READY)
526 go->UseDoorOrButton(uiWithRestoreTime, bUseAlternativeState);
527 else if (go->getLootState() == GO_ACTIVATED)
528 go->ResetDoorOrButton();
529 }
530 else
531 LOG_ERROR("scripts.ai", "SD2: Script call DoUseDoorOrButton, but gameobject entry {} is type {}.", go->GetEntry(), go->GetGoType());
532 }
533}
@ GO_ACTIVATED
Definition: GameObject.h:113
@ GO_READY
Definition: GameObject.h:112
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
Definition: GameObject.cpp:1429
LootState getLootState() const
Definition: GameObject.h:225
GameobjectTypes GetGoType() const
Definition: GameObject.h:204
void ResetDoorOrButton()
Definition: GameObject.cpp:1419

References GAMEOBJECT_TYPE_BUTTON, GAMEOBJECT_TYPE_DOOR, Object::GetEntry(), Map::GetGameObject(), GameObject::GetGoType(), GameObject::getLootState(), GO_ACTIVATED, GO_READY, instance, LOG_ERROR, GameObject::ResetDoorOrButton(), and GameObject::UseDoorOrButton().

Referenced by instance_stratholme::instance_stratholme_InstanceMapScript::gate_delay(), boss_bigbadwolf::JustEngagedWith(), instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::SetData(), instance_stratholme::instance_stratholme_InstanceMapScript::Update(), and npc_barnes::npc_barnesAI::WaypointReached().

◆ FillInitialWorldStates()

◆ GetBossBoundary()

◆ GetBossInfo()

BossInfo const * InstanceScript::GetBossInfo ( uint32  id) const
inline
238{ return &bosses[id]; }

References bosses.

Referenced by instance_nexus::instance_nexus_InstanceMapScript::SetBossState().

◆ GetBossState()

EncounterState InstanceScript::GetBossState ( uint32  id) const
inline
235{ return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
@ TO_BE_DECIDED
Definition: InstanceScript.h:62

References bosses, and TO_BE_DECIDED.

Referenced by BossAI::_EnterEvadeMode(), boss_hakkar::boss_hakkarAI::ApplyHakkarPowerStacks(), boss_felmyst::boss_felmystAI::boss_felmystAI(), boss_wrath_scryer_soccothrates::boss_wrath_scryer_soccothrates(), spell_serpentshrine_cavern_coilfang_water::CalcPeriodic(), boss_majordomo::boss_majordomoAI::CanAIAttack(), npc_gunship_mage::npc_gunship_mageAI::CanAIAttack(), npc_gunship_rocketeer::npc_gunship_rocketeerAI::CanAIAttack(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::CanAIAttack(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::CanAIAttack(), npc_igb_ship_crew::npc_igb_ship_crewAI::CanAIAttack(), npc_gunship_boarding_addAI::CanAIAttack(), npc_gunship_gunner::npc_gunship_gunnerAI::CanAIAttack(), boss_keristrasza::boss_keristraszaAI::CanRemovePrison(), BossAI::CanRespawn(), instance_naxxramas::instance_naxxramas_InstanceMapScript::CheckAchievementCriteriaMeet(), spell_igb_rocket_pack_useable_aura::CheckAreaTarget(), instance_molten_core::instance_molten_core_InstanceMapScript::CheckMajordomoExecutus(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::CheckRequiredBosses(), npc_core_rager::npc_core_ragerAI::DamageTaken(), npc_gunship::npc_gunshipAI::DamageTaken(), go_suppression_device::go_suppression_deviceAI::DoAction(), boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI::DoAction(), npc_strangulate_vehicle::npc_strangulate_vehicleAI::DoAction(), npc_crok_scourgebane::npc_crok_scourgebaneAI::DoAction(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomcheck(), SendEncounterUnit::Execute(), boss_sartharion_tenebron::boss_sartharion_tenebronAI::ExecuteEvent(), instance_zulgurub::instance_zulgurub_InstanceMapScript::GetData(), go_chromaggus_lever::go_chromaggus_leverAI::GossipHello(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::HandleDropAttempt(), instance_commandscript::HandleInstanceGetBossStateCommand(), spell_serpentshrine_cavern_coilfang_water::HandlePeriodic(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::HealReceived(), go_suppression_device::go_suppression_deviceAI::InitializeAI(), boss_majordomo::boss_majordomoAI::InitializeAI(), instance_ahnkahet::instance_ahnkahet_InstanceScript::IsAllSpheresActivated(), IsBossDone(), instance_naxxramas::instance_naxxramas_InstanceMapScript::IsEncounterInProgress(), npc_taldaram_flamesphere::IsSummonedBy(), npc_oculus_drake::npc_oculus_drakeAI::IsSummonedBy(), boss_sartharion_dragonAI::JustDied(), npc_gunship::npc_gunshipAI::JustDied(), boss_four_horsemen::boss_four_horsemenAI::JustDied(), boss_sartharion_dragonAI::JustEngagedWith(), boss_hakkar::boss_hakkarAI::JustEngagedWith(), npc_crystalline_frayer::npc_crystalline_frayerAI::JustEngagedWith(), boss_sartharion::boss_sartharionAI::JustEngagedWith(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::JustEngagedWith(), boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI::JustEngagedWith(), boss_majordomo::boss_majordomoAI::JustReachedHome(), npc_tirion_fordring_tft::npc_tirion_fordringAI::JustReachedHome(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::JustReachedHome(), npc_akama_illidan::JustReachedHome(), boss_sartharion_dragonAI::JustSummoned(), npc_gluttonous_abomination::npc_gluttonous_abominationAI::JustSummoned(), npc_medivh_bm::MoveInLineOfSight(), npc_crok_scourgebane::npc_crok_scourgebaneAI::npc_crok_scourgebaneAI(), npc_madrigosa::npc_madrigosaAI::npc_madrigosaAI(), spell_blood_queen_vampiric_bite::OnCast(), instance_blackrock_spire::instance_blackrock_spireMapScript::OnCreatureCreate(), instance_karazhan::instance_karazhan_InstanceMapScript::OnCreatureCreate(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::OnCreatureCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnCreatureCreate(), instance_black_temple::instance_black_temple_InstanceMapScript::OnCreatureCreate(), instance_gundrak::instance_gundrak_InstanceMapScript::OnGameObjectCreate(), instance_nexus::instance_nexus_InstanceMapScript::OnGameObjectCreate(), instance_blackrock_spire::instance_blackrock_spireMapScript::OnGameObjectCreate(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::OnGameObjectCreate(), instance_molten_core::instance_molten_core_InstanceMapScript::OnGameObjectCreate(), instance_karazhan::instance_karazhan_InstanceMapScript::OnGameObjectCreate(), instance_zulgurub::instance_zulgurub_InstanceMapScript::OnGameObjectCreate(), instance_ahnkahet::instance_ahnkahet_InstanceScript::OnGameObjectCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnGameObjectCreate(), instance_black_temple::instance_black_temple_InstanceMapScript::OnGameObjectCreate(), instance_steam_vault::instance_steam_vault_InstanceMapScript::OnGameObjectCreate(), instance_naxxramas::instance_naxxramas_InstanceMapScript::OnGameObjectCreate(), npc_high_overlord_saurfang_icc::OnGossipHello(), npc_muradin_bronzebeard_icc::OnGossipHello(), npc_high_overlord_saurfang_icc::OnGossipSelect(), npc_muradin_bronzebeard_icc::OnGossipSelect(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::OnPlayerEnter(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::OnPlayerEnter(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::OnPlayerEnter(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnPlayerEnter(), at_icc_saurfang_portal::OnTrigger(), at_thaddius_entrance::OnTrigger(), at_blackrock_stadium::OnTrigger(), instance_karazhan::instance_karazhan_InstanceMapScript::OnUnitDeath(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::OnUnitDeath(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnUnitDeath(), spell_dreamwalker_nightmare_cloud_aura::PeriodicTick(), instance_blackrock_spire::instance_blackrock_spireMapScript::ProcessEvent(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::ProcessEvent(), boss_gyth::boss_gythAI::Reset(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::Reset(), boss_rend_blackhand::boss_rend_blackhandAI::Reset(), npc_core_rager::npc_core_ragerAI::Reset(), boss_majordomo::boss_majordomoAI::Reset(), boss_archimonde::Reset(), npc_medivh_bm::Reset(), npc_xerestrasza::npc_xerestraszaAI::Reset(), boss_general_zarithrian::boss_general_zarithrianAI::Reset(), npc_blood_queen_lana_thel::npc_blood_queen_lana_thelAI::Reset(), boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI::Reset(), boss_professor_putricide::boss_professor_putricideAI::Reset(), npc_tirion_fordring_tft::npc_tirion_fordringAI::Reset(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::Reset(), npc_arthas_teleport_visual::npc_arthas_teleport_visualAI::Reset(), npc_icc_gauntlet_controller::npc_icc_gauntlet_controllerAI::Reset(), boss_four_horsemen::boss_four_horsemenAI::Reset(), boss_thaddius::boss_thaddiusAI::Reset(), npc_akama_shade::Reset(), boss_sartharion::boss_sartharionAI::RespawnDragons(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_blackrock_spire::instance_blackrock_spireMapScript::SetData(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::SetData(), instance_gundrak::instance_gundrak_InstanceMapScript::SetData(), boss_victor_nefarius::boss_victor_nefariusAI::sGossipSelect(), npc_akama_illidan::sGossipSelect(), instance_molten_core::instance_molten_core_InstanceMapScript::SummonMajordomoExecutus(), instance_blackrock_spire::instance_blackrock_spireMapScript::Update(), instance_naxxramas::instance_naxxramas_InstanceMapScript::Update(), npc_kiljaeden_controller::npc_kiljaeden_controllerAI::UpdateAI(), boss_mandokir::boss_mandokirAI::UpdateAI(), npc_time_rift::UpdateAI(), boss_jedoga_shadowseeker::UpdateAI(), boss_halion::boss_halionAI::UpdateAI(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::UpdateAI(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::UpdateAI(), npc_gunship_boarding_leader::npc_gunship_boarding_leaderAI::UpdateAI(), npc_gunship_boarding_add::npc_gunship_boarding_add_realAI::UpdateAI(), npc_gunship_mage::npc_gunship_mageAI::UpdateAI(), npc_gunship_gunner::npc_gunship_gunnerAI::UpdateAI(), npc_bone_spike::npc_bone_spikeAI::UpdateAI(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::UpdateAI(), npc_the_lich_king_controller::npc_the_lich_king_controllerAI::UpdateAI(), npc_valithria_cloud::npc_valithria_cloudAI::UpdateAI(), npc_gunship::npc_gunshipAI::UpdateAI(), and npc_gunship_rocketeer::npc_gunship_rocketeerAI::UpdateAI().

◆ GetBossStateName()

std::string InstanceScript::GetBossStateName ( uint8  state)
static
783{
784 // See enum EncounterState in InstanceScript.h
785 switch (state)
786 {
787 case NOT_STARTED:
788 return "NOT_STARTED";
789 case IN_PROGRESS:
790 return "IN_PROGRESS";
791 case FAIL:
792 return "FAIL";
793 case DONE:
794 return "DONE";
795 case SPECIAL:
796 return "SPECIAL";
797 case TO_BE_DECIDED:
798 return "TO_BE_DECIDED";
799 default:
800 return "INVALID";
801 }
802}
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ FAIL
Definition: InstanceScript.h:59
@ SPECIAL
Definition: InstanceScript.h:61
@ NOT_STARTED
Definition: InstanceScript.h:57

References DONE, FAIL, IN_PROGRESS, NOT_STARTED, SPECIAL, and TO_BE_DECIDED.

Referenced by instance_commandscript::HandleInstanceGetBossStateCommand(), instance_commandscript::HandleInstanceSetBossStateCommand(), and SmartScript::ProcessAction().

◆ GetCompletedEncounterMask()

uint32 InstanceScript::GetCompletedEncounterMask ( ) const
inline
253{ return completedEncounters; }

References completedEncounters.

Referenced by InstanceMap::AddPlayerToMap().

◆ GetCreature()

Creature * InstanceScript::GetCreature ( uint32  type)
101{
102 return instance->GetCreature(GetObjectGuid(type));
103}

References Map::GetCreature(), GetObjectGuid(), and instance.

Referenced by instance_blood_furnace::instance_blood_furnace_InstanceMapScript::ActivateCell(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::CallNextRajaxxLeader(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::CleanupInstance(), boss_attumen::DamageTaken(), boss_romulo::DamageTaken(), boss_halazzi::DamageTaken(), boss_illidari_council_memberAI::DamageTaken(), npc_akama_shade::DamageTaken(), boss_bug_trio::DamageTaken(), DespawnAll(), boss_julianne::DoAction(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::DoAction(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::DoAction(), instance_karazhan::instance_karazhan_InstanceMapScript::DoAction(), boss_illidan_stormrage::DoAction(), npc_maiev_illidan::DoAction(), boss_illidari_council::DoAction(), DoActions(), boss_razorgore::boss_razorgoreAI::DoChangePhase(), npc_time_rift::DoSummonAtRift(), boss_ahune::Emerge(), boss_bug_trio::EnterCombatWithTrio(), boss_attumen::EnterEvadeMode(), boss_illidan_stormrage::EnterEvadeMode(), boss_illidari_council::EnterEvadeMode(), boss_fathomguard_sharkkis::EnterEvadeMode(), boss_fathomguard_tidalvess::EnterEvadeMode(), boss_fathomguard_caribdis::EnterEvadeMode(), boss_ahune::EnterEvadeMode(), boss_halazzi::EnterPhase(), boss_bug_trio::EvadeAllBosses(), boss_ahune::ExecuteEvent(), boss_twinemperorsAI::GetTwin(), go_ossirian_crystal::go_ossirian_crystalAI::GossipHello(), go_chromaggus_lever::go_chromaggus_leverAI::GossipHello(), go_ahune_ice_stone::GossipSelect(), boss_warbringer_omrogg::HandleHeadTalk(), spell_illidari_council_circle_of_healing::HandleSharedRule(), npc_toxic_slime::InitializeAI(), boss_aeonus::IsSummonedBy(), boss_thekal::JustDied(), npc_zealot_lorkhan::JustDied(), npc_zealot_zath::JustDied(), boss_eye_of_cthun::JustDied(), npc_gunship::npc_gunshipAI::JustDied(), boss_fathomguard_sharkkis::JustDied(), boss_fathomguard_tidalvess::JustDied(), boss_fathomguard_caribdis::JustDied(), boss_ahune::JustDied(), npc_frozen_core::JustDied(), boss_dalliah_the_doomsayer::JustDied(), npc_lord_sanguinar::JustDied(), npc_capernian::JustDied(), npc_telonicus::JustDied(), boss_azgalor::JustDied(), npc_buru_egg::JustDied(), boss_kurinnaxx::JustDied(), npc_general_andorov::JustDied(), boss_cthun::JustDied(), boss_shade_of_akama::JustDied(), boss_fathomlord_karathress::JustDied(), boss_warchief_kargath_bladefist::JustDied(), npc_zealot_lorkhan::JustEngagedWith(), boss_illidari_council_memberAI::JustEngagedWith(), boss_dalliah_the_doomsayer::JustEngagedWith(), npc_buru_egg::JustEngagedWith(), boss_illidan_stormrage::JustEngagedWith(), boss_fathomguard_sharkkis::JustEngagedWith(), boss_fathomguard_tidalvess::JustEngagedWith(), boss_fathomguard_caribdis::JustEngagedWith(), boss_warchief_kargath_bladefist::JustEngagedWith(), boss_romulo::JustReachedHome(), boss_aeonus::JustReachedHome(), npc_akama_illidan::JustReachedHome(), npc_warchief_portal::JustSummoned(), boss_attumen::JustSummoned(), npc_hive_zara_larva::JustSummoned(), boss_eye_of_cthun::JustSummoned(), npc_creature_generator_akama::JustSummoned(), npc_buru_egg::JustSummoned(), boss_midnight::KilledUnit(), npc_earthen_ring_flamecaller::LookOpening(), boss_bug_trio::MovementInform(), npc_twilight_volunteer::MovementInform(), npc_akama_illidan::MovementInform(), boss_shade_of_akama::MovementInform(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::OnCreatureCreate(), instance_karazhan::instance_karazhan_InstanceMapScript::OnCreatureCreate(), instance_zulgurub::instance_zulgurub_InstanceMapScript::OnCreatureCreate(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::OnCreatureCreate(), instance_black_temple::instance_black_temple_InstanceMapScript::OnCreatureCreate(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::OnCreatureCreate(), instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::OnGameObjectCreate(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::OnGameObjectCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnPlayerEnter(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::OnPlayerEnter(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::OnUnitDeath(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::OnUnitDeath(), boss_kaelthas::PrepareAdvisors(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::ProcessEvent(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::ProcessEvent(), boss_thekal::Reset(), npc_ancient_wisp::Reset(), boss_illidan_stormrage::Reset(), boss_warchief_kargath_bladefist::Reset(), boss_dalliah_the_doomsayer::Reset(), boss_wrath_scryer_soccothrates::Reset(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::ResetRajaxxWaves(), boss_thekal::ReviveZealot(), boss_julianne::ScheduleCombat(), boss_romulo::ScheduleCombat(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::ScheduleNextPortal(), boss_cthun::ScheduleTasks(), boss_gathios_the_shatterer::SelectCouncilMember(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::SetBossState(), instance_black_temple::instance_black_temple_InstanceMapScript::SetBossState(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::SetData(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::SetData(), instance_arcatraz::instance_arcatraz_InstanceMapScript::SetData(), instance_ahnkahet::instance_ahnkahet_InstanceScript::SetData(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::SetData(), instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript::SetData(), boss_ahune::Submerge(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::Update(), npc_time_rift::UpdateAI(), npc_twilight_volunteer::UpdateAI(), boss_veras_darkshadow::UpdateAI(), npc_frozen_core::UpdateAI(), npc_ahune_bunny::UpdateAI(), npc_gunship::npc_gunshipAI::UpdateAI(), and npc_general_andorov::UpdateEscortAI().

◆ GetEncounterCount()

uint32 InstanceScript::GetEncounterCount ( ) const
inline

◆ GetGameObject()

◆ GetGuidData()

ObjectGuid InstanceScript::GetGuidData ( uint32  type) const
overridevirtual

Reimplemented from ZoneScript.

Reimplemented in instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_karazhan::instance_karazhan_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_blood_furnace::instance_blood_furnace_InstanceMapScript, instance_shattered_halls::instance_shattered_halls_InstanceMapScript, instance_arcatraz::instance_arcatraz_InstanceMapScript, instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, instance_the_eye::instance_the_eye_InstanceMapScript, instance_blackrock_spire::instance_blackrock_spireMapScript, instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_molten_core::instance_molten_core_InstanceMapScript, instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript, instance_scholomance::instance_scholomance_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript, instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_the_slave_pens::instance_the_slave_pens_InstanceMapScript, instance_zulgurub::instance_zulgurub_InstanceMapScript, instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, and instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript.

96{
97 return GetObjectGuid(type);
98}

References GetObjectGuid().

Referenced by boss_sjonnir::boss_sjonnirAI::ActivatePipe(), boss_freya_summons::boss_freya_summonsAI::boss_freya_summonsAI(), boss_twilight_halion::boss_twilight_halionAI::boss_twilight_halionAI(), boss_tyrannus::boss_tyrannusAI::boss_tyrannusAI(), boss_moira_bronzebeardAI::CastOnEmperorIfPossible(), spell_putricide_mutation_init::CheckRequirementInternal(), boss_prince_valanar_icc::boss_prince_valanarAI::CheckRoom(), violet_hold_trashAI::ClearDoorSealAura(), boss_mimiron::boss_mimironAI::CloseDoorAndButton(), boss_kologarn_eyebeam::boss_kologarn_eyebeamAI::DamageDealt(), npc_mograine::npc_mograineAI::DamageTaken(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::DamageTaken(), boss_halion::boss_halionAI::DamageTaken(), boss_twilight_halion::boss_twilight_halionAI::DamageTaken(), boss_the_lich_king::boss_the_lich_kingAI::DamageTaken(), npc_ulduar_flash_freeze::npc_ulduar_flash_freezeAI::DamageTaken(), boss_thorim_start_npcs::boss_thorim_start_npcsAI::DamageTaken(), boss_yoggsaron_brain::boss_yoggsaron_brainAI::DamageTaken(), boss_hodir::boss_hodirAI::DoAction(), npc_hor_lich_king::npc_hor_lich_kingAI::DoAction(), boss_taldaram::DoAction(), npc_high_overlord_saurfang_icc::npc_high_overlord_saurfangAI::DoAction(), npc_muradin_bronzebeard_icc::npc_muradin_bronzebeard_iccAI::DoAction(), boss_the_lich_king::boss_the_lich_kingAI::DoAction(), npc_strangulate_vehicle::npc_strangulate_vehicleAI::DoAction(), npc_crok_scourgebane::npc_crok_scourgebaneAI::DoAction(), npc_argent_captainAI::DoAction(), brann_bronzebeard::brann_bronzebeardAI::DoAction(), npc_ahune_bunny::DoAction(), npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI::DoAction(), boss_kalecgos::boss_kalecgosAI::DoAction(), boss_black_knight::boss_black_knightAI::DoAction(), boss_tyrannus::boss_tyrannusAI::DoAction(), npc_molten_golem::npc_molten_golemAI::DoAction(), boss_thorim_sif::boss_thorim_sifAI::DoAction(), npc_xt002_heart::npc_xt002_heartAI::DoAction(), boss_yoggsaron_sara::boss_yoggsaron_saraAI::DoAction(), boss_yoggsaron_brain::boss_yoggsaron_brainAI::DoAction(), npc_rocknot::npc_rocknotAI::DoGo(), boss_kiljaeden::boss_kiljaedenAI::EmpowerOrb(), boss_priestess_lackey_commonAI::EnterEvadeMode(), boss_sacrolash::boss_sacrolashAI::EnterEvadeMode(), boss_alythess::boss_alythessAI::EnterEvadeMode(), boss_halion::boss_halionAI::EnterEvadeMode(), boss_prince_keleseth_icc::boss_prince_kelesethAI::EnterEvadeMode(), boss_prince_taldaram_icc::boss_prince_taldaramAI::EnterEvadeMode(), boss_prince_valanar_icc::boss_prince_valanarAI::EnterEvadeMode(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::EnterEvadeMode(), boss_festergut::boss_festergutAI::EnterEvadeMode(), boss_rotface::boss_rotfaceAI::EnterEvadeMode(), boss_the_lich_king::boss_the_lich_kingAI::EnterEvadeMode(), npc_tirion_fordring_tft::npc_tirion_fordringAI::EnterEvadeMode(), npc_argent_captainAI::EnterEvadeMode(), boss_sartharion_tenebron::boss_sartharion_tenebronAI::ExecuteEvent(), spell_the_lich_king_restore_soul::FilterTargets(), boss_erekem::boss_erekemAI::GetChainHealTargetGUID(), npc_chesspiece::GetEnemyPiece(), npc_ulduar_harpoonfirestate::npc_ulduar_harpoonfirestateAI::GetHarpoonGunIdForThisHFS(), npc_chesspiece::GetLowestHpFriendlyPiece(), boss_twin_valkyrAI::GetSister(), boss_thorim::boss_thorimAI::GetThorimObject(), go_troll_cage::go_troll_cageAI::GossipHello(), boss_netherspite::HandleDoors(), spell_halion_twilight_division::HandleDummy(), npc_grimstone::npc_grimstoneAI::HandleGameObject(), npc_echo_of_medivh::HandlePieceJustDied(), spell_putricide_unbound_plague::HandleScript(), spell_putricide_mutated_transformation::HandleSummon(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::HealReceived(), go_troll_cage::go_troll_cageAI::initBlyCrewMember(), boss_urok_doomhowl::boss_urok_doomhowlAI::InitializeAI(), boss_warchief_kargath_bladefist::InitializeAI(), IsEncounterComplete(), npc_direbrew_minion::IsSummonedBy(), npc_onyx_flamecaller::npc_onyx_flamecallerAI::IsSummonedBy(), npc_raging_spirit::npc_raging_spiritAI::IsSummonedBy(), npc_suppresser::npc_suppresserAI::IsSummonedBy(), npc_strangulate_vehicle::npc_strangulate_vehicleAI::IsSummonedBy(), boss_emperor_dagran_thaurissan::boss_draganthaurissanAI::JustDied(), boss_rend_blackhand::boss_rend_blackhandAI::JustDied(), npc_chesspiece::JustDied(), boss_shade_of_aran::JustDied(), npc_kilrek::JustDied(), boss_sacrolash::boss_sacrolashAI::JustDied(), boss_alythess::boss_alythessAI::JustDied(), boss_kiljaeden::boss_kiljaedenAI::JustDied(), npc_zulian_prowler::npc_zulian_prowlerAI::JustDied(), boss_rajaxx::JustDied(), boss_sartharion_dragonAI::JustDied(), npc_memory::npc_memoryAI::JustDied(), boss_jormungarAI::JustDied(), boss_prince_keleseth_icc::boss_prince_kelesethAI::JustDied(), boss_prince_taldaram_icc::boss_prince_taldaramAI::JustDied(), boss_prince_valanar_icc::boss_prince_valanarAI::JustDied(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustDied(), boss_festergut::boss_festergutAI::JustDied(), npc_gunship::npc_gunshipAI::JustDied(), boss_rotface::boss_rotfaceAI::JustDied(), npc_little_ooze::npc_little_oozeAI::JustDied(), npc_big_ooze::npc_big_oozeAI::JustDied(), npc_raging_spirit::npc_raging_spiritAI::JustDied(), npc_spirit_warden::npc_spirit_wardenAI::JustDied(), boss_sister_svalna::boss_sister_svalnaAI::JustDied(), boss_thaddius_summon::boss_thaddius_summonAI::JustDied(), boss_drakos::boss_drakosAI::JustDied(), boss_sjonnir::boss_sjonnirAI::JustDied(), brann_bronzebeard::brann_bronzebeardAI::JustDied(), boss_steelbreaker::boss_steelbreakerAI::JustDied(), boss_runemaster_molgeim::boss_runemaster_molgeimAI::JustDied(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::JustDied(), npc_auriaya_feral_defender::npc_auriaya_feral_defenderAI::JustDied(), npc_ulduar_saronite_vapors::npc_ulduar_saronite_vaporsAI::JustDied(), npc_ulduar_saronite_animus::npc_ulduar_saronite_animusAI::JustDied(), npc_ulduar_hodir_priest::npc_ulduar_hodir_priestAI::JustDied(), npc_ulduar_hodir_druid::npc_ulduar_hodir_druidAI::JustDied(), npc_ulduar_hodir_shaman::npc_ulduar_hodir_shamanAI::JustDied(), npc_ulduar_hodir_mage::npc_ulduar_hodir_mageAI::JustDied(), boss_kologarn::boss_kologarnAI::JustDied(), boss_kologarn_arms::boss_kologarn_armsAI::JustDied(), boss_thorim_start_npcs::boss_thorim_start_npcsAI::JustDied(), boss_thorim_runic_colossus::boss_thorim_runic_colossusAI::JustDied(), boss_xt002::boss_xt002AI::JustDied(), npc_xt002_heart::npc_xt002_heartAI::JustDied(), boss_yoggsaron::boss_yoggsaronAI::JustDied(), boss_skarvald_the_constructor::boss_skarvald_the_constructorAI::JustDied(), boss_dalronn_the_controller::boss_dalronn_the_controllerAI::JustDied(), npc_massive_jormungar::npc_massive_jormungarAI::JustDied(), npc_ferocious_rhino::npc_ferocious_rhinoAI::JustDied(), npc_ravenous_furbolg::npc_ravenous_furbolgAI::JustDied(), npc_frenzied_worgen::npc_frenzied_worgenAI::JustDied(), boss_skadi::boss_skadiAI::JustDied(), npc_ichor_globule::npc_ichor_globuleAI::JustDied(), violet_hold_trashAI::JustDied(), boss_kelidan_the_breaker::JustDied(), boss_the_maker::JustDied(), boss_brutallus::boss_brutallusAI::JustDied(), boss_epoch_hunter::JustDied(), boss_baltharus_the_warborn::boss_baltharus_the_warbornAI::JustDied(), boss_halion::boss_halionAI::JustDied(), boss_twilight_halion::boss_twilight_halionAI::JustDied(), boss_faerlina::boss_faerlinaAI::JustDied(), boss_four_horsemen::boss_four_horsemenAI::JustDied(), boss_gothik::boss_gothikAI::JustDied(), boss_kelthuzad::boss_kelthuzadAI::JustDied(), boss_noth::boss_nothAI::JustDied(), boss_thaddius::boss_thaddiusAI::JustDied(), boss_flame_leviathan_defense_turret::boss_flame_leviathan_defense_turretAI::JustDied(), boss_freya_elder_stonebark::boss_freya_elder_stonebarkAI::JustDied(), boss_freya_elder_brightleaf::boss_freya_elder_brightleafAI::JustDied(), boss_freya_elder_ironbranch::boss_freya_elder_ironbranchAI::JustDied(), boss_warchief_kargath_bladefist::JustDied(), boss_shade_of_aran::JustEngagedWith(), boss_bigbadwolf::JustEngagedWith(), npc_healing_ward::JustEngagedWith(), npc_pos_deathwhisper_necrolyte::npc_pos_deathwhisper_necrolyteAI::JustEngagedWith(), npc_risen_archmage::npc_risen_archmageAI::JustEngagedWith(), boss_sister_svalna::boss_sister_svalnaAI::JustEngagedWith(), boss_sjonnir::boss_sjonnirAI::JustEngagedWith(), npc_auriaya_sanctum_sentry::npc_auriaya_sanctum_sentryAI::JustEngagedWith(), boss_freya::boss_freyaAI::JustEngagedWith(), boss_kologarn::boss_kologarnAI::JustEngagedWith(), boss_xt002::boss_xt002AI::JustEngagedWith(), boss_the_maker::JustEngagedWith(), boss_sartharion::boss_sartharionAI::JustEngagedWith(), boss_thaddius_summon::boss_thaddius_summonAI::JustEngagedWith(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::JustEngagedWith(), boss_priestess_lackey_commonAI::JustEngagedWith(), boss_sacrolash::boss_sacrolashAI::JustEngagedWith(), boss_alythess::boss_alythessAI::JustEngagedWith(), boss_prince_keleseth_icc::boss_prince_kelesethAI::JustEngagedWith(), boss_prince_taldaram_icc::boss_prince_taldaramAI::JustEngagedWith(), boss_prince_valanar_icc::boss_prince_valanarAI::JustEngagedWith(), boss_festergut::boss_festergutAI::JustEngagedWith(), boss_rotface::boss_rotfaceAI::JustEngagedWith(), boss_anubrekhan::boss_anubrekhanAI::JustEngagedWith(), boss_faerlina::boss_faerlinaAI::JustEngagedWith(), boss_four_horsemen::boss_four_horsemenAI::JustEngagedWith(), boss_gothik::boss_gothikAI::JustEngagedWith(), boss_heigan::boss_heiganAI::JustEngagedWith(), boss_kelthuzad::boss_kelthuzadAI::JustEngagedWith(), boss_loatheb::boss_loathebAI::JustEngagedWith(), boss_maexxna::boss_maexxnaAI::JustEngagedWith(), boss_noth::boss_nothAI::JustEngagedWith(), boss_steelbreaker::boss_steelbreakerAI::JustEngagedWith(), boss_runemaster_molgeim::boss_runemaster_molgeimAI::JustEngagedWith(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::JustEngagedWith(), boss_skarvald_the_constructor::boss_skarvald_the_constructorAI::JustEngagedWith(), boss_dalronn_the_controller::boss_dalronn_the_controllerAI::JustEngagedWith(), boss_erekem::boss_erekemAI::JustEngagedWith(), npc_erekem_guard::npc_erekem_guardAI::JustEngagedWith(), boss_arlokk::boss_arlokkAI::JustReachedHome(), boss_yoggsaron_cloud::boss_yoggsaron_cloudAI::JustSummoned(), boss_captain_skarloc::JustSummoned(), boss_sartharion_dragonAI::JustSummoned(), npc_gothik_trigger::npc_gothik_triggerAI::JustSummoned(), boss_priestess_lackey_commonAI::KilledUnit(), boss_mandokir::boss_mandokirAI::KilledUnit(), npc_chesspiece::MovementInform(), npc_hive_zara_larva::MovementInform(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::MovementInform(), boss_professor_putricide::boss_professor_putricideAI::MovementInform(), npc_tirion_fordring_tft::npc_tirion_fordringAI::MovementInform(), npc_valkyr_shadowguard::npc_valkyr_shadowguardAI::MovementInform(), npc_gunship_boarding_addAI::MovementInform(), npc_sergeant_bly::npc_sergeant_blyAI::MovementInform(), npc_hor_lich_king::npc_hor_lich_kingAI::MovementInform(), npc_xt002_scrapbot::npc_xt002_scrapbotAI::MovementInform(), npc_big_ooze::npc_big_oozeAI::npc_big_oozeAI(), npc_little_ooze::npc_little_oozeAI::npc_little_oozeAI(), npc_pos_leader_second::npc_pos_leader_secondAI::npc_pos_leader_secondAI(), npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI::npc_pos_martin_or_gorkun_secondAI(), npc_ulduar_saronite_animus::npc_ulduar_saronite_animusAI::npc_ulduar_saronite_animusAI(), spell_blood_queen_vampiric_bite::OnCast(), achievement_yogg_saron_darkness::OnCheck(), achievement_yogg_saron_he_waits_dreaming::OnCheck(), go_palehoof_sphere::OnGossipHello(), npc_ulduar_expedition_commander::OnGossipHello(), go_harpoon_canon::OnGossipHello(), go_ulduar_working_harpoon::OnGossipHello(), npc_ulduar_expedition_commander::OnGossipSelect(), at_thaddius_entrance::OnTrigger(), at_tyrannus_event_starter::OnTrigger(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::OpenDoors(), IgbTeleportOnVictoryCheck::operator()(), npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::ReorderInstance(), boss_rend_blackhand::boss_rend_blackhandAI::Reset(), boss_shade_of_aran::Reset(), npc_image_of_medivh::npc_image_of_medivhAI::Reset(), npc_zulian_prowler::npc_zulian_prowlerAI::Reset(), boss_mandokir::boss_mandokirAI::Reset(), boss_tyrannus::boss_tyrannusAI::Reset(), boss_the_lich_king::boss_the_lich_kingAI::Reset(), boss_anubrekhan::boss_anubrekhanAI::Reset(), boss_faerlina::boss_faerlinaAI::Reset(), boss_four_horsemen::boss_four_horsemenAI::Reset(), boss_gothik::boss_gothikAI::Reset(), boss_heigan::boss_heiganAI::Reset(), boss_kelthuzad::boss_kelthuzadAI::Reset(), boss_loatheb::boss_loathebAI::Reset(), boss_maexxna::boss_maexxnaAI::Reset(), boss_noth::boss_nothAI::Reset(), boss_thaddius::boss_thaddiusAI::Reset(), boss_sjonnir::boss_sjonnirAI::Reset(), boss_kologarn::boss_kologarnAI::Reset(), boss_xt002::boss_xt002AI::Reset(), npc_xt002_scrapbot::npc_xt002_scrapbotAI::Reset(), npc_xt002_boombot::npc_xt002_boombotAI::Reset(), boss_yoggsaron_sara::boss_yoggsaron_saraAI::Reset(), boss_palehoof::boss_palehoofAI::Reset(), boss_the_maker::Reset(), npc_warden_mellichar::npc_warden_mellicharAI::Reset(), brann_bronzebeard::brann_bronzebeardAI::ResetEvent(), npc_ahune_bunny::ResetFlameCallers(), boss_mimiron::boss_mimironAI::ResetGameObjects(), npc_kiljaeden_controller::npc_kiljaeden_controllerAI::ResetOrbs(), RespawnAssemblyOfIron(), boss_sartharion::boss_sartharionAI::RespawnDragons(), boss_svala::boss_svalaAI::SetData(), npc_ulduar_harpoonfirestate::npc_ulduar_harpoonfirestateAI::SetData(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::SetData(), boss_darkmaster_gandling::boss_darkmaster_gandlingAI::SetGate(), npc_crok_scourgebane::npc_crok_scourgebaneAI::SetGUID(), npc_tirion_fordring_tft::npc_tirion_fordringAI::sGossipSelect(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::SpellHit(), boss_razorscale::boss_razorscaleAI::SpellHit(), npc_chesspiece::SpellHitTarget(), boss_yoggsaron_voice::boss_yoggsaron_voiceAI::SpellHitTarget(), npc_gothik_trigger::npc_gothik_triggerAI::SummonedCreatureDespawn(), boss_sartharion_shadron::boss_sartharion_shadronAI::SummonedCreatureDies(), npc_sergeant_bly::npc_sergeant_blyAI::switchFactionIfAlive(), brann_bronzebeard::brann_bronzebeardAI::SwitchHeadVisaul(), npc_rocknot::npc_rocknotAI::UpdateAI(), boss_rend_blackhand::boss_rend_blackhandAI::UpdateAI(), npc_core_rager::npc_core_ragerAI::UpdateAI(), boss_majordomo::boss_majordomoAI::UpdateAI(), npc_chesspiece::UpdateAI(), npc_mograine::npc_mograineAI::UpdateAI(), boss_high_inquisitor_whitemane::boss_high_inquisitor_whitemaneAI::UpdateAI(), npc_madrigosa::npc_madrigosaAI::UpdateAI(), boss_kalecgos::boss_kalecgosAI::UpdateAI(), boss_sathrovarr::boss_sathrovarrAI::UpdateAI(), boss_kiljaeden::boss_kiljaedenAI::UpdateAI(), npc_harrison_jones::npc_harrison_jonesAI::UpdateAI(), npc_arthas::npc_arthasAI::UpdateAI(), npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::UpdateAI(), npc_sergeant_bly::npc_sergeant_blyAI::UpdateAI(), boss_sartharion::boss_sartharionAI::UpdateAI(), boss_general_zarithrian::boss_general_zarithrianAI::UpdateAI(), boss_halion::boss_halionAI::UpdateAI(), boss_twilight_halion::boss_twilight_halionAI::UpdateAI(), npc_halion_controller::npc_halion_controllerAI::UpdateAI(), npc_snobold_vassal::npc_snobold_vassalAI::UpdateAI(), boss_jormungarAI::UpdateAI(), npc_fos_corrupted_soul_fragment::npc_fos_corrupted_soul_fragmentAI::UpdateAI(), npc_hor_leader::npc_hor_leaderAI::UpdateAI(), npc_hor_lich_king::npc_hor_lich_kingAI::UpdateAI(), npc_hor_leader_second::npc_hor_leader_secondAI::UpdateAI(), boss_krick::boss_krickAI::UpdateAI(), boss_tyrannus::boss_tyrannusAI::UpdateAI(), npc_pos_leader::npc_pos_leaderAI::UpdateAI(), npc_pos_after_first_boss::npc_pos_after_first_bossAI::UpdateAI(), npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI::UpdateAI(), npc_pos_leader_second::npc_pos_leader_secondAI::UpdateAI(), boss_prince_valanar_icc::boss_prince_valanarAI::UpdateAI(), npc_blood_queen_lana_thel::npc_blood_queen_lana_thelAI::UpdateAI(), npc_high_overlord_saurfang_icc::npc_high_overlord_saurfangAI::UpdateAI(), npc_muradin_bronzebeard_icc::npc_muradin_bronzebeard_iccAI::UpdateAI(), boss_festergut::boss_festergutAI::UpdateAI(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::UpdateAI(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::UpdateAI(), npc_cult_fanatic::npc_cult_fanaticAI::UpdateAI(), npc_cult_adherent::npc_cult_adherentAI::UpdateAI(), boss_rotface::boss_rotfaceAI::UpdateAI(), npc_tirion_fordring_tft::npc_tirion_fordringAI::UpdateAI(), npc_valkyr_shadowguard::npc_valkyr_shadowguardAI::UpdateAI(), npc_strangulate_vehicle::npc_strangulate_vehicleAI::UpdateAI(), npc_terenas_menethil::npc_terenas_menethilAI::UpdateAI(), npc_valithria_cloud::npc_valithria_cloudAI::UpdateAI(), npc_crok_scourgebane::npc_crok_scourgebaneAI::UpdateAI(), boss_gothik::boss_gothikAI::UpdateAI(), boss_kelthuzad::boss_kelthuzadAI::UpdateAI(), boss_thaddius_summon::boss_thaddius_summonAI::UpdateAI(), npc_power_spark::npc_power_sparkAI::UpdateAI(), boss_sjonnir::boss_sjonnirAI::UpdateAI(), boss_algalon_the_observer::boss_algalon_the_observerAI::UpdateAI(), npc_brann_bronzebeard_algalon::npc_brann_bronzebeard_algalonAI::UpdateAI(), boss_hodir::boss_hodirAI::UpdateAI(), npc_ulduar_hodir_priest::npc_ulduar_hodir_priestAI::UpdateAI(), npc_ulduar_hodir_druid::npc_ulduar_hodir_druidAI::UpdateAI(), npc_ulduar_hodir_shaman::npc_ulduar_hodir_shamanAI::UpdateAI(), npc_ulduar_hodir_mage::npc_ulduar_hodir_mageAI::UpdateAI(), boss_kologarn_eyebeam::boss_kologarn_eyebeamAI::UpdateAI(), boss_mimiron::boss_mimironAI::UpdateAI(), boss_razorscale::boss_razorscaleAI::UpdateAI(), npc_ulduar_expedition_engineer::npc_ulduar_expedition_engineerAI::UpdateAI(), boss_yoggsaron_sara::boss_yoggsaron_saraAI::UpdateAI(), boss_palehoof::boss_palehoofAI::UpdateAI(), boss_svala::boss_svalaAI::UpdateAI(), boss_erekem::boss_erekemAI::UpdateAI(), npc_ahune_bunny::UpdateAI(), npc_warden_mellichar::npc_warden_mellicharAI::UpdateAI(), npc_ichor_globule::npc_ichor_globuleAI::UpdateAI(), npc_suppresser::npc_suppresserAI::UpdateAI(), npc_xt002_scrapbot::npc_xt002_scrapbotAI::UpdateAI(), npc_xt002_boombot::npc_xt002_boombotAI::UpdateAI(), npc_halion_controller::npc_halion_controllerAI::UpdateCorporeality(), brann_bronzebeard::brann_bronzebeardAI::UpdateEscortAI(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::UpdateRunes(), npc_arthas::npc_arthasAI::WaypointReached(), npc_barnes::npc_barnesAI::WaypointReached(), npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::WaypointReached(), npc_taretha::npc_tarethaAI::WaypointReached(), npc_crok_scourgebane::npc_crok_scourgebaneAI::WaypointReached(), and npc_crok_scourgebane::npc_crok_scourgebaneAI::WaypointStart().

◆ GetObjectGuid()

ObjectGuid InstanceScript::GetObjectGuid ( uint32  type) const
84{
85 ObjectGuidMap::const_iterator i = _objectGuids.find(type);
86
87 if (i != _objectGuids.end())
88 {
89 return i->second;
90 }
91
92 return ObjectGuid::Empty;
93}
static ObjectGuid const Empty
Definition: ObjectGuid.h:120

References _objectGuids, and ObjectGuid::Empty.

Referenced by DoRespawnCreature(), GetCreature(), GetGameObject(), and GetGuidData().

◆ GetPersistentData()

◆ GetSaveData()

std::string InstanceScript::GetSaveData ( )
virtual

Reimplemented in instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_deadmines::instance_deadmines_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, and instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript.

475{
477
478 std::ostringstream saveStream;
479
480 WriteSaveDataHeaders(saveStream);
481 WriteSaveDataBossStates(saveStream);
482 WritePersistentData(saveStream);
483 WriteSaveDataMore(saveStream);
484
486
487 return saveStream.str();
488}
#define OUT_SAVE_INST_DATA_COMPLETE
Definition: InstanceScript.h:29
#define OUT_SAVE_INST_DATA
Definition: InstanceScript.h:28
void WriteSaveDataBossStates(std::ostringstream &data)
Definition: InstanceScript.cpp:498
void WritePersistentData(std::ostringstream &data)
Definition: InstanceScript.cpp:506
void WriteSaveDataHeaders(std::ostringstream &data)
Definition: InstanceScript.cpp:490
virtual void WriteSaveDataMore(std::ostringstream &)
Definition: InstanceScript.h:315

References OUT_SAVE_INST_DATA, OUT_SAVE_INST_DATA_COMPLETE, WritePersistentData(), WriteSaveDataBossStates(), WriteSaveDataHeaders(), and WriteSaveDataMore().

Referenced by SaveToDB().

◆ GetStoredGameObjectState()

uint8 InstanceScript::GetStoredGameObjectState ( ObjectGuid::LowType  spawnId) const
805{
806 auto i = _objectStateMap.find(spawnId);
807
808 if (i != _objectStateMap.end())
809 {
810 return i->second;
811 }
812
813 return 3; // Any state higher than 2 to get the default state for the object we are loading.
814}
ObjectStateMap _objectStateMap
Definition: InstanceScript.h:328

References _objectStateMap.

Referenced by instance_deadmines::instance_deadmines_InstanceMapScript::OnGameObjectCreate().

◆ HandleGameObject()

void InstanceScript::HandleGameObject ( ObjectGuid  guid,
bool  open,
GameObject go = nullptr 
)
111{
112 if (!go)
113 go = instance->GetGameObject(GUID);
114 if (go)
116 else
117 {
118 LOG_DEBUG("scripts.ai", "InstanceScript: HandleGameObject failed");
119 }
120}
@ GO_STATE_READY
Definition: GameObjectData.h:691
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
void SetGoState(GOState state)
Definition: GameObject.cpp:2477

References Map::GetGameObject(), GO_STATE_ACTIVE, GO_STATE_READY, instance, LOG_DEBUG, and GameObject::SetGoState().

Referenced by instance_blood_furnace::instance_blood_furnace_InstanceMapScript::ActivateCell(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::AddWave1(), instance_zulaman::instance_zulaman_InstanceMapScript::CheckInstanceStatus(), boss_taldaram::DoAction(), npc_high_overlord_saurfang_icc::npc_high_overlord_saurfangAI::DoAction(), npc_muradin_bronzebeard_icc::npc_muradin_bronzebeard_iccAI::DoAction(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::DoWipe1(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomcheck(), go_chromaggus_lever::go_chromaggus_leverAI::GossipHello(), npc_grimstone::npc_grimstoneAI::HandleGameObject(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::InstanceCleanup(), instance_violet_hold::instance_violet_hold_InstanceMapScript::InstanceCleanup(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::InstanceCleanup(), boss_skadi::boss_skadiAI::JustDied(), boss_kelidan_the_breaker::JustDied(), boss_the_maker::JustDied(), boss_the_maker::JustEngagedWith(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::MovementInform(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::OnCreatureCreate(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::OnGameObjectCreate(), instance_uldaman::instance_uldaman_InstanceMapScript::OnGameObjectCreate(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::OnGameObjectCreate(), instance_maraudon::instance_maraudon_InstanceMapScript::OnGameObjectCreate(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::OnGameObjectCreate(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::OnGameObjectCreate(), instance_blackrock_spire::instance_blackrock_spireMapScript::OnGameObjectCreate(), instance_ahnkahet::instance_ahnkahet_InstanceScript::OnGameObjectCreate(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::OnGameObjectCreate(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::OnGameObjectCreate(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnGameObjectCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnGameObjectCreate(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::OnGameObjectCreate(), instance_violet_hold::instance_violet_hold_InstanceMapScript::OnGameObjectCreate(), instance_black_temple::instance_black_temple_InstanceMapScript::OnGameObjectCreate(), instance_steam_vault::instance_steam_vault_InstanceMapScript::OnGameObjectCreate(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::OnGameObjectCreate(), instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript::OnGameObjectCreate(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::OnUnitDeath(), boss_the_maker::Reset(), npc_warden_mellichar::npc_warden_mellicharAI::Reset(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::ResetPrisons(), instance_karazhan::instance_karazhan_InstanceMapScript::SetBossState(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::SetBossState(), instance_arcatraz::instance_arcatraz_InstanceMapScript::SetBossState(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::SetData(), instance_karazhan::instance_karazhan_InstanceMapScript::SetData(), instance_scholomance::instance_scholomance_InstanceMapScript::SetData(), instance_uldaman::instance_uldaman_InstanceMapScript::SetData(), instance_zulaman::instance_zulaman_InstanceMapScript::SetData(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetData(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::SetData(), instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript::SetData(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SetData(), instance_arcatraz::instance_arcatraz_InstanceMapScript::SetData(), instance_ahnkahet::instance_ahnkahet_InstanceScript::SetData(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetData(), instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::SetData(), boss_darkmaster_gandling::boss_darkmaster_gandlingAI::SetGate(), instance_violet_hold::instance_violet_hold_InstanceMapScript::StartBossEncounter(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::TombOfSevenReset(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::Update(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::Update(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::Update(), instance_violet_hold::instance_violet_hold_InstanceMapScript::Update(), boss_halion::boss_halionAI::UpdateAI(), npc_hor_leader::npc_hor_leaderAI::UpdateAI(), npc_warden_mellichar::npc_warden_mellicharAI::UpdateAI(), and npc_barnes::npc_barnesAI::WaypointReached().

◆ Initialize()

virtual void InstanceScript::Initialize ( )
inlinevirtual

Reimplemented in instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_deadmines::instance_deadmines_InstanceMapScript, instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunken_temple::instance_sunken_temple_InstanceMapScript, instance_uldaman::instance_uldaman_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript, instance_hyjal::instance_mount_hyjal_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_dire_maul::instance_dire_maul_InstanceMapScript, instance_maraudon::instance_maraudon_InstanceMapScript, instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript, instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript, instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript, instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_gundrak::instance_gundrak_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_nexus::instance_nexus_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript, instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript, instance_the_underbog::instance_the_underbog_InstanceMapScript, instance_blood_furnace::instance_blood_furnace_InstanceMapScript, instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript, instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript, and instance_shattered_halls::instance_shattered_halls_InstanceMapScript.

151{}

Referenced by InstanceMap::CreateInstanceScript().

◆ IsAreaTriggerDone()

bool InstanceScript::IsAreaTriggerDone ( uint32  id) const
inline
264{ return _activatedAreaTriggers.find(id) != _activatedAreaTriggers.end(); }
std::unordered_set< uint32 > _activatedAreaTriggers
Definition: InstanceScript.h:330

References _activatedAreaTriggers.

◆ IsBossDone()

bool InstanceScript::IsBossDone ( uint32  bossId) const
inline
278{ return GetBossState(bossId) == DONE; };
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235

References DONE, and GetBossState().

Referenced by AllBossesDone().

◆ IsEncounterInProgress()

bool InstanceScript::IsEncounterInProgress ( ) const
virtual

Reimplemented in instance_zulaman::instance_zulaman_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, and instance_violet_hold::instance_violet_hold_InstanceMapScript.

123{
124 for (std::vector<BossInfo>::const_iterator itr = bosses.begin(); itr != bosses.end(); ++itr)
125 if (itr->state == IN_PROGRESS)
126 return true;
127
128 return false;
129}

References bosses, and IN_PROGRESS.

Referenced by InstanceMap::CannotEnter(), Spell::EffectSanctuary(), spell_teron_gorefiend_shadow_of_death::HandleEffectRemove(), AuraEffect::HandleFeignDeath(), WorldSession::HandleSetRaidDifficultyOpcode(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), npc_oculus_drake::npc_oculus_drakeAI::UpdateAI(), and npc_halion_controller::npc_halion_controllerAI::UpdateCorporeality().

◆ Load()

void InstanceScript::Load ( char const *  data)
virtual

Reimplemented in instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_deadmines::instance_deadmines_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, and instance_zulaman::instance_zulaman_InstanceMapScript.

414{
415 if (!data)
416 {
418 return;
419 }
420
421 OUT_LOAD_INST_DATA(data);
422
423 std::istringstream loadStream(data);
424
425 if (ReadSaveDataHeaders(loadStream))
426 {
427 ReadSaveDataBossStates(loadStream);
428 ReadSavePersistentData(loadStream);
429 ReadSaveDataMore(loadStream);
430 }
431 else
433
435}
#define OUT_LOAD_INST_DATA_FAIL
Definition: InstanceScript.h:32
#define OUT_LOAD_INST_DATA_COMPLETE
Definition: InstanceScript.h:31
#define OUT_LOAD_INST_DATA(a)
Definition: InstanceScript.h:30
virtual void ReadSaveDataMore(std::istringstream &)
Definition: InstanceScript.h:311
void ReadSavePersistentData(std::istringstream &data)
Definition: InstanceScript.cpp:466
bool ReadSaveDataHeaders(std::istringstream &data)
Definition: InstanceScript.cpp:437
void ReadSaveDataBossStates(std::istringstream &data)
Definition: InstanceScript.cpp:451

References OUT_LOAD_INST_DATA, OUT_LOAD_INST_DATA_COMPLETE, OUT_LOAD_INST_DATA_FAIL, ReadSaveDataBossStates(), ReadSaveDataHeaders(), ReadSaveDataMore(), and ReadSavePersistentData().

Referenced by InstanceMap::CreateInstanceScript().

◆ LoadBossBoundaries()

◆ LoadDoorData()

void InstanceScript::LoadDoorData ( DoorData const *  data)
protected
162{
163 while (data->entry)
164 {
165 if (data->bossId < bosses.size())
166 doors.insert(std::make_pair(data->entry, DoorInfo(&bosses[data->bossId], data->type)));
167
168 ++data;
169 }
170 LOG_DEBUG("scripts.ai", "InstanceScript::LoadDoorData: {} doors loaded.", uint64(doors.size()));
171}
std::uint64_t uint64
Definition: Define.h:106

References bosses, DoorData::bossId, doors, DoorData::entry, LOG_DEBUG, and DoorData::type.

Referenced by instance_gundrak::instance_gundrak_InstanceMapScript::Initialize(), instance_nexus::instance_nexus_InstanceMapScript::Initialize(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::Initialize(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::Initialize(), instance_ahnkahet::instance_ahnkahet_InstanceScript::instance_ahnkahet_InstanceScript(), instance_arcatraz::instance_arcatraz_InstanceMapScript::instance_arcatraz_InstanceMapScript(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::instance_azjol_nerub_InstanceScript(), instance_black_temple::instance_black_temple_InstanceMapScript::instance_black_temple_InstanceMapScript(), instance_blackrock_spire::instance_blackrock_spireMapScript::instance_blackrock_spireMapScript(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::instance_blackwing_lair_InstanceMapScript(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::instance_blood_furnace_InstanceMapScript(), instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript::instance_drak_tharon_keep_InstanceScript(), instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript::instance_gruuls_lair_InstanceMapScript(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::instance_icecrown_citadel_InstanceMapScript(), instance_karazhan::instance_karazhan_InstanceMapScript::instance_karazhan_InstanceMapScript(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::instance_magisters_terrace_InstanceMapScript(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::instance_magtheridons_lair_InstanceMapScript(), instance_mechanar::instance_mechanar_InstanceMapScript::instance_mechanar_InstanceMapScript(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::instance_mount_hyjal_InstanceMapScript(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::instance_ruby_sanctum_InstanceMapScript(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::instance_sethekk_halls_InstanceMapScript(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::instance_shadow_labyrinth_InstanceMapScript(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::instance_sunwell_plateau_InstanceMapScript(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::instance_temple_of_ahnqiraj_InstanceMapScript(), instance_the_eye::instance_the_eye_InstanceMapScript::instance_the_eye_InstanceMapScript(), and instance_zulgurub::instance_zulgurub_InstanceMapScript::instance_zulgurub_InstanceMapScript().

◆ LoadInstanceSavedGameobjectStateData()

void InstanceScript::LoadInstanceSavedGameobjectStateData ( )
745{
746 _objectStateMap.clear();
747
749 stmt->SetData(0, instance->GetInstanceId());
750
751 if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
752 {
753 Field* fields;
754
755 do
756 {
757 fields = result->Fetch();
758 StoreGameObjectState(fields[0].Get<uint32>(), fields[1].Get<uint8>());
759
760 } while (result->NextRow());
761 }
762}
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: DatabaseEnvFwd.h:46
@ CHAR_SELECT_INSTANCE_SAVED_DATA
Definition: CharacterDatabase.h:524
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
Definition: PreparedStatement.h:158
Class used to access individual fields of database query result.
Definition: Field.h:99
Acore::Types::is_default< T > SetData(const uint8 index, T value)
Definition: PreparedStatement.h:78
void StoreGameObjectState(ObjectGuid::LowType spawnId, uint8 state)
Definition: InstanceScript.h:273
uint32 GetInstanceId() const
Definition: Map.h:419

References _objectStateMap, CHAR_SELECT_INSTANCE_SAVED_DATA, CharacterDatabase, Map::GetInstanceId(), instance, PreparedStatementBase::SetData(), and StoreGameObjectState().

Referenced by InstanceMap::CreateInstanceScript().

◆ LoadMinionData()

◆ LoadObjectData() [1/2]

void InstanceScript::LoadObjectData ( ObjectData const *  creatureData,
ObjectData const *  gameObjectData 
)
protected
174{
175 if (creatureData)
176 {
178 }
179
180 if (gameObjectData)
181 {
183 }
184
185 LOG_DEBUG("scripts", "InstanceScript::LoadObjectData: {} objects loaded.", _creatureInfo.size() + _gameObjectInfo.size());
186}
ObjectData const creatureData[]
Definition: instance_blackwing_lair.cpp:45
ObjectData const gameObjectData[]
Definition: instance_karazhan.cpp:53
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:173

References _creatureInfo, _gameObjectInfo, creatureData, gameObjectData, LoadObjectData(), and LOG_DEBUG.

Referenced by instance_zulaman::instance_zulaman_InstanceMapScript::Initialize(), instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::Initialize(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::Initialize(), instance_the_underbog::instance_the_underbog_InstanceMapScript::Initialize(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::Initialize(), instance_ahnkahet::instance_ahnkahet_InstanceScript::instance_ahnkahet_InstanceScript(), instance_arcatraz::instance_arcatraz_InstanceMapScript::instance_arcatraz_InstanceMapScript(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::instance_azjol_nerub_InstanceScript(), instance_black_temple::instance_black_temple_InstanceMapScript::instance_black_temple_InstanceMapScript(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::instance_blackwing_lair_InstanceMapScript(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::instance_blood_furnace_InstanceMapScript(), instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript::instance_gruuls_lair_InstanceMapScript(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::instance_icecrown_citadel_InstanceMapScript(), instance_karazhan::instance_karazhan_InstanceMapScript::instance_karazhan_InstanceMapScript(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::instance_magisters_terrace_InstanceMapScript(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::instance_mount_hyjal_InstanceMapScript(), instance_naxxramas::instance_naxxramas_InstanceMapScript::instance_naxxramas_InstanceMapScript(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::instance_ruins_of_ahnqiraj_InstanceMapScript(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::instance_sethekk_halls_InstanceMapScript(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::instance_shadow_labyrinth_InstanceMapScript(), instance_steam_vault::instance_steam_vault_InstanceMapScript::instance_steam_vault_InstanceMapScript(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::instance_temple_of_ahnqiraj_InstanceMapScript(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::instance_the_black_morass_InstanceMapScript(), instance_the_eye::instance_the_eye_InstanceMapScript::instance_the_eye_InstanceMapScript(), instance_the_slave_pens::instance_the_slave_pens_InstanceMapScript::instance_the_slave_pens_InstanceMapScript(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::instance_utgarde_keep_InstanceMapScript(), instance_zulgurub::instance_zulgurub_InstanceMapScript::instance_zulgurub_InstanceMapScript(), and LoadObjectData().

◆ LoadObjectData() [2/2]

void InstanceScript::LoadObjectData ( ObjectData const *  creatureData,
ObjectInfoMap objectInfo 
)
staticprivate
189{
190 while (data->entry)
191 {
192 objectInfo[data->entry] = data->type;
193 ++data;
194 }
195}

References ObjectData::entry, and ObjectData::type.

◆ MarkAreaTriggerDone()

void InstanceScript::MarkAreaTriggerDone ( uint32  id)
inline
262{ _activatedAreaTriggers.insert(id); }

References _activatedAreaTriggers.

◆ OnCreatureCreate()

void InstanceScript::OnCreatureCreate ( Creature creature)
overridevirtual

Reimplemented from ZoneScript.

Reimplemented in instance_scholomance::instance_scholomance_InstanceMapScript, instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_blackrock_spire::instance_blackrock_spireMapScript, instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_molten_core::instance_molten_core_InstanceMapScript, instance_gnomeregan::instance_gnomeregan_InstanceMapScript, instance_karazhan::instance_karazhan_InstanceMapScript, instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript, instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript, instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunken_temple::instance_sunken_temple_InstanceMapScript, instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript, instance_uldaman::instance_uldaman_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_zulgurub::instance_zulgurub_InstanceMapScript, instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript, instance_hyjal::instance_mount_hyjal_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_the_black_morass::instance_the_black_morass_InstanceMapScript, instance_dire_maul::instance_dire_maul_InstanceMapScript, instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript, instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript, instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_azjol_nerub::instance_azjol_nerub_InstanceScript, instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_nexus::instance_nexus_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript, instance_black_temple::instance_black_temple_InstanceMapScript, instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript, instance_the_slave_pens::instance_the_slave_pens_InstanceMapScript, instance_blood_furnace::instance_blood_furnace_InstanceMapScript, instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript, instance_shattered_halls::instance_shattered_halls_InstanceMapScript, instance_the_eye::instance_the_eye_InstanceMapScript, instance_mechanar::instance_mechanar_InstanceMapScript, instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, and instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript.

59{
60 AddObject(creature);
61 AddMinion(creature);
62}
void AddMinion(Creature *minion, bool add=true)
Definition: InstanceScript.cpp:334

References AddMinion(), and AddObject().

Referenced by instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::OnCreatureCreate(), instance_karazhan::instance_karazhan_InstanceMapScript::OnCreatureCreate(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::OnCreatureCreate(), instance_zulaman::instance_zulaman_InstanceMapScript::OnCreatureCreate(), instance_zulgurub::instance_zulgurub_InstanceMapScript::OnCreatureCreate(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::OnCreatureCreate(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::OnCreatureCreate(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::OnCreatureCreate(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::OnCreatureCreate(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::OnCreatureCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnCreatureCreate(), instance_naxxramas::instance_naxxramas_InstanceMapScript::OnCreatureCreate(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::OnCreatureCreate(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::OnCreatureCreate(), instance_black_temple::instance_black_temple_InstanceMapScript::OnCreatureCreate(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::OnCreatureCreate(), instance_the_slave_pens::instance_the_slave_pens_InstanceMapScript::OnCreatureCreate(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::OnCreatureCreate(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::OnCreatureCreate(), and instance_the_eye::instance_the_eye_InstanceMapScript::OnCreatureCreate().

◆ OnCreatureRemove()

◆ OnGameObjectCreate()

void InstanceScript::OnGameObjectCreate ( GameObject go)
overridevirtual

Reimplemented from ZoneScript.

Reimplemented in instance_deadmines::instance_deadmines_InstanceMapScript, instance_gnomeregan::instance_gnomeregan_InstanceMapScript, instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript, instance_sunken_temple::instance_sunken_temple_InstanceMapScript, instance_uldaman::instance_uldaman_InstanceMapScript, instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_dire_maul::instance_dire_maul_InstanceMapScript, instance_maraudon::instance_maraudon_InstanceMapScript, instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_gundrak::instance_gundrak_InstanceMapScript, instance_nexus::instance_nexus_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_mechanar::instance_mechanar_InstanceMapScript, instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_blackrock_spire::instance_blackrock_spireMapScript, instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_molten_core::instance_molten_core_InstanceMapScript, instance_karazhan::instance_karazhan_InstanceMapScript, instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript, instance_scholomance::instance_scholomance_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_zulgurub::instance_zulgurub_InstanceMapScript, instance_hyjal::instance_mount_hyjal_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript, instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript, instance_ahnkahet::instance_ahnkahet_InstanceScript, instance_azjol_nerub::instance_azjol_nerub_InstanceScript, instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, instance_black_temple::instance_black_temple_InstanceMapScript, instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript, instance_steam_vault::instance_steam_vault_InstanceMapScript, instance_blood_furnace::instance_blood_furnace_InstanceMapScript, instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript, instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript, instance_arcatraz::instance_arcatraz_InstanceMapScript, instance_the_eye::instance_the_eye_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, and instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript.

71{
72 AddObject(go);
73 AddDoor(go);
74 sScriptMgr->AfterInstanceGameObjectCreate(instance, go);
75}
#define sScriptMgr
Definition: ScriptMgr.h:708
void AddDoor(GameObject *door, bool add=true)
Definition: InstanceScript.cpp:307

References AddDoor(), AddObject(), instance, and sScriptMgr.

Referenced by instance_blackrock_spire::instance_blackrock_spireMapScript::OnGameObjectCreate(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::OnGameObjectCreate(), instance_karazhan::instance_karazhan_InstanceMapScript::OnGameObjectCreate(), instance_zulgurub::instance_zulgurub_InstanceMapScript::OnGameObjectCreate(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::OnGameObjectCreate(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::OnGameObjectCreate(), instance_ahnkahet::instance_ahnkahet_InstanceScript::OnGameObjectCreate(), instance_black_temple::instance_black_temple_InstanceMapScript::OnGameObjectCreate(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::OnGameObjectCreate(), instance_steam_vault::instance_steam_vault_InstanceMapScript::OnGameObjectCreate(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::OnGameObjectCreate(), instance_the_eye::instance_the_eye_InstanceMapScript::OnGameObjectCreate(), and instance_naxxramas::instance_naxxramas_InstanceMapScript::OnGameObjectCreate().

◆ OnGameObjectRemove()

◆ OnPlayerAreaUpdate()

virtual void InstanceScript::OnPlayerAreaUpdate ( Player ,
uint32  ,
uint32   
)
inlinevirtual

◆ OnPlayerEnter()

virtual void InstanceScript::OnPlayerEnter ( Player )
inlinevirtual

Reimplemented in instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_molten_core::instance_molten_core_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_the_black_morass::instance_the_black_morass_InstanceMapScript, instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_shattered_halls::instance_shattered_halls_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, and instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript.

185{}

Referenced by InstanceMap::AddPlayerToMap().

◆ OnPlayerInWaterStateUpdate()

virtual void InstanceScript::OnPlayerInWaterStateUpdate ( Player ,
bool   
)
inlinevirtual

◆ ReadSaveDataBossStates()

void InstanceScript::ReadSaveDataBossStates ( std::istringstream &  data)
protected
452{
453 uint32 bossId = 0;
454 for (std::vector<BossInfo>::iterator i = bosses.begin(); i != bosses.end(); ++i, ++bossId)
455 {
456 uint32 buff;
457 data >> buff;
458 if (buff == IN_PROGRESS || buff == FAIL || buff == SPECIAL)
459 buff = NOT_STARTED;
460
461 if (buff < TO_BE_DECIDED)
462 SetBossState(bossId, EncounterState(buff));
463 }
464}
std::uint32_t uint32
Definition: Define.h:107
EncounterState
Definition: InstanceScript.h:56
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:351

References bosses, FAIL, IN_PROGRESS, NOT_STARTED, SetBossState(), SPECIAL, and TO_BE_DECIDED.

Referenced by Load().

◆ ReadSaveDataHeaders()

bool InstanceScript::ReadSaveDataHeaders ( std::istringstream &  data)
protected
438{
439 for (char header : headers)
440 {
441 char buff;
442 data >> buff;
443
444 if (header != buff)
445 return false;
446 }
447
448 return true;
449}
std::vector< char > headers
Definition: InstanceScript.h:320

References headers.

Referenced by Load().

◆ ReadSaveDataMore()

virtual void InstanceScript::ReadSaveDataMore ( std::istringstream &  )
inlineprotectedvirtual

Reimplemented in instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_gnomeregan::instance_gnomeregan_InstanceMapScript, instance_scholomance::instance_scholomance_InstanceMapScript, instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunken_temple::instance_sunken_temple_InstanceMapScript, instance_uldaman::instance_uldaman_InstanceMapScript, instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_dire_maul::instance_dire_maul_InstanceMapScript, instance_maraudon::instance_maraudon_InstanceMapScript, instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript, instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, and instance_shattered_halls::instance_shattered_halls_InstanceMapScript.

311{ }

Referenced by Load().

◆ ReadSavePersistentData()

void InstanceScript::ReadSavePersistentData ( std::istringstream &  data)
protected
467{
468 for (uint32 i = 0; i < persistentData.size(); ++i)
469 {
470 data >> persistentData[i];
471 }
472}

References persistentData.

Referenced by Load().

◆ RemoveDoor()

◆ RemoveMinion()

◆ RemoveObject() [1/3]

void InstanceScript::RemoveObject ( Creature obj)
protected
268{
269 AddObject(obj, false);
270}

References AddObject().

Referenced by OnCreatureRemove(), and OnGameObjectRemove().

◆ RemoveObject() [2/3]

void InstanceScript::RemoveObject ( GameObject obj)
protected
282{
283 AddObject(obj, false);
284}

References AddObject().

◆ RemoveObject() [3/3]

void InstanceScript::RemoveObject ( WorldObject obj,
uint32  type 
)
protected
303{
304 AddObject(obj, type, false);
305}

References AddObject().

◆ ResetAreaTriggerDone()

void InstanceScript::ResetAreaTriggerDone ( uint32  id)
inline

◆ SaveToDB()

void InstanceScript::SaveToDB ( )
42{
43 std::string data = GetSaveData();
44 //if (data.empty()) // pussywizard: encounterMask can be updated and theres no reason to not save
45 // return;
46
47 // pussywizard:
48 InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(instance->GetInstanceId());
49 if (save)
50 save->SetInstanceData(data);
51
53 stmt->SetData(0, data);
54 stmt->SetData(1, instance->GetInstanceId());
55 CharacterDatabase.Execute(stmt);
56}
#define sInstanceSaveMgr
Definition: InstanceSaveMgr.h:202
@ CHAR_UPD_INSTANCE_SAVE_DATA
Definition: CharacterDatabase.h:212
Definition: InstanceSaveMgr.h:56
void SetInstanceData(std::string str)
Definition: InstanceSaveMgr.h:70
virtual std::string GetSaveData()
Definition: InstanceScript.cpp:474

References CHAR_UPD_INSTANCE_SAVE_DATA, CharacterDatabase, Map::GetInstanceId(), GetSaveData(), instance, PreparedStatementBase::SetData(), InstanceSave::SetInstanceData(), and sInstanceSaveMgr.

Referenced by BossAI::_EnterEvadeMode(), BossAI::_JustDied(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::DoCheckDedicatedInsanity(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::HandleDropAttempt(), instance_commandscript::HandleInstanceSaveDataCommand(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::InstanceCleanup(), boss_victor_nefarius::boss_victor_nefariusAI::JustDied(), boss_mandokir::boss_mandokirAI::JustDied(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::OnUnitDeath(), instance_stratholme::instance_stratholme_InstanceMapScript::OnUnitDeath(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::OnUnitDeath(), instance_naxxramas::instance_naxxramas_InstanceMapScript::SetBossState(), SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_naxxramas::instance_naxxramas_InstanceMapScript::SetData(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::SetData(), instance_deadmines::instance_deadmines_InstanceMapScript::SetData(), instance_gnomeregan::instance_gnomeregan_InstanceMapScript::SetData(), instance_scholomance::instance_scholomance_InstanceMapScript::SetData(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::SetData(), instance_stratholme::instance_stratholme_InstanceMapScript::SetData(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::SetData(), instance_uldaman::instance_uldaman_InstanceMapScript::SetData(), instance_zulaman::instance_zulaman_InstanceMapScript::SetData(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::SetData(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetData(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::SetData(), instance_dire_maul::instance_dire_maul_InstanceMapScript::SetData(), instance_maraudon::instance_maraudon_InstanceMapScript::SetData(), instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::SetData(), instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript::SetData(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::SetData(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetData(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::SetData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetData(), instance_oculus::instance_oculus_InstanceMapScript::SetData(), instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript::SetData(), instance_ulduar::instance_ulduar_InstanceMapScript::SetData(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::SetData(), instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript::SetData(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::SetData(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SetData(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::SetData(), instance_ahnkahet::instance_ahnkahet_InstanceScript::SetData(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetData(), instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::SetData(), instance_stratholme::instance_stratholme_InstanceMapScript::Update(), instance_zulaman::instance_zulaman_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::Update(), and instance_violet_hold::instance_violet_hold_InstanceMapScript::Update().

◆ SendEncounterUnit()

void InstanceScript::SendEncounterUnit ( uint32  type,
Unit unit = nullptr,
uint8  param1 = 0,
uint8  param2 = 0 
)
714{
715 // size of this packet is at most 15 (usually less)
717 data << uint32(type);
718
719 switch (type)
720 {
724 data << unit->GetPackGUID();
725 data << uint8(param1);
726 break;
730 data << uint8(param1);
731 break;
733 data << uint8(param1);
734 data << uint8(param2);
735 break;
737 default:
738 break;
739 }
740
741 instance->SendToPlayers(&data);
742}
@ ENCOUNTER_FRAME_ENABLE_OBJECTIVE
Definition: InstanceScript.h:49
@ ENCOUNTER_FRAME_DISENGAGE
Definition: InstanceScript.h:46
@ ENCOUNTER_FRAME_UPDATE_PRIORITY
Definition: InstanceScript.h:47
@ ENCOUNTER_FRAME_DISABLE_OBJECTIVE
Definition: InstanceScript.h:51
@ ENCOUNTER_FRAME_UPDATE_OBJECTIVE
Definition: InstanceScript.h:50
@ ENCOUNTER_FRAME_REFRESH_FRAMES
Definition: InstanceScript.h:52
@ ENCOUNTER_FRAME_ADD_TIMER
Definition: InstanceScript.h:48
@ ENCOUNTER_FRAME_ENGAGE
Definition: InstanceScript.h:45
@ SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT
Definition: Opcodes.h:562
PackedGuid const & GetPackGUID() const
Definition: Object.h:111
void SendToPlayers(WorldPacket const *data) const
Definition: Map.cpp:2754
Definition: WorldPacket.h:27

References ENCOUNTER_FRAME_ADD_TIMER, ENCOUNTER_FRAME_DISABLE_OBJECTIVE, ENCOUNTER_FRAME_DISENGAGE, ENCOUNTER_FRAME_ENABLE_OBJECTIVE, ENCOUNTER_FRAME_ENGAGE, ENCOUNTER_FRAME_REFRESH_FRAMES, ENCOUNTER_FRAME_UPDATE_OBJECTIVE, ENCOUNTER_FRAME_UPDATE_PRIORITY, Object::GetPackGUID(), instance, Map::SendToPlayers(), and SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT.

Referenced by boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::DamageTaken(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::DoAction(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::DoAction(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::DoAction(), boss_halion::boss_halionAI::EnterEvadeMode(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::HealReceived(), boss_prince_keleseth_icc::boss_prince_kelesethAI::JustDied(), boss_prince_taldaram_icc::boss_prince_taldaramAI::JustDied(), boss_prince_valanar_icc::boss_prince_valanarAI::JustDied(), npc_gunship::npc_gunshipAI::JustDied(), boss_halion::boss_halionAI::JustDied(), boss_twilight_halion::boss_twilight_halionAI::JustDied(), boss_halion::boss_halionAI::JustEngagedWith(), boss_prince_keleseth_icc::boss_prince_kelesethAI::JustEngagedWith(), boss_prince_taldaram_icc::boss_prince_taldaramAI::JustEngagedWith(), boss_prince_valanar_icc::boss_prince_valanarAI::JustEngagedWith(), boss_prince_keleseth_icc::boss_prince_kelesethAI::JustReachedHome(), boss_prince_taldaram_icc::boss_prince_taldaramAI::JustReachedHome(), boss_prince_valanar_icc::boss_prince_valanarAI::JustReachedHome(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::Reset(), and boss_twilight_halion::boss_twilight_halionAI::UpdateAI().

◆ ServerAllowsTwoSideGroups()

bool InstanceScript::ServerAllowsTwoSideGroups ( )
inline
232{ return sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP); }
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP
Definition: IWorld.h:80
#define sWorld
Definition: World.h:444

References CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP, and sWorld.

◆ SetBossNumber()

void InstanceScript::SetBossNumber ( uint32  number)
inlineprotected
285{ bosses.resize(number); }

References bosses.

Referenced by instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::Initialize(), instance_gundrak::instance_gundrak_InstanceMapScript::Initialize(), instance_nexus::instance_nexus_InstanceMapScript::Initialize(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::Initialize(), instance_the_underbog::instance_the_underbog_InstanceMapScript::Initialize(), instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript::Initialize(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::Initialize(), instance_ahnkahet::instance_ahnkahet_InstanceScript::instance_ahnkahet_InstanceScript(), instance_arcatraz::instance_arcatraz_InstanceMapScript::instance_arcatraz_InstanceMapScript(), instance_auchenai_crypts::instance_auchenai_crypts_InstanceMapScript::instance_auchenai_crypts_InstanceMapScript(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::instance_azjol_nerub_InstanceScript(), instance_black_temple::instance_black_temple_InstanceMapScript::instance_black_temple_InstanceMapScript(), instance_blackrock_spire::instance_blackrock_spireMapScript::instance_blackrock_spireMapScript(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::instance_blackwing_lair_InstanceMapScript(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::instance_blood_furnace_InstanceMapScript(), instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript::instance_drak_tharon_keep_InstanceScript(), instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript::instance_gruuls_lair_InstanceMapScript(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::instance_icecrown_citadel_InstanceMapScript(), instance_karazhan::instance_karazhan_InstanceMapScript::instance_karazhan_InstanceMapScript(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::instance_magisters_terrace_InstanceMapScript(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::instance_magtheridons_lair_InstanceMapScript(), instance_mana_tombs::instance_mana_tombs_InstanceMapScript::instance_mana_tombs_InstanceMapScript(), instance_mechanar::instance_mechanar_InstanceMapScript::instance_mechanar_InstanceMapScript(), instance_molten_core::instance_molten_core_InstanceMapScript::instance_molten_core_InstanceMapScript(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::instance_mount_hyjal_InstanceMapScript(), instance_naxxramas::instance_naxxramas_InstanceMapScript::instance_naxxramas_InstanceMapScript(), instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript::instance_obsidian_sanctum_InstanceMapScript(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::instance_ruby_sanctum_InstanceMapScript(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::instance_ruins_of_ahnqiraj_InstanceMapScript(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::instance_sethekk_halls_InstanceMapScript(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::instance_shadow_labyrinth_InstanceMapScript(), instance_steam_vault::instance_steam_vault_InstanceMapScript::instance_steam_vault_InstanceMapScript(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::instance_sunwell_plateau_InstanceMapScript(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::instance_temple_of_ahnqiraj_InstanceMapScript(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::instance_the_black_morass_InstanceMapScript(), instance_the_botanica::instance_the_botanica_InstanceMapScript::instance_the_botanica_InstanceMapScript(), instance_the_eye::instance_the_eye_InstanceMapScript::instance_the_eye_InstanceMapScript(), and instance_zulgurub::instance_zulgurub_InstanceMapScript::instance_zulgurub_InstanceMapScript().

◆ SetBossState()

bool InstanceScript::SetBossState ( uint32  id,
EncounterState  state 
)
virtual

Reimplemented in instance_molten_core::instance_molten_core_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_steam_vault::instance_steam_vault_InstanceMapScript, instance_nexus::instance_nexus_InstanceMapScript, instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript, instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript, instance_blackrock_spire::instance_blackrock_spireMapScript, instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_karazhan::instance_karazhan_InstanceMapScript, instance_zulgurub::instance_zulgurub_InstanceMapScript, instance_the_black_morass::instance_the_black_morass_InstanceMapScript, instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript, instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript, instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript, instance_gundrak::instance_gundrak_InstanceMapScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_black_temple::instance_black_temple_InstanceMapScript, instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript, instance_blood_furnace::instance_blood_furnace_InstanceMapScript, instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript, and instance_arcatraz::instance_arcatraz_InstanceMapScript.

352{
353 if (id < bosses.size())
354 {
355 BossInfo* bossInfo = &bosses[id];
356 sScriptMgr->OnBeforeSetBossState(id, state, bossInfo->state, instance);
357 if (bossInfo->state == TO_BE_DECIDED) // loading
358 {
359 bossInfo->state = state;
360 return false;
361 }
362 else
363 {
364 if (bossInfo->state == state)
365 return false;
366
367 if (state == DONE)
368 for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
369 if ((*i)->isWorldBoss() && (*i)->IsAlive())
370 return false;
371
372 bossInfo->state = state;
373 SaveToDB();
374 }
375
376 for (uint32 type = 0; type < MAX_DOOR_TYPES; ++type)
377 for (DoorSet::iterator i = bossInfo->door[type].begin(); i != bossInfo->door[type].end(); ++i)
378 UpdateDoorState(*i);
379
380 for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
381 UpdateMinionState(*i, state);
382
383 return true;
384 }
385 return false;
386}
@ MAX_DOOR_TYPES
Definition: InstanceScript.h:70
EncounterState state
Definition: InstanceScript.h:113
void UpdateMinionState(Creature *minion, EncounterState state)
Definition: InstanceScript.cpp:197
void SaveToDB()
Definition: InstanceScript.cpp:41

References bosses, DONE, BossInfo::door, instance, MAX_DOOR_TYPES, BossInfo::minion, SaveToDB(), sScriptMgr, BossInfo::state, TO_BE_DECIDED, UpdateDoorState(), and UpdateMinionState().

Referenced by BossAI::_EnterEvadeMode(), BossAI::_JustDied(), BossAI::_JustEngagedWith(), BossAI::_Reset(), npc_warden_mellichar::npc_warden_mellicharAI::DamageTaken(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::DoAction(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::DoAction(), boss_broggok::DoAction(), boss_hadronox::boss_hadronoxAI::DoAction(), npc_icc_gauntlet_controller::npc_icc_gauntlet_controllerAI::DoAction(), boss_dorothee::EnterEvadeMode(), boss_roar::EnterEvadeMode(), boss_strawman::EnterEvadeMode(), boss_tinhead::EnterEvadeMode(), boss_crone::EnterEvadeMode(), boss_bigbadwolf::EnterEvadeMode(), boss_julianne::EnterEvadeMode(), boss_romulo::EnterEvadeMode(), boss_gyth::boss_gythAI::EnterEvadeMode(), boss_rend_blackhand::boss_rend_blackhandAI::EnterEvadeMode(), boss_sindragosa::boss_sindragosaAI::EnterEvadeMode(), boss_the_lich_king::boss_the_lich_kingAI::EnterEvadeMode(), boss_ouro::EnterEvadeMode(), npc_dirt_mound::EnterEvadeMode(), instance_commandscript::HandleInstanceSetBossStateCommand(), boss_valithria_dreamwalker::boss_valithria_dreamwalkerAI::HealReceived(), boss_gyth::boss_gythAI::JustDied(), boss_overlord_wyrmthalak::boss_overlordwyrmthalakAI::JustDied(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::JustDied(), boss_rend_blackhand::boss_rend_blackhandAI::JustDied(), boss_victor_nefarius::boss_victor_nefariusAI::JustDied(), boss_crone::JustDied(), boss_bigbadwolf::JustDied(), boss_julianne::JustDied(), boss_romulo::JustDied(), boss_felblood_kaelthas::JustDied(), boss_priestess_delrissa::JustDied(), boss_selin_fireheart::JustDied(), boss_sacrolash::boss_sacrolashAI::JustDied(), boss_alythess::boss_alythessAI::JustDied(), boss_kiljaeden::boss_kiljaedenAI::JustDied(), boss_mandokir::boss_mandokirAI::JustDied(), npc_ohgan::npc_ohganAI::JustDied(), npc_vilebranch_speaker::JustDied(), boss_sartharion_dragonAI::JustDied(), boss_prince_valanar_icc::boss_prince_valanarAI::JustDied(), npc_gunship::npc_gunshipAI::JustDied(), npc_icc_gauntlet_controller::npc_icc_gauntlet_controllerAI::JustDied(), boss_novos::boss_novosAI::JustDied(), boss_sartharion_dragonAI::JustEngagedWith(), boss_felblood_kaelthas::JustEngagedWith(), boss_priestess_delrissa::JustEngagedWith(), boss_selin_fireheart::JustEngagedWith(), boss_lord_marrowgar::JustEngagedWith(), boss_olm_the_summoner::JustEngagedWith(), boss_kiggler_the_crazed::JustEngagedWith(), boss_blindeye_the_seer::JustEngagedWith(), boss_krosh_firehand::JustEngagedWith(), boss_the_lich_king::boss_the_lich_kingAI::JustEngagedWith(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::JustEngagedWith(), boss_trollgore::boss_trollgoreAI::JustEngagedWith(), boss_prince_valanar_icc::boss_prince_valanarAI::JustEngagedWith(), boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI::JustEngagedWith(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustEngagedWith(), boss_lady_deathwhisper::boss_lady_deathwhisperAI::JustEngagedWith(), boss_professor_putricide::boss_professor_putricideAI::JustEngagedWith(), boss_sindragosa::boss_sindragosaAI::JustEngagedWith(), boss_prince_valanar_icc::boss_prince_valanarAI::JustReachedHome(), boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustReachedHome(), boss_festergut::boss_festergutAI::JustReachedHome(), boss_lord_marrowgar::JustReachedHome(), boss_professor_putricide::boss_professor_putricideAI::JustReachedHome(), boss_rotface::boss_rotfaceAI::JustReachedHome(), boss_mandokir::boss_mandokirAI::MovementInform(), boss_professor_putricide::boss_professor_putricideAI::MovementInform(), npc_akama_illidan::PathEndReached(), SmartScript::ProcessAction(), ReadSaveDataBossStates(), boss_gyth::boss_gythAI::Reset(), boss_rend_blackhand::boss_rend_blackhandAI::Reset(), boss_majordomo::boss_majordomoAI::Reset(), boss_felblood_kaelthas::Reset(), boss_priestess_delrissa::Reset(), boss_selin_fireheart::Reset(), npc_kiljaeden_controller::npc_kiljaeden_controllerAI::Reset(), boss_mandokir::boss_mandokirAI::Reset(), boss_ouro::Reset(), boss_novos::boss_novosAI::Reset(), boss_prince_valanar_icc::boss_prince_valanarAI::Reset(), boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI::Reset(), npc_green_dragon_combat_trigger::npc_green_dragon_combat_triggerAI::Reset(), npc_icc_gauntlet_controller::npc_icc_gauntlet_controllerAI::Reset(), boss_olm_the_summoner::Reset(), boss_kiggler_the_crazed::Reset(), boss_blindeye_the_seer::Reset(), boss_krosh_firehand::Reset(), boss_grand_warlock_nethekurse::Reset(), npc_warden_mellichar::npc_warden_mellicharAI::Reset(), instance_molten_core::instance_molten_core_InstanceMapScript::SetBossState(), instance_naxxramas::instance_naxxramas_InstanceMapScript::SetBossState(), instance_steam_vault::instance_steam_vault_InstanceMapScript::SetBossState(), instance_nexus::instance_nexus_InstanceMapScript::SetBossState(), instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript::SetBossState(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::SetBossState(), instance_blackrock_spire::instance_blackrock_spireMapScript::SetBossState(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetBossState(), instance_karazhan::instance_karazhan_InstanceMapScript::SetBossState(), instance_zulgurub::instance_zulgurub_InstanceMapScript::SetBossState(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::SetBossState(), instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::SetBossState(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::SetBossState(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::SetBossState(), instance_gundrak::instance_gundrak_InstanceMapScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_black_temple::instance_black_temple_InstanceMapScript::SetBossState(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::SetBossState(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::SetBossState(), instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript::SetBossState(), instance_arcatraz::instance_arcatraz_InstanceMapScript::SetBossState(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::SetData(), boss_shade_of_akama::SpellHit(), npc_barnes::npc_barnesAI::StartEvent(), boss_rend_blackhand::boss_rend_blackhandAI::SummonedCreatureDespawn(), boss_priestess_delrissa::SummonedCreatureDies(), boss_majordomo::boss_majordomoAI::SummonedCreatureDies(), npc_kiljaeden_controller::npc_kiljaeden_controllerAI::SummonedCreatureDies(), npc_warden_mellichar::npc_warden_mellicharAI::SummonedCreatureDies(), boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::UpdateAI(), boss_rend_blackhand::boss_rend_blackhandAI::UpdateAI(), boss_kalec::boss_kalecAI::UpdateAI(), and npc_halion_controller::npc_halion_controllerAI::UpdateAI().

◆ SetCompletedEncountersMask()

void InstanceScript::SetCompletedEncountersMask ( uint32  newMask,
bool  save 
)
695{
696 if (completedEncounters == newMask)
697 return;
698 completedEncounters = newMask;
699 // pussywizard:
700 if (save)
701 {
702 InstanceSave* iSave = sInstanceSaveMgr->GetInstanceSave(instance->GetInstanceId());
703 if (iSave)
705
708 stmt->SetData(1, instance->GetInstanceId());
709 CharacterDatabase.Execute(stmt);
710 }
711}
@ CHAR_UPD_INSTANCE_SAVE_ENCOUNTERMASK
Definition: CharacterDatabase.h:213
void SetCompletedEncounterMask(uint32 mask)
Definition: InstanceSaveMgr.h:72

References CHAR_UPD_INSTANCE_SAVE_ENCOUNTERMASK, CharacterDatabase, completedEncounters, Map::GetInstanceId(), instance, InstanceSave::SetCompletedEncounterMask(), PreparedStatementBase::SetData(), and sInstanceSaveMgr.

Referenced by InstanceMap::CreateInstanceScript().

◆ SetHeaders()

void InstanceScript::SetHeaders ( std::string const &  dataHeaders)
protected
139{
140 for (char header : dataHeaders)
141 {
142 if (isalpha(header))
143 {
144 headers.push_back(header);
145 }
146 }
147}

References headers.

Referenced by instance_uldaman::instance_uldaman_InstanceMapScript::Initialize(), instance_zulaman::instance_zulaman_InstanceMapScript::Initialize(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::Initialize(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::Initialize(), instance_dire_maul::instance_dire_maul_InstanceMapScript::Initialize(), instance_maraudon::instance_maraudon_InstanceMapScript::Initialize(), instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::Initialize(), instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::Initialize(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::Initialize(), instance_nexus::instance_nexus_InstanceMapScript::Initialize(), instance_oculus::instance_oculus_InstanceMapScript::Initialize(), instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::Initialize(), instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript::Initialize(), instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript::Initialize(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::Initialize(), instance_violet_hold::instance_violet_hold_InstanceMapScript::Initialize(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::Initialize(), instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript::Initialize(), instance_ahnkahet::instance_ahnkahet_InstanceScript::instance_ahnkahet_InstanceScript(), instance_arcatraz::instance_arcatraz_InstanceMapScript::instance_arcatraz_InstanceMapScript(), instance_auchenai_crypts::instance_auchenai_crypts_InstanceMapScript::instance_auchenai_crypts_InstanceMapScript(), instance_azjol_nerub::instance_azjol_nerub_InstanceScript::instance_azjol_nerub_InstanceScript(), instance_black_temple::instance_black_temple_InstanceMapScript::instance_black_temple_InstanceMapScript(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::instance_blackrock_depths_InstanceMapScript(), instance_blackrock_spire::instance_blackrock_spireMapScript::instance_blackrock_spireMapScript(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::instance_blackwing_lair_InstanceMapScript(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::instance_blood_furnace_InstanceMapScript(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::instance_culling_of_stratholme_InstanceMapScript(), instance_deadmines::instance_deadmines_InstanceMapScript::instance_deadmines_InstanceMapScript(), instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript::instance_drak_tharon_keep_InstanceScript(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::instance_forge_of_souls_InstanceScript(), instance_gnomeregan::instance_gnomeregan_InstanceMapScript::instance_gnomeregan_InstanceMapScript(), instance_gruuls_lair::instance_gruuls_lair_InstanceMapScript::instance_gruuls_lair_InstanceMapScript(), instance_gundrak::instance_gundrak_InstanceMapScript::instance_gundrak_InstanceMapScript(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::instance_halls_of_reflection_InstanceMapScript(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::instance_icecrown_citadel_InstanceMapScript(), instance_karazhan::instance_karazhan_InstanceMapScript::instance_karazhan_InstanceMapScript(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::instance_magisters_terrace_InstanceMapScript(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::instance_magtheridons_lair_InstanceMapScript(), instance_mana_tombs::instance_mana_tombs_InstanceMapScript::instance_mana_tombs_InstanceMapScript(), instance_mechanar::instance_mechanar_InstanceMapScript::instance_mechanar_InstanceMapScript(), instance_molten_core::instance_molten_core_InstanceMapScript::instance_molten_core_InstanceMapScript(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::instance_mount_hyjal_InstanceMapScript(), instance_naxxramas::instance_naxxramas_InstanceMapScript::instance_naxxramas_InstanceMapScript(), instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript::instance_obsidian_sanctum_InstanceMapScript(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::instance_pit_of_saron_InstanceScript(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::instance_ruby_sanctum_InstanceMapScript(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::instance_ruins_of_ahnqiraj_InstanceMapScript(), instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::instance_scarlet_monastery_InstanceMapScript(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::instance_sethekk_halls_InstanceMapScript(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::instance_shadowfang_keep_InstanceMapScript(), instance_steam_vault::instance_steam_vault_InstanceMapScript::instance_steam_vault_InstanceMapScript(), instance_stratholme::instance_stratholme_InstanceMapScript::instance_stratholme_InstanceMapScript(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::instance_sunken_temple_InstanceMapScript(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::instance_sunwell_plateau_InstanceMapScript(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::instance_temple_of_ahnqiraj_InstanceMapScript(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::instance_the_black_morass_InstanceMapScript(), instance_the_botanica::instance_the_botanica_InstanceMapScript::instance_the_botanica_InstanceMapScript(), instance_the_eye::instance_the_eye_InstanceMapScript::instance_the_eye_InstanceMapScript(), instance_the_slave_pens::instance_the_slave_pens_InstanceMapScript::instance_the_slave_pens_InstanceMapScript(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::instance_trial_of_the_champion_InstanceMapScript(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::instance_trial_of_the_crusader_InstanceMapScript(), instance_ulduar::instance_ulduar_InstanceMapScript::instance_ulduar_InstanceMapScript(), and instance_zulgurub::instance_zulgurub_InstanceMapScript::instance_zulgurub_InstanceMapScript().

◆ SetPersistentDataCount()

◆ StoreGameObjectState()

void InstanceScript::StoreGameObjectState ( ObjectGuid::LowType  spawnId,
uint8  state 
)
inline
273{ _objectStateMap[spawnId] = state; };

References _objectStateMap.

Referenced by LoadInstanceSavedGameobjectStateData().

◆ StorePersistentData()

void InstanceScript::StorePersistentData ( uint32  index,
uint32  data 
)
389{
390 if (index > persistentData.size())
391 {
392 LOG_ERROR("scripts", "InstanceScript::StorePersistentData() index larger than storage size. Index: {} Size: {} Data: {}.", index, persistentData.size(), data);
393 return;
394 }
395
396 persistentData[index] = data;
397}

References LOG_ERROR, and persistentData.

Referenced by at_icc_spire_frostwyrm::_OnTrigger(), boss_pathaleon_the_calculator::DoAction(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::OnUnitDeath(), and instance_ahnkahet::instance_ahnkahet_InstanceScript::SetData().

◆ Update()

void InstanceScript::Update ( uint32  diff)
virtual

Reimplemented in instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript, instance_blackrock_spire::instance_blackrock_spireMapScript, instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunken_temple::instance_sunken_temple_InstanceMapScript, instance_zulaman::instance_zulaman_InstanceMapScript, instance_hyjal::instance_mount_hyjal_InstanceMapScript, instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_the_black_morass::instance_the_black_morass_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_gundrak::instance_gundrak_InstanceMapScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, and instance_shattered_halls::instance_shattered_halls_InstanceMapScript.

224{
225 scheduler.Update(diff);
226}
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition: TaskScheduler.cpp:27
TaskScheduler scheduler
Definition: InstanceScript.h:282

References scheduler, and TaskScheduler::Update().

Referenced by InstanceMap::Update(), and instance_ulduar::instance_ulduar_InstanceMapScript::Update().

◆ UpdateDoorState()

void InstanceScript::UpdateDoorState ( GameObject door)
protected
229{
230 DoorInfoMapBounds range = doors.equal_range(door->GetEntry());
231 if (range.first == range.second)
232 return;
233
234 // xinef: doors can be assigned to few bosses, if any of them demands doors closed - they should be closed (added & operator for assigment)
235 bool open = true;
236 for (; range.first != range.second && open; ++range.first)
237 {
238 DoorInfo const& info = range.first->second;
239 switch (info.type)
240 {
241 case DOOR_TYPE_ROOM:
242 open &= (info.bossInfo->state != IN_PROGRESS);
243 break;
245 open &= (info.bossInfo->state == DONE);
246 break;
248 open &= (info.bossInfo->state == IN_PROGRESS);
249 break;
250 default:
251 break;
252 }
253 }
254
256}
@ DOOR_TYPE_SPAWN_HOLE
Definition: InstanceScript.h:69
@ DOOR_TYPE_ROOM
Definition: InstanceScript.h:67
@ DOOR_TYPE_PASSAGE
Definition: InstanceScript.h:68

References DoorInfo::bossInfo, DONE, DOOR_TYPE_PASSAGE, DOOR_TYPE_ROOM, DOOR_TYPE_SPAWN_HOLE, doors, Object::GetEntry(), GO_STATE_ACTIVE, GO_STATE_READY, IN_PROGRESS, GameObject::SetGoState(), BossInfo::state, and DoorInfo::type.

Referenced by AddDoor(), and SetBossState().

◆ UpdateMinionState()

void InstanceScript::UpdateMinionState ( Creature minion,
EncounterState  state 
)
protected
198{
199 switch (state)
200 {
201 case NOT_STARTED:
202 if (!minion->IsAlive())
203 minion->Respawn();
204 else if (minion->IsInCombat())
205 minion->AI()->EnterEvadeMode();
206 break;
207 case IN_PROGRESS:
208 if (!minion->IsAlive())
209 minion->Respawn();
210 else
211 {
212 if (minion->GetReactState() == REACT_AGGRESSIVE)
213 {
214 minion->AI()->DoZoneInCombat(nullptr, 100.0f);
215 }
216 }
217 break;
218 default:
219 break;
220 }
221}
@ REACT_AGGRESSIVE
Definition: Unit.h:550
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
void Respawn(bool force=false)
Definition: Creature.cpp:2030
ReactStates GetReactState() const
Definition: Creature.h:98
CreatureAI * AI() const
Definition: Creature.h:143
bool IsAlive() const
Definition: Unit.h:1204
bool IsInCombat() const
Definition: Unit.h:820

References Creature::AI(), CreatureAI::DoZoneInCombat(), CreatureAI::EnterEvadeMode(), Creature::GetReactState(), IN_PROGRESS, Unit::IsAlive(), Unit::IsInCombat(), NOT_STARTED, REACT_AGGRESSIVE, and Creature::Respawn().

Referenced by SetBossState().

◆ WritePersistentData()

void InstanceScript::WritePersistentData ( std::ostringstream &  data)
protected
507{
508 for (auto const& entry : persistentData)
509 {
510 data << entry << ' ';
511 }
512}

References persistentData.

Referenced by GetSaveData().

◆ WriteSaveDataBossStates()

void InstanceScript::WriteSaveDataBossStates ( std::ostringstream &  data)
protected
499{
500 for (BossInfo const& bossInfo : bosses)
501 {
502 data << uint32(bossInfo.state) << ' ';
503 }
504}

References bosses.

Referenced by GetSaveData().

◆ WriteSaveDataHeaders()

void InstanceScript::WriteSaveDataHeaders ( std::ostringstream &  data)
protected
491{
492 for (char header : headers)
493 {
494 data << header << ' ';
495 }
496}

References headers.

Referenced by GetSaveData().

◆ WriteSaveDataMore()

virtual void InstanceScript::WriteSaveDataMore ( std::ostringstream &  )
inlineprotectedvirtual

Reimplemented in instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript, instance_gnomeregan::instance_gnomeregan_InstanceMapScript, instance_scholomance::instance_scholomance_InstanceMapScript, instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript, instance_stratholme::instance_stratholme_InstanceMapScript, instance_sunken_temple::instance_sunken_temple_InstanceMapScript, instance_uldaman::instance_uldaman_InstanceMapScript, instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript, instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript, instance_dire_maul::instance_dire_maul_InstanceMapScript, instance_maraudon::instance_maraudon_InstanceMapScript, instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript, instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript, instance_zulfarrak::instance_zulfarrak_InstanceMapScript, instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript, instance_forge_of_souls::instance_forge_of_souls_InstanceScript, instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript, instance_pit_of_saron::instance_pit_of_saron_InstanceScript, instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript, instance_naxxramas::instance_naxxramas_InstanceMapScript, instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript, instance_oculus::instance_oculus_InstanceMapScript, instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript, instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript, instance_ulduar::instance_ulduar_InstanceMapScript, instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript, instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript, instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript, instance_violet_hold::instance_violet_hold_InstanceMapScript, and instance_shattered_halls::instance_shattered_halls_InstanceMapScript.

315{ }

Referenced by GetSaveData().

Member Data Documentation

◆ _activatedAreaTriggers

std::unordered_set<uint32> InstanceScript::_activatedAreaTriggers
private

◆ _creatureInfo

ObjectInfoMap InstanceScript::_creatureInfo
private

Referenced by AddObject(), and LoadObjectData().

◆ _gameObjectInfo

ObjectInfoMap InstanceScript::_gameObjectInfo
private

Referenced by AddObject(), and LoadObjectData().

◆ _objectGuids

ObjectGuidMap InstanceScript::_objectGuids
private

Referenced by AddObject(), and GetObjectGuid().

◆ _objectStateMap

◆ bosses

◆ completedEncounters

uint32 InstanceScript::completedEncounters
private

◆ doors

DoorInfoMap InstanceScript::doors
private

◆ headers

std::vector<char> InstanceScript::headers
private

◆ instance

Map* InstanceScript::instance

Referenced by instance_blood_furnace::instance_blood_furnace_InstanceMapScript::ActivatePrisoners(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::AddWave1(), boss_tyrannus::boss_tyrannusAI::boss_tyrannusAI(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::CallNextRajaxxLeader(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::CheckAchievementCriteriaMeet(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::CheckAchievementCriteriaMeet(), instance_naxxramas::instance_naxxramas_InstanceMapScript::CheckAchievementCriteriaMeet(), instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript::CheckAchievementCriteriaMeet(), CheckAchievementCriteriaMeet(), instance_molten_core::instance_molten_core_InstanceMapScript::CheckMajordomoExecutus(), boss_prince_valanar_icc::boss_prince_valanarAI::CheckRoom(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::CheckTombReset(), instance_stratholme::instance_stratholme_InstanceMapScript::CheckZiggurats(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::ChromieWhisper(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::CleanupInstance(), violet_hold_trashAI::ClearDoorSealAura(), boss_hodir::boss_hodirAI::DoAction(), npc_hor_lich_king::npc_hor_lich_kingAI::DoAction(), npc_vh_void_sentry::npc_vh_void_sentryAI::DoAction(), instance_molten_core::instance_molten_core_InstanceMapScript::DoAction(), instance_obsidian_sanctum::instance_obsidian_sanctum_InstanceMapScript::DoAction(), npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI::DoAction(), boss_black_knight::boss_black_knightAI::DoAction(), boss_tyrannus::boss_tyrannusAI::DoAction(), DoCastSpellOnPlayer(), DoCastSpellOnPlayers(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::DoCheckDedicatedInsanity(), npc_rocknot::npc_rocknotAI::DoGo(), instance_violet_hold::instance_violet_hold_InstanceMapScript::DoNeedCleanup(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::DoNeedCleanup(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::DoNeedCleanup(), DoRemoveAurasDueToSpellOnPlayers(), DoRespawnCreature(), DoRespawnGameObject(), DoSendNotifyToInstance(), DoStartTimedAchievement(), DoStopTimedAchievement(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::DoSummonGrandChampion(), DoUpdateAchievementCriteria(), DoUpdateWorldState(), DoUseDoorOrButton(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::DoWipe1(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomcheck(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomstore(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::EnsureGridLoaded(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::EnsureGridLoaded(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::FillInitialWorldStates(), instance_stratholme::instance_stratholme_InstanceMapScript::gate_critter_delay(), boss_erekem::boss_erekemAI::GetChainHealTargetGUID(), GetCreature(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::GetCreatureEntry(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::GetCreatureEntry(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::GetData(), GetGameObject(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::GetGameObjectEntry(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::GetPlayerInMap(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::HandleDropAttempt(), HandleGameObject(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::HandleOutro(), boss_urok_doomhowl::boss_urok_doomhowlAI::InitializeAI(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::InstanceCleanup(), instance_violet_hold::instance_violet_hold_InstanceMapScript::InstanceCleanup(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::InstanceCleanup(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::IsEncounterInProgress(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::IsEncounterInProgress(), instance_ulduar::instance_ulduar_InstanceMapScript::IsEncounterInProgress(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::IsWaveAllDead(), boss_shade_of_aran::JustDied(), boss_rajaxx::JustDied(), boss_jormungarAI::JustDied(), npc_gunship::npc_gunshipAI::JustDied(), boss_varos::boss_varosAI::JustDied(), npc_ulduar_hodir_priest::npc_ulduar_hodir_priestAI::JustDied(), npc_ulduar_hodir_druid::npc_ulduar_hodir_druidAI::JustDied(), npc_ulduar_hodir_shaman::npc_ulduar_hodir_shamanAI::JustDied(), npc_ulduar_hodir_mage::npc_ulduar_hodir_mageAI::JustDied(), boss_kologarn::boss_kologarnAI::JustDied(), boss_skarvald_the_constructor::boss_skarvald_the_constructorAI::JustDied(), boss_dalronn_the_controller::boss_dalronn_the_controllerAI::JustDied(), npc_ichor_globule::npc_ichor_globuleAI::JustDied(), npc_vh_void_sentry::npc_vh_void_sentryAI::JustDied(), boss_shade_of_aran::JustEngagedWith(), boss_anubarak_trial::boss_anubarak_trialAI::JustEngagedWith(), npc_pos_deathwhisper_necrolyte::npc_pos_deathwhisper_necrolyteAI::JustEngagedWith(), boss_kologarn::boss_kologarnAI::JustEngagedWith(), boss_prince_keleseth_icc::boss_prince_kelesethAI::JustEngagedWith(), boss_prince_taldaram_icc::boss_prince_taldaramAI::JustEngagedWith(), boss_prince_valanar_icc::boss_prince_valanarAI::JustEngagedWith(), boss_skarvald_the_constructor::boss_skarvald_the_constructorAI::JustEngagedWith(), boss_dalronn_the_controller::boss_dalronn_the_controllerAI::JustEngagedWith(), boss_erekem::boss_erekemAI::JustEngagedWith(), npc_erekem_guard::npc_erekem_guardAI::JustEngagedWith(), LoadInstanceSavedGameobjectStateData(), boss_professor_putricide::boss_professor_putricideAI::MovementInform(), npc_gunship_boarding_addAI::MovementInform(), npc_hor_lich_king::npc_hor_lich_kingAI::MovementInform(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::MoveNPCIfAlive(), npc_frost_tomb::npc_frost_tombAI::npc_frost_tombAI(), npc_pos_leader_second::npc_pos_leader_secondAI::npc_pos_leader_secondAI(), npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI::npc_pos_martin_or_gorkun_secondAI(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::OnCreatureCreate(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::OnCreatureCreate(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::OnCreatureCreate(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::OnCreatureCreate(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::OnCreatureCreate(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::OnCreatureCreate(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::OnCreatureCreate(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::OnCreatureCreate(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnCreatureCreate(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnCreatureCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnCreatureCreate(), instance_nexus::instance_nexus_InstanceMapScript::OnCreatureCreate(), instance_ulduar::instance_ulduar_InstanceMapScript::OnCreatureCreate(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::OnCreatureCreate(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::OnGameObjectCreate(), instance_ulduar::instance_ulduar_InstanceMapScript::OnGameObjectCreate(), OnGameObjectCreate(), instance_molten_core::instance_molten_core_InstanceMapScript::OnGameObjectCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnGameObjectCreate(), instance_naxxramas::instance_naxxramas_InstanceMapScript::OnGameObjectRemove(), instance_zulaman::instance_zulaman_InstanceMapScript::OnPlayerEnter(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::OnPlayerEnter(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::OnPlayerEnter(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnPlayerEnter(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::OnPlayerEnter(), instance_stratholme::instance_stratholme_InstanceMapScript::OnPlayerEnter(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::OnPlayerEnter(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::OnPlayerEnter(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::OnPlayerEnter(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::OnPlayerEnter(), instance_ulduar::instance_ulduar_InstanceMapScript::OnPlayerEnter(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::OnPlayerEnter(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::OnPlayerEnter(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::OnPlayerEnter(), at_tyrannus_event_starter::OnTrigger(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::OnUnitDeath(), instance_karazhan::instance_karazhan_InstanceMapScript::OnUnitDeath(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::OnUnitDeath(), instance_temple_of_ahnqiraj::instance_temple_of_ahnqiraj_InstanceMapScript::OnUnitDeath(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnUnitDeath(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnUnitDeath(), instance_blackrock_spire::instance_blackrock_spireMapScript::ProcessEvent(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::ProcessEvent(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::ProcessEvent(), instance_sethekk_halls::instance_sethekk_halls_InstanceMapScript::ProcessEvent(), instance_stratholme::instance_stratholme_InstanceMapScript::ProcessSlaughterEvent(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::RandomizeCompositionsAndShow(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::ReadSaveDataMore(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::ReadSaveDataMore(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::RemoveBackPack(), instance_zulgurub::instance_zulgurub_InstanceMapScript::RemoveHakkarPowerStack(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::ReplaceMoiraIfSaved(), boss_shade_of_aran::Reset(), boss_tyrannus::boss_tyrannusAI::Reset(), boss_kologarn::boss_kologarnAI::Reset(), boss_palehoof::boss_palehoofAI::Reset(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::ResetPrisoners(), SaveToDB(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::ScheduleNextPortal(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::SendAddsUpStairs(), SendEncounterUnit(), instance_molten_core::instance_molten_core_InstanceMapScript::SetBossState(), instance_naxxramas::instance_naxxramas_InstanceMapScript::SetBossState(), SetBossState(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::SetBossState(), instance_blackrock_spire::instance_blackrock_spireMapScript::SetBossState(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetBossState(), instance_karazhan::instance_karazhan_InstanceMapScript::SetBossState(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::SetBossState(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::SetBossState(), instance_gundrak::instance_gundrak_InstanceMapScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_black_temple::instance_black_temple_InstanceMapScript::SetBossState(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::SetBossState(), instance_hellfire_ramparts::instance_hellfire_ramparts_InstanceMapScript::SetBossState(), instance_ulduar::instance_ulduar_InstanceMapScript::setChestsLootable(), SetCompletedEncountersMask(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::SetData(), instance_blackrock_spire::instance_blackrock_spireMapScript::SetData(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetData(), instance_karazhan::instance_karazhan_InstanceMapScript::SetData(), instance_scholomance::instance_scholomance_InstanceMapScript::SetData(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::SetData(), instance_stratholme::instance_stratholme_InstanceMapScript::SetData(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::SetData(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetData(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::SetData(), instance_dire_maul::instance_dire_maul_InstanceMapScript::SetData(), instance_wailing_caverns::instance_wailing_caverns_InstanceMapScript::SetData(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetData(), instance_oculus::instance_oculus_InstanceMapScript::SetData(), instance_halls_of_stone::instance_halls_of_stone_InstanceMapScript::SetData(), instance_ulduar::instance_ulduar_InstanceMapScript::SetData(), instance_utgarde_keep::instance_utgarde_keep_InstanceMapScript::SetData(), instance_utgarde_pinnacle::instance_utgarde_pinnacle_InstanceMapScript::SetData(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SetData(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::SetData(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::SetData(), instance_gundrak::instance_gundrak_InstanceMapScript::SetData(), instance_serpent_shrine::instance_serpentshrine_cavern_InstanceMapScript::SetData(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetData(), instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::SetData(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SpawnAnubArak(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SpawnGunship(), instance_ulduar::instance_ulduar_InstanceMapScript::SpawnLeviathanEncounterVehicles(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::SpawnPyramidWave(), instance_violet_hold::instance_violet_hold_InstanceMapScript::StartBossEncounter(), instance_zulaman::instance_zulaman_InstanceMapScript::SummonHostage(), instance_molten_core::instance_molten_core_InstanceMapScript::SummonMajordomoExecutus(), instance_blackrock_spire::instance_blackrock_spireMapScript::SummonSolakarWave(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::TombOfSevenEvent(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::TombOfSevenReset(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::Update(), instance_stratholme::instance_stratholme_InstanceMapScript::Update(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::Update(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::Update(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::Update(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::Update(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::Update(), instance_gundrak::instance_gundrak_InstanceMapScript::Update(), instance_naxxramas::instance_naxxramas_InstanceMapScript::Update(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::Update(), instance_violet_hold::instance_violet_hold_InstanceMapScript::Update(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::Update(), npc_arthas::npc_arthasAI::UpdateAI(), boss_black_knight::boss_black_knightAI::UpdateAI(), npc_fos_corrupted_soul_fragment::npc_fos_corrupted_soul_fragmentAI::UpdateAI(), npc_hor_leader::npc_hor_leaderAI::UpdateAI(), npc_hor_lich_king::npc_hor_lich_kingAI::UpdateAI(), npc_hor_leader_second::npc_hor_leader_secondAI::UpdateAI(), boss_krick::boss_krickAI::UpdateAI(), boss_tyrannus::boss_tyrannusAI::UpdateAI(), npc_pos_leader::npc_pos_leaderAI::UpdateAI(), npc_pos_after_first_boss::npc_pos_after_first_bossAI::UpdateAI(), npc_pos_tyrannus_events::npc_pos_tyrannus_eventsAI::UpdateAI(), npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI::UpdateAI(), npc_pos_leader_second::npc_pos_leader_secondAI::UpdateAI(), boss_prince_valanar_icc::boss_prince_valanarAI::UpdateAI(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::UpdateAI(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::UpdateAI(), boss_anubrekhan::boss_anubrekhanAI::UpdateAI(), boss_faerlina::boss_faerlinaAI::UpdateAI(), npc_power_spark::npc_power_sparkAI::UpdateAI(), boss_hodir::boss_hodirAI::UpdateAI(), boss_erekem::boss_erekemAI::UpdateAI(), boss_xevozz::boss_xevozzAI::UpdateAI(), npc_vh_teleportation_portal::npc_vh_teleportation_portalAI::UpdateAI(), npc_ichor_globule::npc_ichor_globuleAI::UpdateAI(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::UpdateEventState(), npc_arthas::npc_arthasAI::WaypointReached(), and instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::WriteSaveDataMore().

◆ minions

MinionInfoMap InstanceScript::minions
private

Referenced by AddMinion(), and LoadMinionData().

◆ persistentData

std::vector<uint32> InstanceScript::persistentData
private

◆ scheduler