TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
instance_nexus::instance_nexus_InstanceMapScript Struct Reference

Public Member Functions

 instance_nexus_InstanceMapScript (Map *map)
 
void OnPlayerEnter (Player *player) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
bool SetBossState (uint32 type, EncounterState state) override
 
ObjectGuid GetGuidData (uint32 type) const override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
virtual void Load (char const *data)
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual void Update (uint32)
 
virtual bool IsEncounterInProgress () const
 
virtual void OnCreatureRemove (Creature *creature) override
 
virtual void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoCloseDoorOrButton (ObjectGuid guid)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=NULL)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
bool ServerAllowsTwoSideGroups ()
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary constGetBossBoundary (uint32 id) const
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source)
 
void SetCompletedEncountersMask (uint32 newMask)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=NULL, uint8 param1=0, uint8 param2=0)
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
void UpdatePhasing ()
 
uint32 GetEncounterCount () 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 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 AnomalusGUID
 
ObjectGuid KeristraszaGUID
 
ObjectGuid AnomalusContainmentSphere
 
ObjectGuid OrmoroksContainmentSphere
 
ObjectGuid TelestrasContainmentSphere
 
uint32 _teamInInstance
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
- Protected Member Functions inherited from InstanceScript
void SetHeaders (std::string const &dataHeaders)
 
void SetBossNumber (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)
 
void AddObject (GameObject *obj, bool add)
 
void AddObject (WorldObject *obj, uint32 type, bool add)
 
virtual void AddDoor (GameObject *door, bool add)
 
void AddMinion (Creature *minion, bool add)
 
virtual void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
BossInfoGetBossInfo (uint32 id)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
virtual void ReadSaveDataMore (std::istringstream &)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
virtual void WriteSaveDataMore (std::ostringstream &)
 
bool _SkipCheckRequiredBosses (Player const *player=nullptr) const
 

Constructor & Destructor Documentation

instance_nexus::instance_nexus_InstanceMapScript::instance_nexus_InstanceMapScript ( Map map)
inline
36  : InstanceScript(map)
37  {
40  _teamInInstance = 0;
41  }
uint32 const EncounterCount
Definition: baradin_hold.h:28
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:258
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
InstanceScript(Map *map)
Definition: InstanceScript.h:144
uint32 _teamInInstance
Definition: instance_nexus.cpp:181

+ Here is the call graph for this function:

Member Function Documentation

ObjectGuid instance_nexus::instance_nexus_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

155  {
156  switch (type)
157  {
158  case DATA_ANOMALUS:
159  return AnomalusGUID;
160  case DATA_KERISTRASZA:
161  return KeristraszaGUID;
168  default:
169  break;
170  }
171 
172  return ObjectGuid::Empty;
173  }
Definition: nexus.h:36
ObjectGuid AnomalusGUID
Definition: instance_nexus.cpp:176
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: nexus.h:32
Definition: nexus.h:34
ObjectGuid KeristraszaGUID
Definition: instance_nexus.cpp:177
ObjectGuid OrmoroksContainmentSphere
Definition: instance_nexus.cpp:179
Definition: nexus.h:35
Definition: nexus.h:30
ObjectGuid TelestrasContainmentSphere
Definition: instance_nexus.cpp:180
ObjectGuid AnomalusContainmentSphere
Definition: instance_nexus.cpp:178
void instance_nexus::instance_nexus_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

