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

Public Member Functions

 instance_trial_of_the_champion_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
bool IsEncounterInProgress () const override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
std::string GetSaveData () override
 
void Load (const char *in) override
 
void OnPlayerEnter (Player *plr) override
 
bool DoNeedCleanup (Player *ignoredPlayer=nullptr)
 
void InstanceCleanup ()
 
uint32 GetData (uint32 uiData) const override
 
ObjectGuid GetGuidData (uint32 uiData) const override
 
void SetData (uint32 uiType, uint32 uiData) override
 
void DoSummonGrandChampion (uint32 BossNumber, uint8 BossOrder)
 
void Update (uint32 diff) override
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *, Unit const *, uint32) 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

bool CLEANED
 
TeamId TeamIdInInstance
 
uint32 InstanceProgress
 
uint32 m_auiEncounter [MAX_ENCOUNTER]
 
std::string str_data
 
GuidList VehicleList
 
EventMap events
 
uint8 Counter
 
uint8 temp1
 
uint8 temp2
 
bool shortver
 
bool bAchievIveHadWorse
 
ObjectGuid NPC_AnnouncerGUID
 
ObjectGuid NPC_TirionGUID
 
ObjectGuid NPC_GrandChampionGUID [3]
 
ObjectGuid NPC_GrandChampionMinionsGUID [3][3]
 
ObjectGuid NPC_ArgentChampionGUID
 
ObjectGuid NPC_ArgentSoldierGUID [3][3]
 
uint32 NPC_MemoryEntry
 
ObjectGuid NPC_BlackKnightVehicleGUID
 
ObjectGuid NPC_BlackKnightGUID
 
ObjectGuid GO_MainGateGUID
 
ObjectGuid GO_EnterGateGUID
 
- 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_trial_of_the_champion_InstanceMapScript()

instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::instance_trial_of_the_champion_InstanceMapScript ( Map pMap)
inline
53 : InstanceScript(pMap)
54 {
56 Initialize();
57 }
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:142
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138
void Initialize() override
Definition: instance_trial_of_the_champion.cpp:84

References DataHeader, Initialize(), and InstanceScript::SetHeaders().

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

1248 {
1249 switch (criteria_id)
1250 {
1251 case 11789: // I've Had Worse criteria id
1252 return bAchievIveHadWorse;
1253 case 11863:
1254 return NPC_MemoryEntry == 34942;
1255 case 11904:
1256 return NPC_MemoryEntry == 35028;
1257 case 11905:
1258 return NPC_MemoryEntry == 35029;
1259 case 11906:
1260 return NPC_MemoryEntry == 35030;
1261 case 11907:
1262 return NPC_MemoryEntry == 35031;
1263 case 11908:
1264 return NPC_MemoryEntry == 35032;
1265 case 11909:
1266 return NPC_MemoryEntry == 35033;
1267 case 11910:
1268 return NPC_MemoryEntry == 35034;
1269 case 11911:
1270 return NPC_MemoryEntry == 35036;
1271 case 11912:
1272 return NPC_MemoryEntry == 35037;
1273 case 11913:
1274 return NPC_MemoryEntry == 35038;
1275 case 11914:
1276 return NPC_MemoryEntry == 35039;
1277 case 11915:
1278 return NPC_MemoryEntry == 35040;
1279 case 11916:
1280 return NPC_MemoryEntry == 35041;
1281 case 11917:
1282 return NPC_MemoryEntry == 35042;
1283 case 11918:
1284 return NPC_MemoryEntry == 35043;
1285 case 11919:
1286 return NPC_MemoryEntry == 35044;
1287 case 11920:
1288 return NPC_MemoryEntry == 35045;
1289 case 11921:
1290 return NPC_MemoryEntry == 35046;
1291 case 11922:
1292 return NPC_MemoryEntry == 35047;
1293 case 11923:
1294 return NPC_MemoryEntry == 35048;
1295 case 11924:
1296 return NPC_MemoryEntry == 35049;
1297 case 11925:
1298 return NPC_MemoryEntry == 35050;
1299 case 11926:
1300 return NPC_MemoryEntry == 35051;
1301 case 11927:
1302 return NPC_MemoryEntry == 35052;
1303 }
1304 return false;
1305 }
uint32 NPC_MemoryEntry
Definition: instance_trial_of_the_champion.cpp:78
bool bAchievIveHadWorse
Definition: instance_trial_of_the_champion.cpp:70

References bAchievIveHadWorse, and NPC_MemoryEntry.

◆ DoNeedCleanup()

bool instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::DoNeedCleanup ( Player ignoredPlayer = nullptr)
inline
285 {
286 uint8 aliveCount = 0;
287 for (const auto &itr: instance->GetPlayers())
288 {
289 if (Player* plr = itr.GetSource())
290 {
291 if (plr != ignoredPlayer && plr->IsAlive() && !plr->IsGameMaster())
292 {
293 ++aliveCount;
294 }
295 }
296 }
297
298 bool need = aliveCount == 0;
299 if (!need && CLEANED)
300 {
301 CLEANED = false;
302 }
303
304 return need;
305 }
std::uint8_t uint8
Definition: Define.h:109
Definition: Player.h:1064
Map * instance
Definition: InstanceScript.h:148
PlayerList const & GetPlayers() const
Definition: Map.h:486
bool CLEANED
Definition: instance_trial_of_the_champion.cpp:59

References CLEANED, Map::GetPlayers(), and InstanceScript::instance.

Referenced by OnPlayerEnter(), and Update().

◆ DoSummonGrandChampion()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::DoSummonGrandChampion ( uint32  BossNumber,
uint8  BossOrder 
)
inline
Todo:
: Missing Argent Raid Spectator cheers.
706 {
707 uint32 CHAMPION_TO_SUMMON = 0;
708 uint32 MINION_TO_SUMMON = 0;
709 int32 TEXT_ID = 0;
710
711 switch (BossNumber)
712 {
713 case 0:
714 CHAMPION_TO_SUMMON = NPC_MOKRA;
715 MINION_TO_SUMMON = NPC_ORGRIMMAR_MINION;
717 break;
718 case 1:
719 CHAMPION_TO_SUMMON = NPC_ERESSEA;
720 MINION_TO_SUMMON = NPC_SILVERMOON_MINION;
722 break;
723 case 2:
724 CHAMPION_TO_SUMMON = NPC_RUNOK;
725 MINION_TO_SUMMON = NPC_THUNDER_BLUFF_MINION;
727 break;
728 case 3:
729 CHAMPION_TO_SUMMON = NPC_ZULTORE;
730 MINION_TO_SUMMON = NPC_SENJIN_MINION;
732 break;
733 case 4:
734 CHAMPION_TO_SUMMON = NPC_VISCERI;
735 MINION_TO_SUMMON = NPC_UNDERCITY_MINION;
737 break;
738 default:
739 return;
740 }
741
743 if (shortver)
744 switch (BossOrder)
745 {
746 case 0:
747 SpawnPos.Relocate(780.43f, 607.15f, 411.82f);
748 break;
749 case 1:
750 SpawnPos.Relocate(768.72f, 581.01f, 411.92f);
751 break;
752 case 2:
753 SpawnPos.Relocate(784.02f, 645.33f, 412.39f);
754 break;
755 }
756
757 if (Creature* pBoss = instance->SummonCreature(CHAMPION_TO_SUMMON, SpawnPos))
758 {
759 NPC_GrandChampionGUID[BossOrder] = pBoss->GetGUID();
760 pBoss->ToCreature()->SetReactState(REACT_PASSIVE);
761 pBoss->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED);
762 pBoss->SetImmuneToAll(true);
763 pBoss->ToCreature()->SetHomePosition(748.309f, 619.448f, 411.3f, M_PI / 2);
764 pBoss->AI()->SetData(BossOrder, (shortver ? 1 : 0));
765
766 for( uint8 i = 0; i < 3; ++i )
767 if (Creature* pAdd = instance->SummonCreature(MINION_TO_SUMMON, SpawnPos))
768 {
769 NPC_GrandChampionMinionsGUID[BossOrder][i] = pAdd->GetGUID();
770 pAdd->SetReactState(REACT_PASSIVE);
771 pAdd->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
772 pAdd->SetImmuneToAll(true);
773 pAdd->SetHomePosition(748.309f, 619.448f, 411.3f, M_PI / 2);
774 pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, (i + 1)*M_PI / 2);
775 }
776 }
777
778 if (!shortver)
780 {
781 announcer->AI()->Talk(TEXT_ID);
782 }
783 }
std::int32_t int32
Definition: Define.h:103
std::uint32_t uint32
Definition: Define.h:107
@ REACT_PASSIVE
Definition: Unit.h:548
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ UNIT_FLAG_PACIFIED
Definition: UnitDefines.h:246
const Position SpawnPos
Definition: halls_of_reflection.h:315
@ SAY_GRAND_CHAMPIONS_INTRO_WILDMANE
Definition: trial_of_the_champion.h:205
@ SAY_GRAND_CHAMPIONS_INTRO_SKULLCRUSHER
Definition: trial_of_the_champion.h:203
@ SAY_GRAND_CHAMPIONS_INTRO_DAWNSINGER
Definition: trial_of_the_champion.h:201
@ SAY_GRAND_CHAMPIONS_INTRO_DEATHSTALKER
Definition: trial_of_the_champion.h:204
@ SAY_GRAND_CHAMPIONS_INTRO_ZULTORE
Definition: trial_of_the_champion.h:202
@ NPC_ERESSEA
Definition: trial_of_the_champion.h:108
@ NPC_SILVERMOON_MINION
Definition: trial_of_the_champion.h:127
@ NPC_SENJIN_MINION
Definition: trial_of_the_champion.h:129
@ NPC_RUNOK
Definition: trial_of_the_champion.h:109
@ NPC_ZULTORE
Definition: trial_of_the_champion.h:110
@ NPC_THUNDER_BLUFF_MINION
Definition: trial_of_the_champion.h:128
@ NPC_MOKRA
Definition: trial_of_the_champion.h:107
@ NPC_UNDERCITY_MINION
Definition: trial_of_the_champion.h:130
@ NPC_VISCERI
Definition: trial_of_the_champion.h:111
@ NPC_ORGRIMMAR_MINION
Definition: trial_of_the_champion.h:126
const Position SpawnPosition
Definition: instance_trial_of_the_champion.cpp:25
Definition: Creature.h:46
Definition: Position.h:28
void Relocate(float x, float y)
Definition: Position.h:73
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314
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
ObjectGuid NPC_AnnouncerGUID
Definition: instance_trial_of_the_champion.cpp:72
ObjectGuid NPC_GrandChampionGUID[3]
Definition: instance_trial_of_the_champion.cpp:74
ObjectGuid NPC_GrandChampionMinionsGUID[3][3]
Definition: instance_trial_of_the_champion.cpp:75
bool shortver
Definition: instance_trial_of_the_champion.cpp:69

