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

Public Member Functions

 instance_nexus_InstanceMapScript (Map *map)
 
void Initialize () override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *gameObject) override
 
void OnGameObjectRemove (GameObject *gameObject) override
 
void SetData (uint32 type, uint32) override
 
bool SetBossState (uint32 id, EncounterState state) override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
 ~InstanceScript () override
 
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 OnPlayerLeave (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 DoRespawnGameObject (uint32 type)
 
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 ()
 
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 (WorldPackets::WorldState::InitWorldStates &)
 
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
 
TeamId GetTeamIdInInstance () const
 
void SetTeamIdInInstance (TeamId teamId)
 
bool IsTwoFactionInstance () 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 OnUnitDeath (Unit *)
 
virtual void OnCreatureEvade (Creature *)
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ instance_nexus_InstanceMapScript()

instance_nexus::instance_nexus_InstanceMapScript::instance_nexus_InstanceMapScript ( Map map)
inline
45: InstanceScript(map) {}
Definition InstanceScript.h:143

Member Function Documentation

◆ Initialize()

void instance_nexus::instance_nexus_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

48 {
52 }
#define DataHeader
Definition blackrock_depths.h:23
void SetBossNumber(uint32 number)
Definition InstanceScript.h:296
void LoadDoorData(DoorData const *data)
Definition InstanceScript.cpp:176
void SetHeaders(std::string const &dataHeaders)
Definition InstanceScript.cpp:153
@ MAX_ENCOUNTERS
Definition deadmines.h:30
DoorData const doorData[]
Definition instance_nexus.cpp:25

References DataHeader, doorData, InstanceScript::LoadDoorData(), MAX_ENCOUNTERS, InstanceScript::SetBossNumber(), and InstanceScript::SetHeaders().

◆ OnCreatureCreate()

void instance_nexus::instance_nexus_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from ZoneScript.

55 {
56 switch (creature->GetEntry())
57 {
62 break;
67 break;
72 break;
77 break;
82 break;
83 }
84 }
@ TEAM_ALLIANCE
Definition SharedDefines.h:760
@ FACTION_MONSTER_2
Definition SharedDefines.h:196
bool UpdateEntry(uint32 entry, const CreatureData *data=nullptr, bool changelevel=true, bool updateAI=false)
Definition Creature.cpp:542
TeamId GetTeamIdInInstance() const
Definition InstanceScript.h:289
uint32 GetEntry() const
Definition Object.h:115
void SetFaction(uint32 faction)
Definition Unit.cpp:10097
@ NPC_ALLIANCE_COMMANDER
Definition icecrown_citadel.h:160
@ NPC_COMMANDER_KOLURG
Definition nexus.h:52
@ NPC_HORDE_COMMANDER
Definition nexus.h:48
@ NPC_HORDE_RANGER
Definition nexus.h:46
@ NPC_COMMANDER_STOUTBEARD
Definition nexus.h:51
@ NPC_HORDE_CLERIC
Definition nexus.h:49
@ NPC_ALLIANCE_RANGER
Definition nexus.h:42
@ NPC_HORDE_BERSERKER
Definition nexus.h:47
@ NPC_ALLIANCE_BERSERKER
Definition nexus.h:43
@ NPC_ALLIANCE_CLERIC
Definition nexus.h:45

References FACTION_MONSTER_2, Object::GetEntry(), InstanceScript::GetTeamIdInInstance(), NPC_ALLIANCE_BERSERKER, NPC_ALLIANCE_CLERIC, NPC_ALLIANCE_COMMANDER, NPC_ALLIANCE_RANGER, NPC_COMMANDER_KOLURG, NPC_COMMANDER_STOUTBEARD, NPC_HORDE_BERSERKER, NPC_HORDE_CLERIC, NPC_HORDE_COMMANDER, NPC_HORDE_RANGER, Unit::SetFaction(), TEAM_ALLIANCE, and Creature::UpdateEntry().

◆ OnGameObjectCreate()

void instance_nexus::instance_nexus_InstanceMapScript::OnGameObjectCreate ( GameObject gameObject)
inlineoverridevirtual

Reimplemented from ZoneScript.

87 {
88 switch (gameObject->GetEntry())
89 {
93 AddDoor(gameObject);
94 break;
98 AddDoor(gameObject);
99 break;
103 AddDoor(gameObject);
104 break;
105 }
106 }
@ DONE
Definition InstanceScript.h:61
@ GO_FLAG_NOT_SELECTABLE
Definition SharedDefines.h:1607
void RemoveGameObjectFlag(GameObjectFlags flags)
Definition GameObject.h:218
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:242
void AddDoor(GameObject *door, bool add=true)
Definition InstanceScript.cpp:331
@ GO_TELESTRA_SPHERE
Definition nexus.h:54
@ GO_ANOMALUS_SPHERE
Definition nexus.h:55
@ GO_ORMOROK_SPHERE
Definition nexus.h:56
@ DATA_ORMOROK_ORB
Definition nexus.h:36
@ DATA_MAGUS_TELESTRA_EVENT
Definition nexus.h:29
@ DATA_ORMOROK_EVENT
Definition nexus.h:31
@ DATA_TELESTRA_ORB
Definition nexus.h:34
@ DATA_ANOMALUS_ORB
Definition nexus.h:35
@ DATA_ANOMALUS_EVENT
Definition nexus.h:30

References InstanceScript::AddDoor(), DATA_ANOMALUS_EVENT, DATA_ANOMALUS_ORB, DATA_MAGUS_TELESTRA_EVENT, DATA_ORMOROK_EVENT, DATA_ORMOROK_ORB, DATA_TELESTRA_ORB, DONE, InstanceScript::GetBossState(), Object::GetEntry(), GO_ANOMALUS_SPHERE, GO_FLAG_NOT_SELECTABLE, GO_ORMOROK_SPHERE, GO_TELESTRA_SPHERE, and GameObject::RemoveGameObjectFlag().

◆ OnGameObjectRemove()

void instance_nexus::instance_nexus_InstanceMapScript::OnGameObjectRemove ( GameObject gameObject)
inlineoverridevirtual

Reimplemented from ZoneScript.

109 {
110 switch (gameObject->GetEntry())
111 {
115 RemoveDoor(gameObject);
116 break;
117 }
118 }
void RemoveDoor(GameObject *door)
Definition InstanceScript.cpp:353

References Object::GetEntry(), GO_ANOMALUS_SPHERE, GO_ORMOROK_SPHERE, GO_TELESTRA_SPHERE, and InstanceScript::RemoveDoor().

◆ SetBossState()

bool instance_nexus::instance_nexus_InstanceMapScript::SetBossState ( uint32  id,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

140 {
141 if (!InstanceScript::SetBossState(id, state))
142 return false;
143
144 if (state != DONE || id > DATA_ORMOROK_EVENT)
145 return true;
146
147 BossInfo const* bossInfo = GetBossInfo(id + DATA_TELESTRA_ORB);
148 for (DoorSet::const_iterator i = bossInfo->door[DOOR_TYPE_PASSAGE].begin(); i != bossInfo->door[DOOR_TYPE_PASSAGE].end(); ++i)
149 (*i)->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
150 return true;
151 }
@ DOOR_TYPE_PASSAGE
Definition InstanceScript.h:69
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:385
BossInfo const * GetBossInfo(uint32 id) const
Definition InstanceScript.h:245
Definition InstanceScript.h:112
DoorSet door[MAX_DOOR_TYPES]
Definition InstanceScript.h:115

References DATA_ORMOROK_EVENT, DATA_TELESTRA_ORB, DONE, BossInfo::door, DOOR_TYPE_PASSAGE, InstanceScript::GetBossInfo(), GO_FLAG_NOT_SELECTABLE, and InstanceScript::SetBossState().

Referenced by SetData().

◆ SetData()

void instance_nexus::instance_nexus_InstanceMapScript::SetData ( uint32  type,
uint32   
)
inlineoverridevirtual

Reimplemented from ZoneScript.

121 {
122 switch (type)
123 {
127 break;
131 break;
135 break;
136 }
137 }
@ NOT_STARTED
Definition InstanceScript.h:58
bool SetBossState(uint32 id, EncounterState state) override
Definition instance_nexus.cpp:139

References DATA_ANOMALUS_ORB, DATA_ORMOROK_ORB, DATA_TELESTRA_ORB, DONE, GO_ANOMALUS_SPHERE, GO_ORMOROK_SPHERE, GO_TELESTRA_SPHERE, NOT_STARTED, and SetBossState().


The documentation for this struct was generated from the following file: