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

Public Member Functions

 instance_scarlet_monastery_InstanceMapScript (Map *map)
 
void OnPlayerEnter (Player *player) override
 
void OnPlayerAreaUpdate (Player *player, uint32, uint32) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnCreatureCreate (Creature *creature) override
 
void SetData (uint32 type, uint32 data) override
 
ObjectGuid GetGuidData (uint32 type) const override
 
uint32 GetData (uint32 type) const override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
 ~InstanceScript () override
 
virtual void Initialize ()
 
virtual void Load (char const *data)
 
virtual void CreatureLooted (Creature *, LootType)
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual void Update (uint32)
 
virtual bool IsEncounterInProgress () const
 
void OnCreatureCreate (Creature *creature) override
 
void OnCreatureRemove (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
ObjectGuid GetGuidData (uint32 type) const override
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
virtual void OnPlayerEnter (Player *)
 
virtual void OnPlayerAreaUpdate (Player *, uint32, uint32)
 
virtual void OnPlayerInWaterStateUpdate (Player *, bool)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoRespawnCreature (ObjectGuid guid, bool force=false)
 
void DoRespawnCreature (uint32 type, bool force=false)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayer (Player *player, uint32 spell, bool includePets, bool includeControlled)
 
bool ServerAllowsTwoSideGroups ()
 
virtual bool SetBossState (uint32 id, EncounterState state)
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary const * GetBossBoundary (uint32 id) const
 
BossInfo const * GetBossInfo (uint32 id) const
 
uint32 GetPersistentData (uint32 index) const
 
void StorePersistentData (uint32 index, uint32 data)
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=nullptr, uint32=0)
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void SetCompletedEncountersMask (uint32 newMask, bool save)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=nullptr, uint8 param1=0, uint8 param2=0)
 
virtual void FillInitialWorldStates (WorldPacket &)
 
uint32 GetEncounterCount () const
 
void MarkAreaTriggerDone (uint32 id)
 
void ResetAreaTriggerDone (uint32 id)
 
bool IsAreaTriggerDone (uint32 id) const
 
virtual void DoAction (int32)
 
void DoForAllMinions (uint32 id, std::function< void(Creature *)> exec)
 
void StoreGameObjectState (ObjectGuid::LowType spawnId, uint8 state)
 
uint8 GetStoredGameObjectState (ObjectGuid::LowType spawnId) const
 
void LoadInstanceSavedGameobjectStateData ()
 
bool IsBossDone (uint32 bossId) const
 
bool AllBossesDone () const
 
bool AllBossesDone (std::initializer_list< uint32 > bossIds) const
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnCreatureCreate (Creature *)
 
virtual void OnCreatureRemove (Creature *)
 
virtual void OnGameObjectCreate (GameObject *)
 
virtual void OnGameObjectRemove (GameObject *)
 
virtual void OnUnitDeath (Unit *)
 
virtual void OnCreatureEvade (Creature *)
 
virtual ObjectGuid GetGuidData (uint32) const
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Private Attributes

ObjectGuid DoorHighInquisitorGUID
 
ObjectGuid MograineGUID
 
ObjectGuid WhitemaneGUID
 
uint32 encounter
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 
- Protected Member Functions inherited from InstanceScript
void SetHeaders (std::string const &dataHeaders)
 
void SetBossNumber (uint32 number)
 
void SetPersistentDataCount (uint32 number)
 
void LoadBossBoundaries (BossBoundaryData const &data)
 
void LoadDoorData (DoorData const *data)
 
void LoadMinionData (MinionData const *data)
 
void LoadObjectData (ObjectData const *creatureData, ObjectData const *gameObjectData)
 
void AddObject (Creature *obj, bool add=true)
 
void RemoveObject (Creature *obj)
 
void AddObject (GameObject *obj, bool add=true)
 
void RemoveObject (GameObject *obj)
 
void AddObject (WorldObject *obj, uint32 type, bool add=true)
 
void RemoveObject (WorldObject *obj, uint32 type)
 
void AddDoor (GameObject *door, bool add=true)
 
void RemoveDoor (GameObject *door)
 
void AddMinion (Creature *minion, bool add=true)
 
void RemoveMinion (Creature *minion)
 
void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
void ReadSavePersistentData (std::istringstream &data)
 
virtual void ReadSaveDataMore (std::istringstream &)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
void WritePersistentData (std::ostringstream &data)
 
virtual void WriteSaveDataMore (std::ostringstream &)
 

Detailed Description

Constructor & Destructor Documentation