References Map::GetCreature(), InstanceScript::instance, NPC_AnnouncerGUID, NPC_ERESSEA, NPC_GrandChampionGUID, NPC_GrandChampionMinionsGUID, NPC_MOKRA, NPC_ORGRIMMAR_MINION, NPC_RUNOK, NPC_SENJIN_MINION, NPC_SILVERMOON_MINION, NPC_THUNDER_BLUFF_MINION, NPC_UNDERCITY_MINION, NPC_VISCERI, NPC_ZULTORE, REACT_PASSIVE, Position::Relocate(), SAY_GRAND_CHAMPIONS_INTRO_DAWNSINGER, SAY_GRAND_CHAMPIONS_INTRO_DEATHSTALKER, SAY_GRAND_CHAMPIONS_INTRO_SKULLCRUSHER, SAY_GRAND_CHAMPIONS_INTRO_WILDMANE, SAY_GRAND_CHAMPIONS_INTRO_ZULTORE, shortver, SpawnPos, SpawnPosition, Map::SummonCreature(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_PACIFIED.

Referenced by SetData(), and Update().

◆ GetData()

uint32 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::GetData ( uint32  uiData) const
inlineoverridevirtual

Reimplemented from ZoneScript.

462 {
463 switch (uiData)
464 {
466 return InstanceProgress;
468 return TeamIdInInstance;
469 }
470
471 return 0;
472 }
@ DATA_INSTANCE_PROGRESS
Definition: trial_of_the_champion.h:33
@ DATA_TEAMID_IN_INSTANCE
Definition: trial_of_the_champion.h:44
TeamId TeamIdInInstance
Definition: instance_trial_of_the_champion.cpp:60
uint32 InstanceProgress
Definition: instance_trial_of_the_champion.cpp:61

References DATA_INSTANCE_PROGRESS, DATA_TEAMID_IN_INSTANCE, InstanceProgress, and TeamIdInInstance.

◆ GetGuidData()

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::GetGuidData ( uint32  uiData) const
inlineoverridevirtual

Reimplemented from InstanceScript.

475 {
476 switch (uiData)
477 {
478 case DATA_ANNOUNCER:
479 return NPC_AnnouncerGUID;
480 case DATA_PALETRESS:
482 }
483
484 return ObjectGuid::Empty;
485 }
@ DATA_PALETRESS
Definition: trial_of_the_champion.h:45
@ DATA_ANNOUNCER
Definition: trial_of_the_champion.h:35
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid NPC_ArgentChampionGUID
Definition: instance_trial_of_the_champion.cpp:76

References DATA_ANNOUNCER, DATA_PALETRESS, ObjectGuid::Empty, NPC_AnnouncerGUID, and NPC_ArgentChampionGUID.

◆ GetSaveData()

std::string instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

225 {
227 std::ostringstream saveStream;
228 saveStream << "T C " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << InstanceProgress;
229 str_data = saveStream.str();
231 return str_data;
232 }
#define OUT_SAVE_INST_DATA_COMPLETE
Definition: InstanceScript.h:29
#define OUT_SAVE_INST_DATA
Definition: InstanceScript.h:28
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_trial_of_the_champion.cpp:62
std::string str_data
Definition: instance_trial_of_the_champion.cpp:63

References InstanceProgress, m_auiEncounter, OUT_SAVE_INST_DATA, OUT_SAVE_INST_DATA_COMPLETE, and str_data.

◆ Initialize()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

85 {
88 memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
89
90 VehicleList.clear();
91 CLEANED = false;
92 events.Reset();
93 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0);
94 Counter = 0;
95 temp1 = 0;
96 temp2 = 0;
97 shortver = false;
98 bAchievIveHadWorse = true;
99 }
@ EVENT_CHECK_PLAYERS
Definition: boss_kiljaeden.cpp:121
events
Definition: boss_sartura.cpp:43
@ TEAM_NEUTRAL
Definition: SharedDefines.h:762
GuidList VehicleList
Definition: instance_trial_of_the_champion.cpp:65
uint8 temp2
Definition: instance_trial_of_the_champion.cpp:68
uint8 Counter
Definition: instance_trial_of_the_champion.cpp:67
uint8 temp1
Definition: instance_trial_of_the_champion.cpp:68

References bAchievIveHadWorse, CLEANED, Counter, EVENT_CHECK_PLAYERS, InstanceProgress, m_auiEncounter, shortver, TEAM_NEUTRAL, TeamIdInInstance, temp1, temp2, and VehicleList.

Referenced by instance_trial_of_the_champion_InstanceMapScript().

