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

Public Member Functions

 instance_zulaman_InstanceMapScript (Map *map)
 
void Initialize () override
 
bool IsEncounterInProgress () const override
 
void OnPlayerEnter (Player *) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void SummonHostage (uint8 num)
 
void CheckInstanceStatus ()
 
std::string GetSaveData () override
 
void Load (const char *load) override
 
void SetData (uint32 type, uint32 data) override
 
uint32 GetData (uint32 type) const override
 
void Update (uint32 diff) override
 
ObjectGuid GetGuidData (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)
 

Public Attributes

ObjectGuid HarkorsSatchelGUID
 
ObjectGuid TanzarsTrunkGUID
 
ObjectGuid AshlisBagGUID
 
ObjectGuid KrazsPackageGUID
 
ObjectGuid StrangeGongGUID
 
ObjectGuid HarrisonJonesGUID
 
ObjectGuid HexLordGateGUID
 
ObjectGuid ZulJinGateGUID
 
ObjectGuid MassiveGateGUID
 
ObjectGuid AkilzonDoorGUID
 
ObjectGuid ZulJinDoorGUID
 
ObjectGuid HalazziDoorGUID
 
uint32 QuestTimer
 
uint16 BossKilled
 
uint16 QuestMinute
 
uint16 ChestLooted
 
uint32 m_auiEncounter [MAX_ENCOUNTER]
 
uint32 RandVendor [RAND_VENDOR]
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- 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_zulaman_InstanceMapScript()

instance_zulaman::instance_zulaman_InstanceMapScript::instance_zulaman_InstanceMapScript ( Map map)
inline
79: InstanceScript(map) {}
Definition: InstanceScript.h:142

Member Function Documentation

◆ CheckInstanceStatus()

void instance_zulaman::instance_zulaman_InstanceMapScript::CheckInstanceStatus ( )
inline
218 {
221
224 }
@ DATA_HEXLORDEVENT
Definition: zulaman.h:33
@ DATA_HALAZZIEVENT
Definition: zulaman.h:32
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
ObjectGuid ZulJinGateGUID
Definition: instance_zulaman.cpp:89
uint16 BossKilled
Definition: instance_zulaman.cpp:96
ObjectGuid HexLordGateGUID
Definition: instance_zulaman.cpp:88

References BossKilled, DATA_HALAZZIEVENT, DATA_HEXLORDEVENT, InstanceScript::HandleGameObject(), HexLordGateGUID, and ZulJinGateGUID.

Referenced by OnGameObjectCreate(), and SetData().

◆ GetData()

uint32 instance_zulaman::instance_zulaman_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

348 {
349 switch (type)
350 {
351 case DATA_GONGEVENT:
363 case DATA_ZULJINEVENT:
365 case DATA_CHESTLOOTED:
366 return ChestLooted;
368 return RandVendor[0];
370 return RandVendor[1];
371 default:
372 return 0;
373 }
374 }
@ DATA_CHESTLOOTED
Definition: zulaman.h:36
@ DATA_JANALAIEVENT
Definition: zulaman.h:31
@ DATA_NALORAKKEVENT
Definition: zulaman.h:29
@ DATA_GONGEVENT
Definition: zulaman.h:28
@ DATA_ZULJINEVENT
Definition: zulaman.h:34
@ TYPE_RAND_VENDOR_1
Definition: zulaman.h:37
@ DATA_AKILZONEVENT
Definition: zulaman.h:30
@ TYPE_RAND_VENDOR_2
Definition: zulaman.h:38
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_zulaman.cpp:100
uint32 RandVendor[RAND_VENDOR]
Definition: instance_zulaman.cpp:101
uint16 ChestLooted
Definition: instance_zulaman.cpp:98

References ChestLooted, DATA_AKILZONEVENT, DATA_CHESTLOOTED, DATA_GONGEVENT, DATA_HALAZZIEVENT, DATA_HEXLORDEVENT, DATA_JANALAIEVENT, DATA_NALORAKKEVENT, DATA_ZULJINEVENT, m_auiEncounter, RandVendor, TYPE_RAND_VENDOR_1, and TYPE_RAND_VENDOR_2.