◆ instance_scarlet_monastery_InstanceMapScript()

instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::instance_scarlet_monastery_InstanceMapScript ( Map map)
inline
70 : InstanceScript(map)
71 {
73 }
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:142
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138

References DataHeader, and InstanceScript::SetHeaders().

Member Function Documentation

◆ GetData()

uint32 instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

181 {
183 return encounter;
184 else if (type == DATA_HORSEMAN_EVENT)
185 return encounter;
186 return 0;
187 }
@ DATA_HORSEMAN_EVENT
Definition: instance_scarlet_monastery.cpp:51
@ TYPE_MOGRAINE_AND_WHITE_EVENT
Definition: instance_scarlet_monastery.cpp:45
uint32 encounter
Definition: instance_scarlet_monastery.cpp:192

References DATA_HORSEMAN_EVENT, encounter, and TYPE_MOGRAINE_AND_WHITE_EVENT.

◆ GetGuidData()

ObjectGuid instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

166 {
167 switch (type)
168 {
169 case DATA_MOGRAINE:
170 return MograineGUID;
171 case DATA_WHITEMANE:
172 return WhitemaneGUID;
175 }
176
177 return ObjectGuid::Empty;
178 }
@ DATA_MOGRAINE
Definition: instance_scarlet_monastery.cpp:47
@ DATA_WHITEMANE
Definition: instance_scarlet_monastery.cpp:48
@ DATA_DOOR_WHITEMANE
Definition: instance_scarlet_monastery.cpp:49
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid MograineGUID
Definition: instance_scarlet_monastery.cpp:190
ObjectGuid DoorHighInquisitorGUID
Definition: instance_scarlet_monastery.cpp:189
ObjectGuid WhitemaneGUID
Definition: instance_scarlet_monastery.cpp:191

References DATA_DOOR_WHITEMANE, DATA_MOGRAINE, DATA_WHITEMANE, DoorHighInquisitorGUID, ObjectGuid::Empty, MograineGUID, and WhitemaneGUID.

◆ OnCreatureCreate()

void instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

129 {
130 switch (creature->GetEntry())
131 {
133 MograineGUID = creature->GetGUID();
134 break;
136 WhitemaneGUID = creature->GetGUID();
137 break;
138 }
139 }
@ NPC_INQUISITOR_WHITEMANE
Definition: instance_scarlet_monastery.cpp:39
@ NPC_COMMANDER_MOGRAINE
Definition: instance_scarlet_monastery.cpp:38
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109

References Object::GetEntry(), Object::GetGUID(), MograineGUID, NPC_COMMANDER_MOGRAINE, NPC_INQUISITOR_WHITEMANE, and WhitemaneGUID.

◆ OnGameObjectCreate()

void instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

118 {
119 switch (go->GetEntry())
120 {
121 //case ENTRY_PUMPKIN_SHRINE: PumpkinShrineGUID = go->GetGUID(); break;
124 break;
125 }
126 }
@ DOOR_HIGH_INQUISITOR_ID
Definition: instance_scarlet_monastery.cpp:40

References DOOR_HIGH_INQUISITOR_ID, DoorHighInquisitorGUID, Object::GetEntry(), and Object::GetGUID().

◆ OnPlayerAreaUpdate()

void instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::OnPlayerAreaUpdate ( Player player,
uint32  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

97 {
98 if (player->HasAura(AURA_OF_ASHBRINGER))
99 {
100 std::list<Creature*> ScarletList;
101 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MYRIDON, 4000.0f);
102 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_DEFENDER, 4000.0f);
103 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CENTURION, 4000.0f);
104 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_SORCERER, 4000.0f);
105 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_WIZARD, 4000.0f);
106 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_ABBOT, 4000.0f);
107 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MONK, 4000.0f);
108 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAMPION, 4000.0f);
109 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAPLAIN, 4000.0f);
110 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_COMMANDER_MOGRAINE, 4000.0f);
111 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_FAIRBANKS, 4000.0f);
112 if (!ScarletList.empty())
113 for (std::list<Creature*>::iterator itr = ScarletList.begin(); itr != ScarletList.end(); itr++) (*itr)->SetFaction(FACTION_FRIENDLY);
114 }
115 }
@ NPC_SCARLET_ABBOT
Definition: instance_scarlet_monastery.cpp:33
@ NPC_SCARLET_SORCERER
Definition: instance_scarlet_monastery.cpp:31
@ NPC_SCARLET_MYRIDON
Definition: instance_scarlet_monastery.cpp:28
@ NPC_SCARLET_MONK
Definition: instance_scarlet_monastery.cpp:34
@ NPC_SCARLET_WIZARD
Definition: instance_scarlet_monastery.cpp:32
@ NPC_SCARLET_CHAPLAIN
Definition: instance_scarlet_monastery.cpp:36
@ NPC_SCARLET_CENTURION
Definition: instance_scarlet_monastery.cpp:30
@ AURA_OF_ASHBRINGER
Definition: instance_scarlet_monastery.cpp:27
@ NPC_FAIRBANKS
Definition: instance_scarlet_monastery.cpp:37
@ NPC_SCARLET_CHAMPION
Definition: instance_scarlet_monastery.cpp:35
@ NPC_SCARLET_DEFENDER
Definition: instance_scarlet_monastery.cpp:29
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition: Object.cpp:2500
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669