◆ InstanceCleanup()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::InstanceCleanup ( )
inline
308 {
309 if (CLEANED)
310 return;
311
312 switch (InstanceProgress)
313 {
319 // revert to INSTANCE_PROGRESS_INITIAL
320 {
321 for (ObjectGuid const& guid : VehicleList)
322 if (Creature* veh = instance->GetCreature(guid))
323 {
324 veh->DespawnOrUnsummon();
325 veh->SetRespawnTime(3);
326 }
327 for( uint8 i = 0; i < 3; ++i )
328 {
329 for( uint8 j = 0; j < 3; ++j )
330 {
332 c->DespawnOrUnsummon();
334 }
336 c->DespawnOrUnsummon();
338 }
340 {
341 c->DespawnOrUnsummon();
342 c->SetHomePosition(748.309f, 619.488f, 411.172f, 4.71239f);
343 c->SetPosition(748.309f, 619.488f, 411.172f, 4.71239f);
344 c->SetRespawnTime(3);
345 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
346 }
348 }
349 break;
351 {
353 {
354 announcer->DespawnOrUnsummon();
355 announcer->SetHomePosition(735.81f, 661.92f, 412.39f, 4.714f);
356 announcer->SetPosition(735.81f, 661.92f, 412.39f, 4.714f);
357 announcer->SetRespawnTime(3);
358 announcer->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
359
360 for( uint8 i = 0; i < 3; ++i )
362 {
363 uint32 entry = c->GetEntry();
364 c->DespawnOrUnsummon();
365 switch (i)
366 {
367 case 0:
368 if (Creature* pBoss = announcer->SummonCreature(entry, 736.695f, 650.02f, 412.4f, 3 * M_PI / 2))
369 {
370 NPC_GrandChampionGUID[0] = pBoss->GetGUID();
371 pBoss->AI()->SetData(0, 2);
372 }
373 break;
374 case 1:
375 if (Creature* pBoss = announcer->SummonCreature(entry, 756.32f, 650.05f, 412.4f, 3 * M_PI / 2))
376 {
377 NPC_GrandChampionGUID[1] = pBoss->GetGUID();
378 pBoss->AI()->SetData(1, 2);
379 }
380 break;
381 case 2:
382 if (Creature* pBoss = announcer->SummonCreature(entry, 746.5f, 650.65f, 411.7f, 3 * M_PI / 2))
383 {
384 NPC_GrandChampionGUID[2] = pBoss->GetGUID();
385 pBoss->AI()->SetData(2, 2);
386 }
387 break;
388 }
389 }
390 }
391 }
392 break;
395 // revert to INSTANCE_PROGRESS_CHAMPIONS_DEAD
396 {
397 for( uint8 i = 0; i < 3; ++i )
398 for( uint8 j = 0; j < 3; ++j )
399 {
401 c->DespawnOrUnsummon();
403 }
405 {
406 c->AI()->DoAction(-1); // paletress despawn memory
407 c->DespawnOrUnsummon();
408 }
411 {
412 c->DespawnOrUnsummon();
413 c->SetHomePosition(743.14f, 628.77f, 411.2f, 4.71239f);
414 c->SetPosition(743.14f, 628.77f, 411.2f, 4.71239f);
415 c->SetRespawnTime(3);
416 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
417 }
418 NPC_MemoryEntry = 0;
420 }
421 break;
423 // revert to INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED
424 {
426 c->DespawnOrUnsummon();
429 {
430 c->AI()->DoAction(-1);
431 c->DespawnOrUnsummon();
432 }
435 {
436 c->DespawnOrUnsummon();
437 c->SetHomePosition(743.14f, 628.77f, 411.2f, 4.71239f);
438 c->SetPosition(743.14f, 628.77f, 411.2f, 4.71239f);
439 c->SetRespawnTime(3);
440 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
441 }
443 }
444 break;
447 c->DespawnOrUnsummon();
448 break;
449 }
450
453 Counter = 0;
454 SaveToDB();
455 events.Reset();
457
458 CLEANED = true;
459 }
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ INSTANCE_PROGRESS_ARGENT_SOLDIERS_DIED
Definition: trial_of_the_champion.h:59
@ INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED
Definition: trial_of_the_champion.h:57
@ INSTANCE_PROGRESS_INITIAL
Definition: trial_of_the_champion.h:52
@ INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3
Definition: trial_of_the_champion.h:56
@ INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST
Definition: trial_of_the_champion.h:53
@ INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED
Definition: trial_of_the_champion.h:60
@ INSTANCE_PROGRESS_FINISHED
Definition: trial_of_the_champion.h:61
@ INSTANCE_PROGRESS_CHAMPIONS_DEAD
Definition: trial_of_the_champion.h:58
@ INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1
Definition: trial_of_the_champion.h:54
@ INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2
Definition: trial_of_the_champion.h:55
#define CLEANUP_CHECK_INTERVAL
Definition: instance_trial_of_the_champion.cpp:26
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: ObjectGuid.h:118
void Clear()
Definition: ObjectGuid.h:138
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
void SaveToDB()
Definition: InstanceScript.cpp:41
ObjectGuid NPC_BlackKnightGUID
Definition: instance_trial_of_the_champion.cpp:80
ObjectGuid GO_EnterGateGUID
Definition: instance_trial_of_the_champion.cpp:82
ObjectGuid NPC_ArgentSoldierGUID[3][3]
Definition: instance_trial_of_the_champion.cpp:77
ObjectGuid GO_MainGateGUID
Definition: instance_trial_of_the_champion.cpp:81
ObjectGuid NPC_BlackKnightVehicleGUID
Definition: instance_trial_of_the_champion.cpp:79

References CLEANED, CLEANUP_CHECK_INTERVAL, ObjectGuid::Clear(), Counter, EVENT_CHECK_PLAYERS, Map::GetCreature(), GO_EnterGateGUID, GO_MainGateGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED, INSTANCE_PROGRESS_ARGENT_SOLDIERS_DIED, INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1, INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2, INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3, INSTANCE_PROGRESS_CHAMPIONS_DEAD, INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED, INSTANCE_PROGRESS_FINISHED, INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST, INSTANCE_PROGRESS_INITIAL, InstanceProgress, NPC_AnnouncerGUID, NPC_ArgentChampionGUID, NPC_ArgentSoldierGUID, NPC_BlackKnightGUID, NPC_BlackKnightVehicleGUID, NPC_GrandChampionGUID, NPC_GrandChampionMinionsGUID, NPC_MemoryEntry, InstanceScript::SaveToDB(), WorldObject::SummonCreature(), UNIT_NPC_FLAG_GOSSIP, and VehicleList.

Referenced by OnPlayerEnter(), and Update().

◆ IsEncounterInProgress()

bool instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