◆ GetGuidData()

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

397 {
398 switch (type)
399 {
400 case GO_STRANGE_GONG:
401 return StrangeGongGUID;
402 case GO_MASSIVE_GATE:
403 return MassiveGateGUID;
404 }
405
406 return ObjectGuid::Empty;
407 }
@ GO_STRANGE_GONG
Definition: zulaman.h:68
@ GO_MASSIVE_GATE
Definition: zulaman.h:61
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid StrangeGongGUID
Definition: instance_zulaman.cpp:85
ObjectGuid MassiveGateGUID
Definition: instance_zulaman.cpp:90

References ObjectGuid::Empty, GO_MASSIVE_GATE, GO_STRANGE_GONG, MassiveGateGUID, and StrangeGongGUID.

◆ GetSaveData()

std::string instance_zulaman::instance_zulaman_InstanceMapScript::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

227 {
229
230 std::ostringstream ss;
231 ss << "S " << BossKilled << ' ' << ChestLooted << ' ' << QuestMinute;
232
234 return ss.str();
235 }
#define OUT_SAVE_INST_DATA_COMPLETE
Definition: InstanceScript.h:29
#define OUT_SAVE_INST_DATA
Definition: InstanceScript.h:28
uint16 QuestMinute
Definition: instance_zulaman.cpp:97

References BossKilled, ChestLooted, OUT_SAVE_INST_DATA, OUT_SAVE_INST_DATA_COMPLETE, and QuestMinute.

◆ Initialize()

void instance_zulaman::instance_zulaman_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

104 {
107 memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
108
109 QuestTimer = 0;
110 QuestMinute = 0;
111 BossKilled = 0;
112 ChestLooted = 0;
113
114 for (uint8 i = 0; i < RAND_VENDOR; ++i)
116
118 }
std::uint8_t uint8
Definition: Define.h:109
@ NOT_STARTED
Definition: InstanceScript.h:57
ObjectData const gameObjectData[]
Definition: instance_zulaman.cpp:64
@ RAND_VENDOR
Definition: instance_zulaman.cpp:34
ObjectData const creatureData[]
Definition: instance_zulaman.cpp:58
#define DataHeader
Definition: blackrock_depths.h:23
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:173
uint32 QuestTimer
Definition: instance_zulaman.cpp:95

References BossKilled, ChestLooted, creatureData, DATA_GONGEVENT, DataHeader, gameObjectData, InstanceScript::LoadObjectData(), m_auiEncounter, NOT_STARTED, QuestMinute, QuestTimer, RAND_VENDOR, RandVendor, and InstanceScript::SetHeaders().

◆ IsEncounterInProgress()

bool instance_zulaman::instance_zulaman_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