50  {
51  switch (creature->GetEntry())
52  {
53  case NPC_ANOMALUS:
54  AnomalusGUID = creature->GetGUID();
55  break;
56  case NPC_KERISTRASZA:
57  KeristraszaGUID = creature->GetGUID();
58  break;
59  // Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs.
65  break;
70  creature->UpdateEntry(NPC_HORDE_RANGER);
71  break;
76  creature->UpdateEntry(NPC_HORDE_CLERIC);
77  break;
83  break;
89  break;
90  default:
91  break;
92  }
93  }
bool ServerAllowsTwoSideGroups()
Definition: InstanceScript.h:224
Definition: nexus.h:47
ObjectGuid AnomalusGUID
Definition: instance_nexus.cpp:176
Definition: nexus.h:45
Definition: nexus.h:54
Definition: nexus.h:49
Definition: nexus.h:46
Definition: nexus.h:52
Definition: nexus.h:53
Definition: nexus.h:42
Definition: SharedDefines.h:1000
void setFaction(uint32 faction)
Definition: Unit.h:1467
ObjectGuid KeristraszaGUID
Definition: instance_nexus.cpp:177
Definition: nexus.h:56
Definition: icecrown_citadel.h:129
Definition: instance_nexus.cpp:26
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: nexus.h:55
uint32 GetEntry() const
Definition: Object.h:107
uint32 _teamInInstance
Definition: instance_nexus.cpp:181
Definition: nexus.h:41
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr)
Definition: Creature.cpp:407

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

96  {
97  switch (go->GetEntry())
98  {
103  break;
108  break;
113  break;
114  default:
115  break;
116  }
117  }
Definition: SharedDefines.h:2125
Definition: inflate.h:49
Definition: nexus.h:31
ObjectGuid OrmoroksContainmentSphere
Definition: instance_nexus.cpp:179
Definition: nexus.h:30
Definition: UpdateFields.h:319
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: nexus.h:62
uint32 GetEntry() const
Definition: Object.h:107
ObjectGuid TelestrasContainmentSphere
Definition: instance_nexus.cpp:180
Definition: nexus.h:63
ObjectGuid AnomalusContainmentSphere
Definition: instance_nexus.cpp:178
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: nexus.h:61
Definition: nexus.h:29

+ Here is the call graph for this function:

void instance_nexus::instance_nexus_InstanceMapScript::OnPlayerEnter ( Player player)
inlineoverridevirtual

Reimplemented from InstanceScript.

44  {
45  if (!_teamInInstance)
46  _teamInInstance = player->GetTeam();
47  }
uint32 _teamInInstance
Definition: instance_nexus.cpp:181
bool instance_nexus::instance_nexus_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

120  {
121  if (!InstanceScript::SetBossState(type, state))
122  return false;
123 
124  switch (type)
125  {
126  case DATA_MAGUS_TELESTRA:
127  if (state == DONE)
128  {
130  sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
131  }
132  break;
133  case DATA_ANOMALUS:
134  if (state == DONE)
135  {
137  sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
138  }
139  break;
140  case DATA_ORMOROK:
141  if (state == DONE)
142  {
144  sphere->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
145  }
146  break;
147  default:
148  break;
149  }
150 
151  return true;
152  }
Definition: SharedDefines.h:2125
Definition: inflate.h:49
Definition: nexus.h:31
ObjectGuid OrmoroksContainmentSphere
Definition: instance_nexus.cpp:179
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: nexus.h:30
Definition: UpdateFields.h:319
ObjectGuid TelestrasContainmentSphere
Definition: instance_nexus.cpp:180
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
ObjectGuid AnomalusContainmentSphere
Definition: instance_nexus.cpp:178
Definition: nexus.h:29

+ Here is the call graph for this function:

Member Data Documentation

uint32 instance_nexus::instance_nexus_InstanceMapScript::_teamInInstance
private
ObjectGuid instance_nexus::instance_nexus_InstanceMapScript::AnomalusContainmentSphere
private
ObjectGuid instance_nexus::instance_nexus_InstanceMapScript::AnomalusGUID
private
ObjectGuid instance_nexus::instance_nexus_InstanceMapScript::KeristraszaGUID
private
ObjectGuid instance_nexus::instance_nexus_InstanceMapScript::OrmoroksContainmentSphere
private
ObjectGuid instance_nexus::instance_nexus_InstanceMapScript::TelestrasContainmentSphere
private

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