102 {
103 for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
104 if (m_auiEncounter[i] == IN_PROGRESS)
105 return true;
106
107 return false;
108 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
#define MAX_ENCOUNTER
Definition: violet_hold.h:21

References IN_PROGRESS, m_auiEncounter, and MAX_ENCOUNTER.

◆ Load()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::Load ( const char *  in)
inlineoverridevirtual

Reimplemented from InstanceScript.

235 {
236 CLEANED = false;
237 events.Reset();
238 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
239
240 if (!in)
241 {
243 return;
244 }
245
247
248 char dataHead1, dataHead2;
249 uint16 data0, data1, data2, data3;
250 std::istringstream loadStream(in);
251 loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3;
252
253 if (dataHead1 == 'T' && dataHead2 == 'C')
254 {
255 m_auiEncounter[0] = data0;
256 m_auiEncounter[1] = data1;
257 m_auiEncounter[2] = data2;
258 InstanceProgress = data3;
261
262 for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
263 if (m_auiEncounter[i] == IN_PROGRESS)
265 }
266 else
268
270 }
std::uint16_t uint16
Definition: Define.h:108
#define OUT_LOAD_INST_DATA_FAIL
Definition: InstanceScript.h:32
#define OUT_LOAD_INST_DATA_COMPLETE
Definition: InstanceScript.h:31
#define OUT_LOAD_INST_DATA(a)
Definition: InstanceScript.h:30
@ NOT_STARTED
Definition: InstanceScript.h:57

References CLEANED, EVENT_CHECK_PLAYERS, IN_PROGRESS, INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED, INSTANCE_PROGRESS_INITIAL, InstanceProgress, m_auiEncounter, MAX_ENCOUNTER, NOT_STARTED, OUT_LOAD_INST_DATA, OUT_LOAD_INST_DATA_COMPLETE, and OUT_LOAD_INST_DATA_FAIL.

◆ OnCreatureCreate()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

111 {
113 {
114 Map::PlayerList const& players = instance->GetPlayers();
115 if (!players.IsEmpty())
116 if (Player* pPlayer = players.begin()->GetSource())
117 TeamIdInInstance = pPlayer->GetTeamId();
118 }
119
120 switch (creature->GetEntry())
121 {
122 // Grand Champions:
123 case NPC_MOKRA:
125 creature->UpdateEntry(NPC_JACOB);
126 break;
127 case NPC_ERESSEA:
129 creature->UpdateEntry(NPC_AMBROSE);
130 break;
131 case NPC_RUNOK:
133 creature->UpdateEntry(NPC_COLOSOS);
134 break;
135 case NPC_ZULTORE:
137 creature->UpdateEntry(NPC_JAELYNE);
138 break;
139 case NPC_VISCERI:
141 creature->UpdateEntry(NPC_LANA);
142 break;
143
144 // Grand Champion Minions:
148 break;
152 break;
156 break;
160 break;
164 break;
165
166 // Argent Champion:
167 case NPC_EADRIC:
168 case NPC_PALETRESS:
169 NPC_ArgentChampionGUID = creature->GetGUID();
170 break;
171
172 // Coliseum Announcer:
173 case NPC_JAEREN:
174 case NPC_ARELAS:
175 NPC_AnnouncerGUID = creature->GetGUID();
176 //if (TeamIdInInstance == TEAM_ALLIANCE)
177 // creature->UpdateEntry(NPC_ARELAS);
178 creature->SetReactState(REACT_PASSIVE);
179 break;
180
181 // Highlord Tirion Fordring
182 case NPC_TIRION:
183 NPC_TirionGUID = creature->GetGUID();
184 break;
185
186 // Beginning vehicles:
190 {
191 creature->DespawnOrUnsummon();
192 creature->SetRespawnTime(3);
193 VehicleList.push_back(creature->GetGUID());
194 }
195 else
196 creature->DespawnOrUnsummon();
197 break;
198 }
200 if (const CreatureAddon* ca = creature->GetCreatureAddon())
201 if (ca->mount != creature->GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID))
202 creature->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, ca->mount);
203 }
@ UNIT_FIELD_MOUNTDISPLAYID
Definition: UpdateFields.h:126
@ VEHICLE_ARGENT_BATTLEWORG
Definition: trial_of_the_champion.h:187
@ VEHICLE_ARGENT_WARHORSE
Definition: trial_of_the_champion.h:186
@ NPC_JAELYNE
Definition: trial_of_the_champion.h:117
@ NPC_LANA
Definition: trial_of_the_champion.h:118
@ NPC_EXODAR_MINION
Definition: trial_of_the_champion.h:124
@ NPC_GNOMEREGAN_MINION
Definition: trial_of_the_champion.h:123
@ NPC_PALETRESS
Definition: trial_of_the_champion.h:134
@ NPC_COLOSOS
Definition: trial_of_the_champion.h:116
@ NPC_IRONFORGE_MINION
Definition: trial_of_the_champion.h:121
@ NPC_TIRION
Definition: trial_of_the_champion.h:147
@ NPC_ARELAS
Definition: trial_of_the_champion.h:144
@ NPC_AMBROSE
Definition: trial_of_the_champion.h:115
@ NPC_DARNASSUS_MINION
Definition: trial_of_the_champion.h:125
@ NPC_JAEREN
Definition: trial_of_the_champion.h:143
@ NPC_STORMWIND_MINION
Definition: trial_of_the_champion.h:122
@ NPC_EADRIC
Definition: trial_of_the_champion.h:132
@ NPC_JACOB
Definition: trial_of_the_champion.h:114
@ TEAM_HORDE
Definition: SharedDefines.h:761
bool IsEmpty() const
Definition: LinkedList.h:97
FROM * GetSource() const
Definition: Reference.h:97
void SetRespawnTime(uint32 respawn)
Definition: Creature.cpp:3762
bool UpdateEntry(uint32 entry, const CreatureData *data=nullptr, bool changelevel=true, bool updateAI=false)
Definition: Creature.cpp:538
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
CreatureAddon const * GetCreatureAddon() const
Definition: Creature.cpp:2692
Definition: CreatureData.h:443
uint32 GetUInt32Value(uint16 index) const
Definition: Object.cpp:305
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21256
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
ObjectGuid NPC_TirionGUID
Definition: instance_trial_of_the_champion.cpp:73

References MapRefMgr::begin(), Creature::DespawnOrUnsummon(), Creature::GetCreatureAddon(), Object::GetEntry(), Object::GetGUID(), Map::GetPlayers(), Reference< TO, FROM >::GetSource(), Object::GetUInt32Value(), InstanceScript::instance, INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED, InstanceProgress, LinkedListHead::IsEmpty(), m_auiEncounter, NOT_STARTED, NPC_AMBROSE, NPC_AnnouncerGUID, NPC_ARELAS, NPC_ArgentChampionGUID, NPC_COLOSOS, NPC_DARNASSUS_MINION, NPC_EADRIC, NPC_ERESSEA, NPC_EXODAR_MINION, NPC_GNOMEREGAN_MINION, NPC_IRONFORGE_MINION, NPC_JACOB, NPC_JAELYNE, NPC_JAEREN, NPC_LANA, NPC_MOKRA, NPC_ORGRIMMAR_MINION, NPC_PALETRESS, NPC_RUNOK, NPC_SENJIN_MINION, NPC_SILVERMOON_MINION, NPC_STORMWIND_MINION, NPC_THUNDER_BLUFF_MINION, NPC_TIRION, NPC_TirionGUID, NPC_UNDERCITY_MINION, NPC_VISCERI, NPC_ZULTORE, REACT_PASSIVE, Creature::SetReactState(), Creature::SetRespawnTime(), Unit::SetUInt32Value(), TEAM_HORDE, TEAM_NEUTRAL, TeamIdInInstance, UNIT_FIELD_MOUNTDISPLAYID, Creature::UpdateEntry(), VEHICLE_ARGENT_BATTLEWORG, VEHICLE_ARGENT_WARHORSE, and VehicleList.

◆ OnGameObjectCreate()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

206 {
207 switch (go->GetEntry())
208 {
209 case GO_MAIN_GATE:
210 GO_MainGateGUID = go->GetGUID();
212 break;
215 HandleGameObject(go->GetGUID(), false, go);
216 break;
218 HandleGameObject(go->GetGUID(), true, go);
220 break;
221 }
222 }
@ GO_SOUTH_PORTCULLIS
Definition: trial_of_the_champion.h:170
@ GO_EAST_PORTCULLIS
Definition: trial_of_the_champion.h:171
@ GO_MAIN_GATE
Definition: trial_of_the_champion.h:169
@ GO_NORTH_PORTCULLIS
Definition: trial_of_the_champion.h:172

References Object::GetEntry(), Object::GetGUID(), GO_EAST_PORTCULLIS, GO_EnterGateGUID, GO_MAIN_GATE, GO_MainGateGUID, GO_NORTH_PORTCULLIS, GO_SOUTH_PORTCULLIS, and InstanceScript::HandleGameObject().

◆ OnPlayerEnter()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::OnPlayerEnter ( Player plr)
inlineoverridevirtual

Reimplemented from InstanceScript.

275 {
276 if (DoNeedCleanup(plr))
277 {
279 }
280
282 }
bool DoNeedCleanup(Player *ignoredPlayer=nullptr)
Definition: instance_trial_of_the_champion.cpp:284
void InstanceCleanup()
Definition: instance_trial_of_the_champion.cpp:307

References CLEANUP_CHECK_INTERVAL, DoNeedCleanup(), EVENT_CHECK_PLAYERS, and InstanceCleanup().