References AURA_OF_ASHBRINGER, FACTION_FRIENDLY, WorldObject::GetCreatureListWithEntryInGrid(), Unit::HasAura(), NPC_COMMANDER_MOGRAINE, NPC_FAIRBANKS, NPC_SCARLET_ABBOT, NPC_SCARLET_CENTURION, NPC_SCARLET_CHAMPION, NPC_SCARLET_CHAPLAIN, NPC_SCARLET_DEFENDER, NPC_SCARLET_MONK, NPC_SCARLET_MYRIDON, NPC_SCARLET_SORCERER, and NPC_SCARLET_WIZARD.

◆ OnPlayerEnter()

void instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::OnPlayerEnter ( Player player)
inlineoverridevirtual

Reimplemented from InstanceScript.

76 {
77 if (player->HasAura(AURA_OF_ASHBRINGER))
78 {
79 std::list<Creature*> ScarletList;
80 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MYRIDON, 4000.0f);
81 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_DEFENDER, 4000.0f);
82 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CENTURION, 4000.0f);
83 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_SORCERER, 4000.0f);
84 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_WIZARD, 4000.0f);
85 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_ABBOT, 4000.0f);
86 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_MONK, 4000.0f);
87 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAMPION, 4000.0f);
88 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_SCARLET_CHAPLAIN, 4000.0f);
89 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_COMMANDER_MOGRAINE, 4000.0f);
90 player->GetCreatureListWithEntryInGrid(ScarletList, NPC_FAIRBANKS, 4000.0f);
91 if (!ScarletList.empty())
92 for (std::list<Creature*>::iterator itr = ScarletList.begin(); itr != ScarletList.end(); itr++) (*itr)->SetFaction(FACTION_FRIENDLY);
93 }
94 }

References AURA_OF_ASHBRINGER, FACTION_FRIENDLY, WorldObject::GetCreatureListWithEntryInGrid(), Unit::HasAura(), NPC_COMMANDER_MOGRAINE, NPC_FAIRBANKS, NPC_SCARLET_ABBOT, NPC_SCARLET_CENTURION, NPC_SCARLET_CHAMPION, NPC_SCARLET_CHAPLAIN, NPC_SCARLET_DEFENDER, NPC_SCARLET_MONK, NPC_SCARLET_MYRIDON, NPC_SCARLET_SORCERER, and NPC_SCARLET_WIZARD.

◆ SetData()

void instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

142 {
143 switch (type)
144 {
146 if (data == IN_PROGRESS)
147 {
150 }
151 if (data == FAIL)
152 {
154 encounter = FAIL;
155 }
156 if (data == SPECIAL)
158 break;
160 encounter = data;
161 break;
162 }
163 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ FAIL
Definition: InstanceScript.h:59
@ SPECIAL
Definition: InstanceScript.h:61
void DoUseDoorOrButton(ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
Definition: InstanceScript.cpp:514

References DATA_HORSEMAN_EVENT, DoorHighInquisitorGUID, InstanceScript::DoUseDoorOrButton(), encounter, FAIL, IN_PROGRESS, SPECIAL, and TYPE_MOGRAINE_AND_WHITE_EVENT.

Member Data Documentation

◆ DoorHighInquisitorGUID

ObjectGuid instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::DoorHighInquisitorGUID
private

◆ encounter

uint32 instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::encounter
private

Referenced by GetData(), and SetData().

◆ MograineGUID

ObjectGuid instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::MograineGUID
private

Referenced by GetGuidData(), and OnCreatureCreate().

◆ WhitemaneGUID

ObjectGuid instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::WhitemaneGUID
private

Referenced by GetGuidData(), and OnCreatureCreate().