121 {
122 for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
123 if (m_auiEncounter[i] == IN_PROGRESS)
124 return true;
125
126 return false;
127 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ MAX_ENCOUNTER
Definition: instance_zulaman.cpp:33

References IN_PROGRESS, m_auiEncounter, and MAX_ENCOUNTER.

◆ Load()

void instance_zulaman::instance_zulaman_InstanceMapScript::Load ( const char *  load)
inlineoverridevirtual

Reimplemented from InstanceScript.

238 {
239 if (!load)
240 return;
241
242 std::istringstream ss(load);
243 char dataHead; // S
244 uint16 data1, data2, data3;
245 ss >> dataHead >> data1 >> data2 >> data3;
246
247 if (dataHead == 'S')
248 {
249 BossKilled = data1;
250 ChestLooted = data2;
251 QuestMinute = data3;
252 }
253 else
254 {
255 LOG_ERROR("misc", "Zul'aman: corrupted save data.");
256 }
257 }
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
std::uint16_t uint16
Definition: Define.h:108

References BossKilled, ChestLooted, LOG_ERROR, and QuestMinute.

◆ OnCreatureCreate()

void instance_zulaman::instance_zulaman_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

136 {
137 switch (creature->GetEntry())
138 {
140 HarrisonJonesGUID = creature->GetGUID();
141 break;
142 case NPC_JANALAI:
143 case NPC_ZULJIN:
144 case NPC_HEXLORD:
145 case NPC_HALAZZI:
146 case NPC_NALORAKK:
147 default:
148 break;
149 }
151 }
@ NPC_JANALAI
Definition: zulaman.h:44
@ NPC_NALORAKK
Definition: zulaman.h:48
@ NPC_HALAZZI
Definition: zulaman.h:47
@ NPC_ZULJIN
Definition: zulaman.h:45
@ NPC_HARRISON_JONES
Definition: zulaman.h:43
@ NPC_HEXLORD
Definition: zulaman.h:46
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void OnCreatureCreate(Creature *creature) override
Definition: InstanceScript.cpp:58
ObjectGuid HarrisonJonesGUID
Definition: instance_zulaman.cpp:86

References Object::GetEntry(), Object::GetGUID(), HarrisonJonesGUID, NPC_HALAZZI, NPC_HARRISON_JONES, NPC_HEXLORD, NPC_JANALAI, NPC_NALORAKK, NPC_ZULJIN, and InstanceScript::OnCreatureCreate().

◆ OnGameObjectCreate()

void instance_zulaman::instance_zulaman_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

154 {
155 switch (go->GetEntry())
156 {
157 case GO_DOOR_HALAZZI:
158 HalazziDoorGUID = go->GetGUID();
159 break;
160 case GO_GATE_ZULJIN:
161 ZulJinGateGUID = go->GetGUID();
162 break;
163 case GO_GATE_HEXLORD:
164 HexLordGateGUID = go->GetGUID();
165 break;
166 case GO_MASSIVE_GATE:
167 MassiveGateGUID = go->GetGUID();
168 break;
169 case GO_DOOR_AKILZON:
170 AkilzonDoorGUID = go->GetGUID();
171 break;
172 case GO_DOOR_ZULJIN:
173 ZulJinDoorGUID = go->GetGUID();
174 break;
175
178 break;
179 case GO_TANZARS_TRUNK:
181 break;
182 case GO_ASHLIS_BAG:
183 AshlisBagGUID = go->GetGUID();
184 break;
185 case GO_KRAZS_PACKAGE:
187 break;
188 case GO_STRANGE_GONG:
189 StrangeGongGUID = go->GetGUID();
190 break;
191 default:
192 break;
193 }
195 }
@ GO_KRAZS_PACKAGE
Definition: zulaman.h:67
@ GO_ASHLIS_BAG
Definition: zulaman.h:66
@ GO_GATE_HEXLORD
Definition: zulaman.h:60
@ GO_DOOR_ZULJIN
Definition: zulaman.h:63
@ GO_DOOR_AKILZON
Definition: zulaman.h:62
@ GO_DOOR_HALAZZI
Definition: zulaman.h:58
@ GO_HARKORS_SATCHEL
Definition: zulaman.h:64
@ GO_TANZARS_TRUNK
Definition: zulaman.h:65
@ GO_GATE_ZULJIN
Definition: zulaman.h:59
ObjectGuid HalazziDoorGUID
Definition: instance_zulaman.cpp:93
ObjectGuid TanzarsTrunkGUID
Definition: instance_zulaman.cpp:82
ObjectGuid ZulJinDoorGUID
Definition: instance_zulaman.cpp:92
ObjectGuid HarkorsSatchelGUID
Definition: instance_zulaman.cpp:81
void CheckInstanceStatus()
Definition: instance_zulaman.cpp:217
ObjectGuid AkilzonDoorGUID
Definition: instance_zulaman.cpp:91
ObjectGuid KrazsPackageGUID
Definition: instance_zulaman.cpp:84
ObjectGuid AshlisBagGUID
Definition: instance_zulaman.cpp:83

References AkilzonDoorGUID, AshlisBagGUID, CheckInstanceStatus(), Object::GetEntry(), Object::GetGUID(), GO_ASHLIS_BAG, GO_DOOR_AKILZON, GO_DOOR_HALAZZI, GO_DOOR_ZULJIN, GO_GATE_HEXLORD, GO_GATE_ZULJIN, GO_HARKORS_SATCHEL, GO_KRAZS_PACKAGE, GO_MASSIVE_GATE, GO_STRANGE_GONG, GO_TANZARS_TRUNK, HalazziDoorGUID, HarkorsSatchelGUID, HexLordGateGUID, KrazsPackageGUID, MassiveGateGUID, StrangeGongGUID, TanzarsTrunkGUID, ZulJinDoorGUID, and ZulJinGateGUID.

◆ OnPlayerEnter()

void instance_zulaman::instance_zulaman_InstanceMapScript::OnPlayerEnter ( Player )
inlineoverridevirtual

Reimplemented from InstanceScript.

130 {
133 }
Position const HarrisonJonesLoc
Definition: instance_zulaman.cpp:56
Map * instance
Definition: InstanceScript.h:148
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, bool visibleBySummonerOnly=false)
Definition: Object.cpp:2163