◆ SetData()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetData ( uint32  uiType,
uint32  uiData 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

488 {
489 switch (uiType)
490 {
492 switch (InstanceProgress)
493 {
495 if (uiData == 0) // normal intro
496 {
497 shortver = false;
498
500 {
502 announcer->SetFacingToObject(gate);
504 tirion->AI()->Talk(TEXT_WELCOME);
505 }
506 events.RescheduleEvent(EVENT_YELL_WELCOME_2, 8s);
507 }
508 else // short version
509 {
510 shortver = true;
511
512 temp1 = urand(0, 4);
514 do { temp2 = urand(0, 4); }
515 while( temp1 == temp2 );
517 uint8 number = 0;
518 do { number = urand(0, 4); }
519 while( number == temp1 || number == temp2 );
520 DoSummonGrandChampion(number, 2);
521
523 uiData = DONE; // save to db
525 {
526 announcer->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
527 announcer->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
528 }
529 events.ScheduleEvent(EVENT_GRAND_GROUP_1_MOVE_MIDDLE, 10s);
530 }
531 break;
534 {
535 Counter = urand(0, 1);
536 if (Counter)
537 announcer->AI()->Talk(SAY_EADRIC_INTRO_ANNOUNCER);
538 else
539 announcer->AI()->Talk(SAY_JAEREN_PALETRESS_INTRO);
540 }
542 events.RescheduleEvent(EVENT_START_ARGENT_CHALLENGE_INTRO, 0ms);
543 break;
546 tirion->AI()->Talk(TEXT_BK_INTRO);
547 events.RescheduleEvent(EVENT_SUMMON_BLACK_KNIGHT, 3s);
548 break;
549 }
550 break;
552 if (shortver)
553 break;
554 switch (uiData)
555 {
556 case 0:
557 events.ScheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_2, 0ms);
558 break;
559 case 1:
560 events.ScheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_3, 0ms);
561 break;
562 case 2:
564 {
566 uiData = DONE; // save to db
567 announcer->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
568 announcer->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
569 events.ScheduleEvent(EVENT_GRAND_GROUP_1_MOVE_MIDDLE, 8500ms);
570 }
571 break;
572 }
573 break;
574 case DATA_MOUNT_DIED:
575 switch (InstanceProgress)
576 {
577 case INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST: // fighting group 1/3
578 if (++Counter >= 3)
579 {
580 Counter = 0;
582 uiData = DONE; // save to db
583 events.ScheduleEvent(EVENT_GRAND_GROUP_2_MOVE_MIDDLE, 0ms);
584 }
585 break;
586 case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1: // fighting group 2/3
587 if (++Counter >= 3)
588 {
589 Counter = 0;
591 uiData = DONE; // save to db
592 events.ScheduleEvent(EVENT_GRAND_GROUP_3_MOVE_MIDDLE, 0ms);
593 }
594 break;
595 case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2: // fighting group 3/3
596 if (++Counter >= 3)
597 {
598 Counter = 0;
600 uiData = DONE; // save to db
601 events.ScheduleEvent(EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE, 0ms);
602 }
603 break;
604 case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3: // fighting grand champions (on vehicles)
605 if (++Counter >= 3)
606 {
607 Counter = 0;
609 for (ObjectGuid const& guid : VehicleList)
610 if (Creature* veh = instance->GetCreature(guid))
611 veh->DespawnOrUnsummon();
612 events.ScheduleEvent(EVENT_GRAND_CHAMPIONS_MOVE_SIDE, 0ms);
613 }
614 break;
615 }
616 break;
618 --Counter;
619 break;
621 if (++Counter >= 3)
622 {
623 Counter = 0;
624 VehicleList.clear();
625 uiData = DONE;
627 m_auiEncounter[0] = DONE;
628 bool creditCasted = false;
629 for( uint8 i = 0; i < 3; ++i )
631 {
632 c->GetMotionMaster()->MovePoint(9, 747.36f, 670.07f, 411.9f);
633 if (!creditCasted)
634 {
635 c->CastSpell((Unit*)nullptr, 68572, true);
636 creditCasted = true;
637 }
638 }
640 {
641 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
642 announcer->SummonGameObject(instance->IsHeroic() ? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000); // [LOOT]
643 events.ScheduleEvent(EVENT_RESTORE_ANNOUNCER_GOSSIP, 15s);
644 events.ScheduleEvent(EVENT_GRATZ_SLAIN_CHAMPIONS, 6s);
645 }
646
647 // bind players to instance
648 if (instance->IsHeroic())
650 }
651 break;
653 if (++Counter >= 9)
654 {
655 Counter = 0;
657 uiData = DONE; // save to db
659 }
660 break;
662 {
663 m_auiEncounter[1] = uiData;
664 if (uiData == DONE)
665 {
668 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_RUN_MIDDLE, 0ms);
669 }
670 }
671 break;
673 NPC_MemoryEntry = uiData;
674 break;
676 {
677 events.ScheduleEvent(EVENT_START_BLACK_KNIGHT_SCENE, 3s);
678 }
679 break;
681 {
682 m_auiEncounter[2] = uiData;
683 if (uiData == NOT_STARTED)
684 {
686 bAchievIveHadWorse = true;
687 }
688 else if (uiData == DONE)
689 {
692 }
693 }
694 break;
697 bAchievIveHadWorse = false;
698 break;
699 }
700
701 if (uiData == DONE)
702 SaveToDB();
703 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ DONE
Definition: InstanceScript.h:60
@ MOVEMENTFLAG_WALKING
Definition: UnitDefines.h:352
@ GO_CHAMPIONS_LOOT_H
Definition: trial_of_the_champion.h:175
@ GO_CHAMPIONS_LOOT
Definition: trial_of_the_champion.h:174
@ EVENT_RESTORE_ANNOUNCER_GOSSIP
Definition: trial_of_the_champion.h:84
@ EVENT_SUMMON_BLACK_KNIGHT
Definition: trial_of_the_champion.h:95
@ EVENT_SUMMON_GRAND_CHAMPION_3
Definition: trial_of_the_champion.h:71
@ EVENT_YELL_WELCOME_2
Definition: trial_of_the_champion.h:72
@ EVENT_GRAND_GROUP_2_MOVE_MIDDLE
Definition: trial_of_the_champion.h:75
@ EVENT_GRAND_CHAMPIONS_MOVE_SIDE
Definition: trial_of_the_champion.h:81
@ EVENT_START_BLACK_KNIGHT_SCENE
Definition: trial_of_the_champion.h:96
@ EVENT_START_ARGENT_CHALLENGE_INTRO
Definition: trial_of_the_champion.h:85
@ EVENT_SUMMON_GRAND_CHAMPION_2
Definition: trial_of_the_champion.h:70
@ EVENT_GRAND_GROUP_1_MOVE_MIDDLE
Definition: trial_of_the_champion.h:73
@ EVENT_ARGENT_CHALLENGE_RUN_MIDDLE
Definition: trial_of_the_champion.h:92
@ EVENT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:83
@ EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE
Definition: trial_of_the_champion.h:79
@ EVENT_ARGENT_CHALLENGE_MOVE_FORWARD
Definition: trial_of_the_champion.h:90
@ EVENT_GRAND_GROUP_3_MOVE_MIDDLE
Definition: trial_of_the_champion.h:77
@ DATA_SKELETAL_GRYPHON_LANDED
Definition: trial_of_the_champion.h:43
@ DATA_GRAND_CHAMPION_DIED
Definition: trial_of_the_champion.h:41
@ DATA_ACHIEV_IVE_HAD_WORSE
Definition: trial_of_the_champion.h:47
@ DATA_REACHED_NEW_MOUNT
Definition: trial_of_the_champion.h:39
@ BOSS_BLACK_KNIGHT
Definition: trial_of_the_champion.h:31
@ DATA_GRAND_CHAMPION_REACHED_DEST
Definition: trial_of_the_champion.h:37
@ DATA_ARGENT_SOLDIER_DEFEATED
Definition: trial_of_the_champion.h:42
@ DATA_MOUNT_DIED
Definition: trial_of_the_champion.h:38
@ DATA_ANNOUNCER_GOSSIP_SELECT
Definition: trial_of_the_champion.h:36
@ DATA_MEMORY_ENTRY
Definition: trial_of_the_champion.h:46
@ BOSS_ARGENT_CHALLENGE
Definition: trial_of_the_champion.h:30
@ TEXT_WELCOME
Definition: trial_of_the_champion.h:227
@ SAY_EADRIC_INTRO_ANNOUNCER
Definition: trial_of_the_champion.h:198
@ SAY_JAEREN_PALETRESS_INTRO
Definition: trial_of_the_champion.h:199
@ TEXT_BK_INTRO
Definition: trial_of_the_champion.h:233
Definition: GameObject.h:121
Definition: Unit.h:630
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3319
InstanceMap * ToInstanceMap()
Definition: Map.h:546
bool IsHeroic() const
Definition: Map.h:452
void PermBindAllPlayers()
Definition: Map.cpp:3152
void DoSummonGrandChampion(uint32 BossNumber, uint8 BossOrder)
Definition: instance_trial_of_the_champion.cpp:705

