AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript Struct Reference
Inheritance diagram for instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript:
InstanceScript ZoneScript

Public Member Functions

 instance_razorfen_downs_InstanceMapScript (Map *map)
 
void Initialize () override
 
void OnGameObjectCreate (GameObject *gameobject) override
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 type, uint32 data) override
 
std::string GetSaveData () override
 
void Load (const char *str) 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)
 
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)
 
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
 
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)
 
- 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

uint32 _gongPhase
 
uint32 _firesState
 

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 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)
 
void AddDoor (GameObject *door, bool add)
 
void AddMinion (Creature *minion, bool add)
 
void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
std::string LoadBossState (char const *data)
 
std::string GetBossSaveData ()
 

Detailed Description

Constructor & Destructor Documentation

◆ instance_razorfen_downs_InstanceMapScript()

instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::instance_razorfen_downs_InstanceMapScript ( Map map)
inline
30 : InstanceScript(map)
31 {
32 }
Definition: InstanceScript.h:140

Member Function Documentation

◆ GetData()

uint32 instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

58 {
59 if (type == GO_GONG)
60 return _gongPhase;
61 return 0;
62 }
@ GO_GONG
Definition: razorfen_downs.h:37
uint32 _gongPhase
Definition: instance_razorfen_downs.cpp:97

References _gongPhase, and GO_GONG.

◆ GetSaveData()

std::string instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

74 {
75 std::ostringstream saveStream;
76 saveStream << "R D " << _gongPhase << ' ' << _firesState;
77 return saveStream.str();
78 }
uint32 _firesState
Definition: instance_razorfen_downs.cpp:98

References _firesState, and _gongPhase.

◆ Initialize()

void instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

35 {
36 _gongPhase = 0;
37 _firesState = 0;
38 }

References _firesState, and _gongPhase.

◆ Load()

void instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::Load ( const char *  str)
inlineoverridevirtual

Reimplemented from InstanceScript.

81 {
82 if (!str)
83 return;
84
85 char dataHead1, dataHead2;
86 std::istringstream loadStream(str);
87 loadStream >> dataHead1 >> dataHead2;
88
89 if (dataHead1 == 'R' && dataHead2 == 'D')
90 {
91 loadStream >> _gongPhase;
92 loadStream >> _firesState;
93 }
94 }

References _firesState, and _gongPhase.

◆ OnGameObjectCreate()

void instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::OnGameObjectCreate ( GameObject gameobject)
inlineoverridevirtual

Reimplemented from InstanceScript.

41 {
42 switch (gameobject->GetEntry())
43 {
47 if (_firesState == DONE)
48 gameobject->Delete();
49 break;
50 case GO_GONG:
51 if (_gongPhase == DONE)
53 break;
54 }
55 }
@ DONE
Definition: InstanceScript.h:59
@ GO_IDOL_CUP_FIRE
Definition: razorfen_downs.h:40
@ GO_IDOL_OVEN_FIRE
Definition: razorfen_downs.h:39
@ GO_IDOL_MOUTH_FIRE
Definition: razorfen_downs.h:41
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1579
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:911
void Delete()
Definition: GameObject.cpp:949
uint32 GetEntry() const
Definition: Object.h:109

References _firesState, _gongPhase, GameObject::Delete(), DONE, Object::GetEntry(), GO_FLAG_NOT_SELECTABLE, GO_GONG, GO_IDOL_CUP_FIRE, GO_IDOL_MOUTH_FIRE, GO_IDOL_OVEN_FIRE, and GameObject::SetGameObjectFlag().

◆ SetData()

void instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

65 {
66 if (type == GO_GONG)
67 _gongPhase = data;
68 else if (type == GO_BELNISTRASZS_BRAZIER)
70 SaveToDB();
71 }
@ GO_BELNISTRASZS_BRAZIER
Definition: razorfen_downs.h:42
void SaveToDB()
Definition: InstanceScript.cpp:40

References _firesState, _gongPhase, DONE, GO_BELNISTRASZS_BRAZIER, GO_GONG, and InstanceScript::SaveToDB().

Member Data Documentation

◆ _firesState

uint32 instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::_firesState
private

◆ _gongPhase

uint32 instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::_gongPhase
private