References HarrisonJonesGUID, HarrisonJonesLoc, InstanceScript::instance, NPC_HARRISON_JONES, and Map::SummonCreature().

◆ SetData()

void instance_zulaman::instance_zulaman_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

260 {
261 switch (type)
262 {
263 case DATA_GONGEVENT:
265 if (data == IN_PROGRESS)
266 SaveToDB();
267 else if (data == DONE)
268 QuestMinute = 21;
269 break;
272 if (data == DONE)
273 {
274 if (QuestMinute)
275 {
276 QuestMinute += 15;
278 }
279 SummonHostage(0);
280 SaveToDB();
281 }
282 break;
286 if (data == DONE)
287 {
288 if (QuestMinute)
289 {
290 QuestMinute += 10;
292 }
293 SummonHostage(1);
294 SaveToDB();
295 }
296 break;
299 if (data == DONE)
300 SummonHostage(2);
301 SaveToDB();
302 break;
306 if (data == DONE) SummonHostage(3);
307 SaveToDB();
308 break;
311 if (data == IN_PROGRESS)
313 else if (data == NOT_STARTED)
315 SaveToDB();
316 break;
317 case DATA_ZULJINEVENT:
320 SaveToDB();
321 break;
322 case DATA_CHESTLOOTED:
323 ++ChestLooted;
324 SaveToDB();
325 break;
327 RandVendor[0] = data;
328 break;
330 RandVendor[1] = data;
331 break;
332 }
333
334 if (data == DONE)
335 {
336 ++BossKilled;
338 {
339 QuestMinute = 0;
341 }
343 SaveToDB();
344 }
345 }
@ DONE
Definition: InstanceScript.h:60
@ WORLDSTATE_TIME_TO_SACRIFICE
Definition: instance_zulaman.cpp:36
@ WORLDSTATE_SHOW_TIMER
Definition: instance_zulaman.cpp:35
void SaveToDB()
Definition: InstanceScript.cpp:41
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:577
void SummonHostage(uint8 num)
Definition: instance_zulaman.cpp:197

References AkilzonDoorGUID, BossKilled, CheckInstanceStatus(), ChestLooted, DATA_AKILZONEVENT, DATA_CHESTLOOTED, DATA_GONGEVENT, DATA_HALAZZIEVENT, DATA_HEXLORDEVENT, DATA_JANALAIEVENT, DATA_NALORAKKEVENT, DATA_ZULJINEVENT, DONE, InstanceScript::DoUpdateWorldState(), HalazziDoorGUID, InstanceScript::HandleGameObject(), HexLordGateGUID, IN_PROGRESS, m_auiEncounter, NOT_STARTED, QuestMinute, RandVendor, InstanceScript::SaveToDB(), SummonHostage(), TYPE_RAND_VENDOR_1, TYPE_RAND_VENDOR_2, WORLDSTATE_SHOW_TIMER, WORLDSTATE_TIME_TO_SACRIFICE, and ZulJinDoorGUID.