References bAchievIveHadWorse, BOSS_ARGENT_CHALLENGE, BOSS_BLACK_KNIGHT, Counter, DATA_ACHIEV_IVE_HAD_WORSE, DATA_ANNOUNCER_GOSSIP_SELECT, DATA_ARGENT_SOLDIER_DEFEATED, DATA_GRAND_CHAMPION_DIED, DATA_GRAND_CHAMPION_REACHED_DEST, DATA_MEMORY_ENTRY, DATA_MOUNT_DIED, DATA_REACHED_NEW_MOUNT, DATA_SKELETAL_GRYPHON_LANDED, DONE, DoSummonGrandChampion(), EVENT_ARGENT_CHALLENGE_MOVE_FORWARD, EVENT_ARGENT_CHALLENGE_RUN_MIDDLE, EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE, EVENT_GRAND_CHAMPIONS_MOVE_SIDE, EVENT_GRAND_GROUP_1_MOVE_MIDDLE, EVENT_GRAND_GROUP_2_MOVE_MIDDLE, EVENT_GRAND_GROUP_3_MOVE_MIDDLE, EVENT_GRATZ_SLAIN_CHAMPIONS, EVENT_RESTORE_ANNOUNCER_GOSSIP, EVENT_START_ARGENT_CHALLENGE_INTRO, EVENT_START_BLACK_KNIGHT_SCENE, EVENT_SUMMON_BLACK_KNIGHT, EVENT_SUMMON_GRAND_CHAMPION_2, EVENT_SUMMON_GRAND_CHAMPION_3, EVENT_YELL_WELCOME_2, Map::GetCreature(), Map::GetGameObject(), GO_CHAMPIONS_LOOT, GO_CHAMPIONS_LOOT_H, GO_EnterGateGUID, GO_MainGateGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED, INSTANCE_PROGRESS_ARGENT_SOLDIERS_DIED, INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1, INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2, INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3, INSTANCE_PROGRESS_CHAMPIONS_DEAD, INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED, INSTANCE_PROGRESS_FINISHED, INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST, INSTANCE_PROGRESS_INITIAL, InstanceProgress, Map::IsHeroic(), m_auiEncounter, MOVEMENTFLAG_WALKING, NOT_STARTED, NPC_AnnouncerGUID, NPC_GrandChampionGUID, NPC_MemoryEntry, NPC_TirionGUID, InstanceMap::PermBindAllPlayers(), InstanceScript::SaveToDB(), SAY_EADRIC_INTRO_ANNOUNCER, SAY_JAEREN_PALETRESS_INTRO, shortver, temp1, temp2, TEXT_BK_INTRO, TEXT_WELCOME, Map::ToInstanceMap(), urand(), and VehicleList.

◆ Update()

void instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

786 {
787 events.Update(diff);
788 switch (events.ExecuteEvent())
789 {
790 case EVENT_NULL:
791 break;
793 {
794 if (DoNeedCleanup())
795 {
797 }
798 events.RepeatEvent(CLEANUP_CHECK_INTERVAL);
799 }
800 break;
802 {
803 temp1 = urand(0, 4);
806 events.ScheduleEvent(EVENT_CLOSE_GATE, 6s);
807 }
808 break;
810 {
811 do { temp2 = urand(0, 4); }
812 while( temp1 == temp2 );
815 events.ScheduleEvent(EVENT_CLOSE_GATE, 6s);
816 }
817 break;
819 {
820 uint8 number = 0;
821 do { number = urand(0, 4); }
822 while( number == temp1 || number == temp2 );
823 DoSummonGrandChampion(number, 2);
825 events.ScheduleEvent(EVENT_CLOSE_GATE, 6000);
826 }
827 break;
828 case EVENT_CLOSE_GATE:
829 {
831 }
832 break;
834 {
836 {
837 tirion->AI()->Talk(TEXT_WELCOME_2);
838 }
839
840 events.RescheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_1, 8s);
841 break;
842 }
844 {
846 {
847 announcer->SetFacingTo(4.714f);
849 tirion->AI()->Talk(TEXT_BEGIN);
851 }
852 for( uint8 i = 0; i < 3; ++i )
854 {
855 float angle = rand_norm() * 2 * M_PI;
856 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
857 }
858
859 events.ScheduleEvent(EVENT_GRAND_GROUP_1_ATTACK, 3s);
860 }
861 break;
863 {
864 for( uint8 i = 0; i < 3; ++i )
866 {
867 c->SetReactState(REACT_AGGRESSIVE);
868 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
869 c->SetImmuneToAll(false);
870 if (Unit* target = c->SelectNearestTarget(200.0f))
871 c->AI()->AttackStart(target);
872 c->AI()->DoZoneInCombat();
873 }
874 Counter = 0;
875 }
876 break;
878 {
879 for( uint8 i = 0; i < 3; ++i )
881 {
882 float angle = rand_norm() * 2 * M_PI;
883 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
884 }
885
886 events.ScheduleEvent(EVENT_GRAND_GROUP_2_ATTACK, 3s);
887 }
888 break;
890 {
891 for( uint8 i = 0; i < 3; ++i )
893 {
894 c->SetReactState(REACT_AGGRESSIVE);
895 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
896 c->SetImmuneToAll(false);
897 if (Unit* target = c->SelectNearestTarget(200.0f))
898 c->AI()->AttackStart(target);
899 c->AI()->DoZoneInCombat();
900 }
901 }
902 break;
904 {
905 for( uint8 i = 0; i < 3; ++i )
907 {
908 float angle = rand_norm() * 2 * M_PI;
909 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
910 }
911
912 events.ScheduleEvent(EVENT_GRAND_GROUP_3_ATTACK, 3s);
913 }
914 break;
916 {
917 for( uint8 i = 0; i < 3; ++i )
919 {
920 c->SetReactState(REACT_AGGRESSIVE);
921 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
922 c->SetImmuneToAll(false);
923 if (Unit* target = c->SelectNearestTarget(200.0f))
924 c->AI()->AttackStart(target);
925 c->AI()->DoZoneInCombat();
926 }
927 }
928 break;
930 {
931 for( uint8 i = 0; i < 3; ++i )
933 {
934 float angle = rand_norm() * 2 * M_PI;
935 c->GetMotionMaster()->MovePoint(4, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
936 }
937
939 }
940 break;
942 {
943 for( uint8 i = 0; i < 3; ++i )
945 {
946 c->SetReactState(REACT_AGGRESSIVE);
947 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
948 c->SetImmuneToAll(false);
949 if (Unit* target = c->SelectNearestTarget(200.0f))
950 c->AI()->AttackStart(target);
951 c->AI()->DoZoneInCombat();
952 c->CastSpell(c, 67865, true); // SPELL_TRAMPLE_AURA
953 }
954 }
955 break;
957 {
958 for( uint8 i = 0; i < 3; ++i )
960 {
961 c->AI()->DoAction(1);
962 switch (i)
963 {
964 case 0:
965 c->GetMotionMaster()->MovePoint(5, 736.695f, 650.02f, 412.4f);
966 break;
967 case 1:
968 c->GetMotionMaster()->MovePoint(5, 756.32f, 650.05f, 412.4f);
969 break;
970 case 2:
971 c->GetMotionMaster()->MovePoint(5, 746.5f, 650.65f, 411.7f);
972 break;
973 }
974 }
975
976 events.ScheduleEvent(EVENT_GRAND_CHAMPIONS_ATTACK, 15s);
977 }
978 break;
980 {
981 for( uint8 i = 0; i < 3; ++i )
983 {
984 c->SetReactState(REACT_AGGRESSIVE);
985 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
986 c->SetImmuneToAll(false);
987 if (Unit* target = c->SelectNearestTarget(200.0f))
988 c->AI()->AttackStart(target);
989 c->AI()->DoZoneInCombat();
990 c->AI()->DoAction(2);
991 }
992 }
993 break;
995 {
997 tirion->AI()->Talk(TEXT_GRATZ_SLAIN_CHAMPIONS);
998
1000 }
1001 break;
1003 {
1005 announcer->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
1006 }
1007 break;
1009 {
1011 {
1013 {
1014 announcer->SetFacingToObject(gate);
1015 HandleGameObject(GO_MainGateGUID, true, gate);
1016 HandleGameObject(GO_EnterGateGUID, false, gate);
1017 }
1018 }
1019
1020 for( int8 i = 0; i < 3; ++i )
1021 {
1023 float x = pos.GetPositionX();
1024
1025 pos.m_positionX = x - 2.0f + (i - 1) * 10.0f;
1027 {
1028 pTrash->AI()->SetData(i, 0);
1029 NPC_ArgentSoldierGUID[i][0] = pTrash->GetGUID();
1030 }
1031 pos.m_positionX = x + (i - 1) * 10.0f;
1032 if (Creature* pTrash = instance->SummonCreature(NPC_ARGENT_MONK, pos))
1033 {
1034 pTrash->AI()->SetData(i, 0);
1035 NPC_ArgentSoldierGUID[i][1] = pTrash->GetGUID();
1036 }
1037 pos.m_positionX = x + 2.0f + (i - 1) * 10.0f;
1038 if (Creature* pTrash = instance->SummonCreature(NPC_PRIESTESS, pos))
1039 {
1040 pTrash->AI()->SetData(i, 0);
1041 NPC_ArgentSoldierGUID[i][2] = pTrash->GetGUID();
1042 }
1043 }
1044 events.ScheduleEvent(EVENT_SUMMON_ARGENT_CHALLENGE, 4s);
1045 }
1046 break;
1048 {
1050 announcer->GetMotionMaster()->MovePoint(0, 735.81f, 661.92f, 412.39f);
1052 boss->GetMotionMaster()->MovePoint(0, 746.881f, 660.263f, 411.7f);
1053 events.ScheduleEvent(EVENT_CLOSE_GATE, 5s);
1054 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_SAY_1, 4s);
1055 events.ScheduleEvent(EVENT_ARGENT_SOLDIER_GROUP_ATTACK, 12s + 500ms);
1056 }
1057 break;
1059 {
1062 if (!Counter)
1063 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_SAY_2, 6s);
1064 }
1065 break;
1067 {
1069 ac->AI()->Talk(SAY_PALETRESS_INTRO_2);
1070 }
1071 break;
1073 {
1074 Counter = 0;
1075 for( uint8 i = 0; i < 3; ++i )
1076 for( uint8 j = 0; j < 3; ++j )
1078 {
1079 c->SetReactState(REACT_AGGRESSIVE);
1080 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1081 c->SetImmuneToAll(false);
1082 //c->AI()->DoZoneInCombat();
1083 }
1085 tirion->AI()->Talk(TEXT_YOU_MAY_BEGIN);
1086 }
1087 break;
1089 {
1091 {
1092 boss->GetMotionMaster()->MovePoint(0, 746.881f, 635.263f, 411.7f);
1093 }
1094 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_ATTACK, 3s);
1095 }
1096 break;
1098 {
1100 {
1101 boss->SetReactState(REACT_AGGRESSIVE);
1102 boss->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1103 boss->SetImmuneToAll(false);
1104 if (Unit* target = boss->SelectNearestTarget(200.0f))
1105 boss->AI()->AttackStart(target);
1106 boss->AI()->DoZoneInCombat();
1107 }
1108 }
1109 break;
1111 {
1113 {
1114 boss->GetMotionMaster()->MovePoint(1, 747.13f, 628.037f, 411.2f);
1115 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_LEAVE_CHEST, 6s);
1116 }
1117 }
1118 break;
1120 {
1123 {
1124 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
1125 uint32 chest = 0;
1126 if (instance->IsHeroic())
1127 chest = (boss->GetEntry() == NPC_EADRIC || boss->GetEntry() == NPC_EADRIC_H) ? GO_EADRIC_LOOT_H : GO_PALETRESS_LOOT_H;
1128 else
1129 chest = (boss->GetEntry() == NPC_EADRIC || boss->GetEntry() == NPC_EADRIC_H) ? GO_EADRIC_LOOT : GO_PALETRESS_LOOT;
1130 announcer->SummonGameObject(chest, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000); // [LOOT]
1131 }
1132
1133 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_DISAPPEAR, 4s);
1134 events.ScheduleEvent(EVENT_RESTORE_ANNOUNCER_GOSSIP, 15s);
1135 }
1136 break;
1138 {
1140 {
1141 boss->GetMotionMaster()->MovePoint(0, SpawnPosition);
1142 boss->DespawnOrUnsummon(3000);
1143 }
1144 }
1145 break;
1147 {
1149 if (Creature* bk_vehicle = announcer->SummonCreature(VEHICLE_BLACK_KNIGHT, 769.834f, 651.915f, 447.035f, 0.0f))
1150 {
1151 NPC_BlackKnightVehicleGUID = bk_vehicle->GetGUID();
1152 bk_vehicle->SetReactState(REACT_PASSIVE);
1153 bk_vehicle->SetFacingTo(M_PI);
1154 if (Vehicle* v = bk_vehicle->GetVehicleKit())
1155 if (Unit* bk = v->GetPassenger(0))
1156 {
1157 NPC_BlackKnightGUID = bk->GetGUID();
1158 bk->SendMovementFlagUpdate(); // put him on vehicle visually
1159 if (bk->IsCreature())
1160 bk->ToCreature()->SetReactState(REACT_PASSIVE);
1161 }
1162
1163 announcer->SetFacingToObject(bk_vehicle);
1164 announcer->AI()->Talk(SAY_KNIGHT_INTRO);
1165 }
1166 }
1167 break;
1169 {
1171 {
1172 Position exitPos = { 751.003357f, 638.145508f, 411.570129f, M_PI };
1173 bk->ExitVehicle(/*&exitPos*/);
1174 bk->GetMotionMaster()->MoveJump(exitPos, 2.0f, 2.0f);
1175 bk->AI()->Talk(SAY_BK_INTRO_1);
1176 }
1177 events.ScheduleEvent(EVENT_BLACK_KNIGHT_CAST_ANNOUNCER, 2s);
1178 }
1179 break;
1181 {
1183 {
1185 {
1186 bk->SetPosition(745.016f, 631.506f, 411.575f, bk->GetAngle(announcer));
1187 bk->SetHomePosition(*bk);
1188 bk->SetFacingToObject(announcer);
1189 announcer->SetFacingToObject(bk);
1190 announcer->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1191 bk->AddAura(68306, announcer); // spell has attribute player only
1193 tirion->AI()->Talk(TEXT_BK_MEANING);
1194 }
1195 }
1196 events.ScheduleEvent(EVENT_BLACK_KNIGHT_KILL_ANNOUNCER, 1s);
1197 }
1198 break;
1200 {
1202 bk_vehicle->AI()->DoAction(1);
1203
1204 events.ScheduleEvent(EVENT_BLACK_KNIGHT_MOVE_FORWARD, 4s);
1205 }
1206 break;
1208 {
1210 {
1211 bk->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
1212 bk->GetMotionMaster()->MovePoint(0, 746.81f, 623.15f, 411.42f);
1213 bk->AI()->Talk(SAY_BK_INTRO_2);
1214 }
1216 if (announcer->IsAlive())
1217 Unit::Kill(announcer, announcer);
1218 events.ScheduleEvent(EVENT_BLACK_KNIGHT_SAY_TASK, 14s);
1219 }
1220 break;
1222 {
1224 {
1225 bk->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
1226 bk->AI()->Talk(SAY_BK_INTRO_3);
1227 }
1228 events.ScheduleEvent(EVENT_BLACK_KNIGHT_ATTACK, 5s);
1229 }
1230 break;
1232 {
1234 {
1235 bk->SetReactState(REACT_AGGRESSIVE);
1236 bk->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
1237 if (Unit* target = bk->SelectNearestTarget(200.0f))
1238 bk->AI()->AttackStart(target);
1239 bk->AI()->DoZoneInCombat();
1240 bk->AI()->DoAction(1);
1241 }
1242 }
1243 break;
1244 }
1245 }
double rand_norm()
Definition: Random.cpp:77
std::int8_t int8
Definition: Define.h:105
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ UNIT_FLAG_NONE
Definition: UnitDefines.h:228
@ GO_PALETRESS_LOOT
Definition: trial_of_the_champion.h:180
@ GO_PALETRESS_LOOT_H
Definition: trial_of_the_champion.h:181
@ GO_EADRIC_LOOT
Definition: trial_of_the_champion.h:177
@ GO_EADRIC_LOOT_H
Definition: trial_of_the_champion.h:178
@ EVENT_BLACK_KNIGHT_SAY_TASK
Definition: trial_of_the_champion.h:100
@ EVENT_BLACK_KNIGHT_CAST_ANNOUNCER
Definition: trial_of_the_champion.h:97
@ EVENT_BLACK_KNIGHT_ATTACK
Definition: trial_of_the_champion.h:101
@ EVENT_GRAND_GROUP_2_ATTACK
Definition: trial_of_the_champion.h:76
@ EVENT_BLACK_KNIGHT_MOVE_FORWARD
Definition: trial_of_the_champion.h:99
@ EVENT_SUMMON_ARGENT_CHALLENGE
Definition: trial_of_the_champion.h:86
@ EVENT_SUMMON_GRAND_CHAMPION_1
Definition: trial_of_the_champion.h:69
@ EVENT_ARGENT_CHALLENGE_SAY_1
Definition: trial_of_the_champion.h:87
@ EVENT_GRAND_CHAMPIONS_ATTACK
Definition: trial_of_the_champion.h:82
@ EVENT_CLOSE_GATE
Definition: trial_of_the_champion.h:68
@ EVENT_ARGENT_CHALLENGE_ATTACK
Definition: trial_of_the_champion.h:91
@ EVENT_BLACK_KNIGHT_KILL_ANNOUNCER
Definition: trial_of_the_champion.h:98
@ EVENT_GRAND_CHAMPIONS_MOUNTS_ATTACK
Definition: trial_of_the_champion.h:80
@ EVENT_GRAND_GROUP_3_ATTACK
Definition: trial_of_the_champion.h:78
@ EVENT_ARGENT_CHALLENGE_SAY_2
Definition: trial_of_the_champion.h:88
@ EVENT_ARGENT_SOLDIER_GROUP_ATTACK
Definition: trial_of_the_champion.h:89
@ EVENT_GRAND_GROUP_1_ATTACK
Definition: trial_of_the_champion.h:74
@ EVENT_ARGENT_CHALLENGE_DISAPPEAR
Definition: trial_of_the_champion.h:94
@ EVENT_ARGENT_CHALLENGE_LEAVE_CHEST
Definition: trial_of_the_champion.h:93
@ EVENT_NULL
Definition: trial_of_the_champion.h:66
@ TEXT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:230
@ TEXT_BK_MEANING
Definition: trial_of_the_champion.h:234
@ TEXT_BEGIN
Definition: trial_of_the_champion.h:229
@ SAY_BK_INTRO_1
Definition: trial_of_the_champion.h:237
@ SAY_BK_INTRO_2
Definition: trial_of_the_champion.h:238
@ SAY_BK_INTRO_3
Definition: trial_of_the_champion.h:239
@ TEXT_WELCOME_2
Definition: trial_of_the_champion.h:228
@ SAY_PALETRESS_INTRO_2
Definition: trial_of_the_champion.h:219
@ SAY_PALETRESS_INTRO_1
Definition: trial_of_the_champion.h:218
@ SAY_EADRIC_INTRO
Definition: trial_of_the_champion.h:209
@ TEXT_YOU_MAY_BEGIN
Definition: trial_of_the_champion.h:231
@ SAY_KNIGHT_INTRO
Definition: trial_of_the_champion.h:206
@ VEHICLE_BLACK_KNIGHT
Definition: trial_of_the_champion.h:189
@ NPC_ARGENT_LIGHTWIELDER
Definition: trial_of_the_champion.h:137
@ NPC_EADRIC_H
Definition: trial_of_the_champion.h:133
@ NPC_ARGENT_MONK
Definition: trial_of_the_champion.h:138
@ NPC_PRIESTESS
Definition: blackrock_depths.h:100
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17658
Definition: Vehicle.h:28