◆ SummonHostage()

void instance_zulaman::instance_zulaman_InstanceMapScript::SummonHostage ( uint8  num)
inline
198 {
199 if (!QuestMinute)
200 return;
201
202 Map::PlayerList const& PlayerList = instance->GetPlayers();
203 if (PlayerList.IsEmpty())
204 return;
205
206 Map::PlayerList::const_iterator i = PlayerList.begin();
207 if (Player* i_pl = i->GetSource())
208 {
209 if (Unit* Hostage = i_pl->SummonCreature(HostageInfo[num].npc, HostageInfo[num].x, HostageInfo[num].y, HostageInfo[num].z, HostageInfo[num].o, TEMPSUMMON_DEAD_DESPAWN, 0))
210 {
211 Hostage->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
212 Hostage->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
213 }
214 }
215 }
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ TEMPSUMMON_DEAD_DESPAWN
Definition: Object.h:51
static SHostageInfo HostageInfo[]
Definition: instance_zulaman.cpp:48
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: LinkedList.h:139
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
Definition: Player.h:1064
Definition: Unit.h:630
PlayerList const & GetPlayers() const
Definition: Map.h:486
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
uint32 npc
Definition: instance_zulaman.cpp:44
float x
Definition: instance_zulaman.cpp:45
float z
Definition: instance_zulaman.cpp:45
float y
Definition: instance_zulaman.cpp:45
float o
Definition: instance_zulaman.cpp:45

References MapRefMgr::begin(), Map::GetPlayers(), HostageInfo, InstanceScript::instance, LinkedListHead::IsEmpty(), SHostageInfo::npc, SHostageInfo::o, QuestMinute, WorldObject::SummonCreature(), TEMPSUMMON_DEAD_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, UNIT_NPC_FLAG_GOSSIP, SHostageInfo::x, SHostageInfo::y, and SHostageInfo::z.

Referenced by SetData().

◆ Update()

void instance_zulaman::instance_zulaman_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Member Data Documentation

◆ AkilzonDoorGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::AkilzonDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ AshlisBagGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::AshlisBagGUID

Referenced by OnGameObjectCreate().

◆ BossKilled

uint16 instance_zulaman::instance_zulaman_InstanceMapScript::BossKilled

◆ ChestLooted

uint16 instance_zulaman::instance_zulaman_InstanceMapScript::ChestLooted

◆ HalazziDoorGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::HalazziDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ HarkorsSatchelGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::HarkorsSatchelGUID

Referenced by OnGameObjectCreate().

◆ HarrisonJonesGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::HarrisonJonesGUID

Referenced by OnCreatureCreate(), and OnPlayerEnter().

◆ HexLordGateGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::HexLordGateGUID

◆ KrazsPackageGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::KrazsPackageGUID

Referenced by OnGameObjectCreate().

◆ m_auiEncounter

uint32 instance_zulaman::instance_zulaman_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]

◆ MassiveGateGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::MassiveGateGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ QuestMinute

uint16 instance_zulaman::instance_zulaman_InstanceMapScript::QuestMinute

◆ QuestTimer

uint32 instance_zulaman::instance_zulaman_InstanceMapScript::QuestTimer

Referenced by Initialize(), and Update().

◆ RandVendor

uint32 instance_zulaman::instance_zulaman_InstanceMapScript::RandVendor[RAND_VENDOR]

Referenced by GetData(), Initialize(), and SetData().

◆ StrangeGongGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::StrangeGongGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ TanzarsTrunkGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::TanzarsTrunkGUID

Referenced by OnGameObjectCreate().

◆ ZulJinDoorGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::ZulJinDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ ZulJinGateGUID

ObjectGuid instance_zulaman::instance_zulaman_InstanceMapScript::ZulJinGateGUID