References CLEANUP_CHECK_INTERVAL, Counter, DoNeedCleanup(), DoSummonGrandChampion(), EVENT_ARGENT_CHALLENGE_ATTACK, EVENT_ARGENT_CHALLENGE_DISAPPEAR, EVENT_ARGENT_CHALLENGE_LEAVE_CHEST, EVENT_ARGENT_CHALLENGE_MOVE_FORWARD, EVENT_ARGENT_CHALLENGE_RUN_MIDDLE, EVENT_ARGENT_CHALLENGE_SAY_1, EVENT_ARGENT_CHALLENGE_SAY_2, EVENT_ARGENT_SOLDIER_GROUP_ATTACK, EVENT_BLACK_KNIGHT_ATTACK, EVENT_BLACK_KNIGHT_CAST_ANNOUNCER, EVENT_BLACK_KNIGHT_KILL_ANNOUNCER, EVENT_BLACK_KNIGHT_MOVE_FORWARD, EVENT_BLACK_KNIGHT_SAY_TASK, EVENT_CHECK_PLAYERS, EVENT_CLOSE_GATE, EVENT_GRAND_CHAMPIONS_ATTACK, EVENT_GRAND_CHAMPIONS_MOUNTS_ATTACK, EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE, EVENT_GRAND_CHAMPIONS_MOVE_SIDE, EVENT_GRAND_GROUP_1_ATTACK, EVENT_GRAND_GROUP_1_MOVE_MIDDLE, EVENT_GRAND_GROUP_2_ATTACK, EVENT_GRAND_GROUP_2_MOVE_MIDDLE, EVENT_GRAND_GROUP_3_ATTACK, EVENT_GRAND_GROUP_3_MOVE_MIDDLE, EVENT_GRATZ_SLAIN_CHAMPIONS, EVENT_NULL, EVENT_RESTORE_ANNOUNCER_GOSSIP, EVENT_START_ARGENT_CHALLENGE_INTRO, EVENT_START_BLACK_KNIGHT_SCENE, EVENT_SUMMON_ARGENT_CHALLENGE, EVENT_SUMMON_BLACK_KNIGHT, EVENT_SUMMON_GRAND_CHAMPION_1, EVENT_SUMMON_GRAND_CHAMPION_2, EVENT_SUMMON_GRAND_CHAMPION_3, EVENT_YELL_WELCOME_2, Map::GetCreature(), Map::GetGameObject(), Position::GetPositionX(), GO_EADRIC_LOOT, GO_EADRIC_LOOT_H, GO_EnterGateGUID, GO_MainGateGUID, GO_PALETRESS_LOOT, GO_PALETRESS_LOOT_H, InstanceScript::HandleGameObject(), InstanceScript::instance, InstanceCleanup(), Map::IsHeroic(), Unit::Kill(), Position::m_positionX, MOVEMENTFLAG_WALKING, NPC_AnnouncerGUID, NPC_ARGENT_LIGHTWIELDER, NPC_ARGENT_MONK, NPC_ArgentChampionGUID, NPC_ArgentSoldierGUID, NPC_BlackKnightGUID, NPC_BlackKnightVehicleGUID, NPC_EADRIC, NPC_EADRIC_H, NPC_GrandChampionGUID, NPC_GrandChampionMinionsGUID, NPC_PALETRESS, NPC_PRIESTESS, NPC_TirionGUID, rand_norm(), REACT_AGGRESSIVE, REACT_PASSIVE, SAY_BK_INTRO_1, SAY_BK_INTRO_2, SAY_BK_INTRO_3, SAY_EADRIC_INTRO, SAY_KNIGHT_INTRO, SAY_PALETRESS_INTRO_1, SAY_PALETRESS_INTRO_2, SpawnPosition, Map::SummonCreature(), WorldObject::SummonCreature(), temp1, temp2, TEXT_BEGIN, TEXT_BK_MEANING, TEXT_GRATZ_SLAIN_CHAMPIONS, TEXT_WELCOME_2, TEXT_YOU_MAY_BEGIN, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NONE, UNIT_NPC_FLAG_GOSSIP, urand(), and VEHICLE_BLACK_KNIGHT.

Member Data Documentation

◆ bAchievIveHadWorse

bool instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::bAchievIveHadWorse

◆ CLEANED

bool instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::CLEANED

◆ Counter

uint8 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::Counter

◆ events

EventMap instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::events

◆ GO_EnterGateGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::GO_EnterGateGUID

◆ GO_MainGateGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::GO_MainGateGUID

◆ InstanceProgress

uint32 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::InstanceProgress

◆ m_auiEncounter

uint32 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]

◆ NPC_AnnouncerGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_AnnouncerGUID

◆ NPC_ArgentChampionGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_ArgentChampionGUID

◆ NPC_ArgentSoldierGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_ArgentSoldierGUID[3][3]

Referenced by InstanceCleanup(), and Update().

◆ NPC_BlackKnightGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_BlackKnightGUID

Referenced by InstanceCleanup(), and Update().

◆ NPC_BlackKnightVehicleGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_BlackKnightVehicleGUID

Referenced by InstanceCleanup(), and Update().

◆ NPC_GrandChampionGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_GrandChampionGUID[3]

◆ NPC_GrandChampionMinionsGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_GrandChampionMinionsGUID[3][3]

◆ NPC_MemoryEntry

uint32 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_MemoryEntry

◆ NPC_TirionGUID

ObjectGuid instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::NPC_TirionGUID

Referenced by OnCreatureCreate(), SetData(), and Update().

◆ shortver

bool instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::shortver

◆ str_data

std::string instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::str_data

Referenced by GetSaveData().

◆ TeamIdInInstance

TeamId instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::TeamIdInInstance

◆ temp1

uint8 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::temp1

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

◆ temp2

uint8 instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::temp2

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

◆ VehicleList

GuidList instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::VehicleList