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)
 
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)
 
- 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
54 : InstanceScript(pMap)
55 {
57 Initialize();
58 }
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:141
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:137
void Initialize() override
Definition: instance_trial_of_the_champion.cpp:85

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.

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

References bAchievIveHadWorse, and NPC_MemoryEntry.

◆ DoNeedCleanup()

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

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.
707 {
708 uint32 CHAMPION_TO_SUMMON = 0;
709 uint32 MINION_TO_SUMMON = 0;
710 int32 TEXT_ID = 0;
711
712 switch( BossNumber )
713 {
714 case 0:
715 CHAMPION_TO_SUMMON = NPC_MOKRA;
716 MINION_TO_SUMMON = NPC_ORGRIMMAR_MINION;
718 break;
719 case 1:
720 CHAMPION_TO_SUMMON = NPC_ERESSEA;
721 MINION_TO_SUMMON = NPC_SILVERMOON_MINION;
723 break;
724 case 2:
725 CHAMPION_TO_SUMMON = NPC_RUNOK;
726 MINION_TO_SUMMON = NPC_THUNDER_BLUFF_MINION;
728 break;
729 case 3:
730 CHAMPION_TO_SUMMON = NPC_ZULTORE;
731 MINION_TO_SUMMON = NPC_SENJIN_MINION;
733 break;
734 case 4:
735 CHAMPION_TO_SUMMON = NPC_VISCERI;
736 MINION_TO_SUMMON = NPC_UNDERCITY_MINION;
738 break;
739 default:
740 return;
741 }
742
744 if (shortver)
745 switch (BossOrder)
746 {
747 case 0:
748 SpawnPos.Relocate(780.43f, 607.15f, 411.82f);
749 break;
750 case 1:
751 SpawnPos.Relocate(768.72f, 581.01f, 411.92f);
752 break;
753 case 2:
754 SpawnPos.Relocate(784.02f, 645.33f, 412.39f);
755 break;
756 }
757
758 if( Creature* pBoss = instance->SummonCreature(CHAMPION_TO_SUMMON, SpawnPos) )
759 {
760 NPC_GrandChampionGUID[BossOrder] = pBoss->GetGUID();
761 pBoss->ToCreature()->SetReactState(REACT_PASSIVE);
762 pBoss->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED);
763 pBoss->SetImmuneToAll(true);
764 pBoss->ToCreature()->SetHomePosition(748.309f, 619.448f, 411.3f, M_PI / 2);
765 pBoss->AI()->SetData(BossOrder, (shortver ? 1 : 0));
766
767 for( uint8 i = 0; i < 3; ++i )
768 if( Creature* pAdd = instance->SummonCreature(MINION_TO_SUMMON, SpawnPos) )
769 {
770 NPC_GrandChampionMinionsGUID[BossOrder][i] = pAdd->GetGUID();
771 pAdd->SetReactState(REACT_PASSIVE);
772 pAdd->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
773 pAdd->SetImmuneToAll(true);
774 pAdd->SetHomePosition(748.309f, 619.448f, 411.3f, M_PI / 2);
775 pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, (i + 1)*M_PI / 2);
776 }
777 }
778
779 if (!shortver)
781 {
782 announcer->AI()->Talk(TEXT_ID);
783 }
784 }
std::int32_t int32
Definition: Define.h:104
std::uint32_t uint32
Definition: Define.h:108
@ REACT_PASSIVE
Definition: Unit.h:1035
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ UNIT_FLAG_PACIFIED
Definition: Unit.h:465
const Position SpawnPosition
Definition: instance_trial_of_the_champion.cpp:26
@ SAY_GRAND_CHAMPIONS_INTRO_WILDMANE
Definition: trial_of_the_champion.h:206
@ SAY_GRAND_CHAMPIONS_INTRO_SKULLCRUSHER
Definition: trial_of_the_champion.h:204
@ SAY_GRAND_CHAMPIONS_INTRO_DAWNSINGER
Definition: trial_of_the_champion.h:202
@ SAY_GRAND_CHAMPIONS_INTRO_DEATHSTALKER
Definition: trial_of_the_champion.h:205
@ SAY_GRAND_CHAMPIONS_INTRO_ZULTORE
Definition: trial_of_the_champion.h:203
@ NPC_ERESSEA
Definition: trial_of_the_champion.h:109
@ NPC_SILVERMOON_MINION
Definition: trial_of_the_champion.h:128
@ NPC_SENJIN_MINION
Definition: trial_of_the_champion.h:130
@ NPC_RUNOK
Definition: trial_of_the_champion.h:110
@ NPC_ZULTORE
Definition: trial_of_the_champion.h:111
@ NPC_THUNDER_BLUFF_MINION
Definition: trial_of_the_champion.h:129
@ NPC_MOKRA
Definition: trial_of_the_champion.h:108
@ NPC_UNDERCITY_MINION
Definition: trial_of_the_champion.h:131
@ NPC_VISCERI
Definition: trial_of_the_champion.h:112
@ NPC_ORGRIMMAR_MINION
Definition: trial_of_the_champion.h:127
const Position SpawnPos
Definition: halls_of_reflection.h:322
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:3307
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:2154
ObjectGuid NPC_AnnouncerGUID
Definition: instance_trial_of_the_champion.cpp:73
ObjectGuid NPC_GrandChampionGUID[3]
Definition: instance_trial_of_the_champion.cpp:75
ObjectGuid NPC_GrandChampionMinionsGUID[3][3]
Definition: instance_trial_of_the_champion.cpp:76
bool shortver
Definition: instance_trial_of_the_champion.cpp:70

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.

463 {
464 switch( uiData )
465 {
467 return InstanceProgress;
469 return TeamIdInInstance;
470 }
471
472 return 0;
473 }
@ DATA_INSTANCE_PROGRESS
Definition: trial_of_the_champion.h:34
@ DATA_TEAMID_IN_INSTANCE
Definition: trial_of_the_champion.h:45
TeamId TeamIdInInstance
Definition: instance_trial_of_the_champion.cpp:61
uint32 InstanceProgress
Definition: instance_trial_of_the_champion.cpp:62

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.

476 {
477 switch( uiData )
478 {
479 case DATA_ANNOUNCER:
480 return NPC_AnnouncerGUID;
481 case DATA_PALETRESS:
483 }
484
485 return ObjectGuid::Empty;
486 }
@ DATA_PALETRESS
Definition: trial_of_the_champion.h:46
@ DATA_ANNOUNCER
Definition: trial_of_the_champion.h:36
static ObjectGuid const Empty
Definition: ObjectGuid.h:122
ObjectGuid NPC_ArgentChampionGUID
Definition: instance_trial_of_the_champion.cpp:77

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.

226 {
228 std::ostringstream saveStream;
229 saveStream << "T C " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << InstanceProgress;
230 str_data = saveStream.str();
232 return str_data;
233 }
#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:63
std::string str_data
Definition: instance_trial_of_the_champion.cpp:64

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.

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

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
309 {
310 if( CLEANED )
311 return;
312
313 switch( InstanceProgress )
314 {
320 // revert to INSTANCE_PROGRESS_INITIAL
321 {
322 for (ObjectGuid const& guid : VehicleList)
323 if (Creature* veh = instance->GetCreature(guid))
324 {
325 veh->DespawnOrUnsummon();
326 veh->SetRespawnTime(3);
327 }
328 for( uint8 i = 0; i < 3; ++i )
329 {
330 for( uint8 j = 0; j < 3; ++j )
331 {
333 c->DespawnOrUnsummon();
335 }
337 c->DespawnOrUnsummon();
339 }
341 {
342 c->DespawnOrUnsummon();
343 c->SetHomePosition(748.309f, 619.488f, 411.172f, 4.71239f);
344 c->SetPosition(748.309f, 619.488f, 411.172f, 4.71239f);
345 c->SetRespawnTime(3);
346 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
347 }
349 }
350 break;
352 {
354 {
355 announcer->DespawnOrUnsummon();
356 announcer->SetHomePosition(735.81f, 661.92f, 412.39f, 4.714f);
357 announcer->SetPosition(735.81f, 661.92f, 412.39f, 4.714f);
358 announcer->SetRespawnTime(3);
359 announcer->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
360
361 for( uint8 i = 0; i < 3; ++i )
363 {
364 uint32 entry = c->GetEntry();
365 c->DespawnOrUnsummon();
366 switch( i )
367 {
368 case 0:
369 if( Creature* pBoss = announcer->SummonCreature(entry, 736.695f, 650.02f, 412.4f, 3 * M_PI / 2) )
370 {
371 NPC_GrandChampionGUID[0] = pBoss->GetGUID();
372 pBoss->AI()->SetData(0, 2);
373 }
374 break;
375 case 1:
376 if( Creature* pBoss = announcer->SummonCreature(entry, 756.32f, 650.05f, 412.4f, 3 * M_PI / 2) )
377 {
378 NPC_GrandChampionGUID[1] = pBoss->GetGUID();
379 pBoss->AI()->SetData(1, 2);
380 }
381 break;
382 case 2:
383 if( Creature* pBoss = announcer->SummonCreature(entry, 746.5f, 650.65f, 411.7f, 3 * M_PI / 2) )
384 {
385 NPC_GrandChampionGUID[2] = pBoss->GetGUID();
386 pBoss->AI()->SetData(2, 2);
387 }
388 break;
389 }
390 }
391 }
392 }
393 break;
396 // revert to INSTANCE_PROGRESS_CHAMPIONS_DEAD
397 {
398 for( uint8 i = 0; i < 3; ++i )
399 for( uint8 j = 0; j < 3; ++j )
400 {
402 c->DespawnOrUnsummon();
404 }
406 {
407 c->AI()->DoAction(-1); // paletress despawn memory
408 c->DespawnOrUnsummon();
409 }
412 {
413 c->DespawnOrUnsummon();
414 c->SetHomePosition(743.14f, 628.77f, 411.2f, 4.71239f);
415 c->SetPosition(743.14f, 628.77f, 411.2f, 4.71239f);
416 c->SetRespawnTime(3);
417 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
418 }
419 NPC_MemoryEntry = 0;
421 }
422 break;
424 // revert to INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED
425 {
427 c->DespawnOrUnsummon();
430 {
431 c->AI()->DoAction(-1);
432 c->DespawnOrUnsummon();
433 }
436 {
437 c->DespawnOrUnsummon();
438 c->SetHomePosition(743.14f, 628.77f, 411.2f, 4.71239f);
439 c->SetPosition(743.14f, 628.77f, 411.2f, 4.71239f);
440 c->SetRespawnTime(3);
441 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
442 }
444 }
445 break;
448 c->DespawnOrUnsummon();
449 break;
450 }
451
454 Counter = 0;
455 SaveToDB();
456 events.Reset();
458
459 CLEANED = true;
460 }
@ UNIT_NPC_FLAG_GOSSIP
Definition: Unit.h:516
#define CLEANUP_CHECK_INTERVAL
Definition: instance_trial_of_the_champion.cpp:27
@ INSTANCE_PROGRESS_ARGENT_SOLDIERS_DIED
Definition: trial_of_the_champion.h:60
@ INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED
Definition: trial_of_the_champion.h:58
@ INSTANCE_PROGRESS_INITIAL
Definition: trial_of_the_champion.h:53
@ INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3
Definition: trial_of_the_champion.h:57
@ INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST
Definition: trial_of_the_champion.h:54
@ INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED
Definition: trial_of_the_champion.h:61
@ INSTANCE_PROGRESS_FINISHED
Definition: trial_of_the_champion.h:62
@ INSTANCE_PROGRESS_CHAMPIONS_DEAD
Definition: trial_of_the_champion.h:59
@ INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1
Definition: trial_of_the_champion.h:55
@ INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2
Definition: trial_of_the_champion.h:56
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:2343
Definition: ObjectGuid.h:120
void Clear()
Definition: ObjectGuid.h:140
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:109
void SaveToDB()
Definition: InstanceScript.cpp:40
ObjectGuid NPC_BlackKnightGUID
Definition: instance_trial_of_the_champion.cpp:81
ObjectGuid GO_EnterGateGUID
Definition: instance_trial_of_the_champion.cpp:83
ObjectGuid NPC_ArgentSoldierGUID[3][3]
Definition: instance_trial_of_the_champion.cpp:78
ObjectGuid GO_MainGateGUID
Definition: instance_trial_of_the_champion.cpp:82
ObjectGuid NPC_BlackKnightVehicleGUID
Definition: instance_trial_of_the_champion.cpp:80

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.

103 {
104 for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
105 if( m_auiEncounter[i] == IN_PROGRESS )
106 return true;
107
108 return false;
109 }
@ 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.

236 {
237 CLEANED = false;
238 events.Reset();
239 events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
240
241 if( !in )
242 {
244 return;
245 }
246
248
249 char dataHead1, dataHead2;
250 uint16 data0, data1, data2, data3;
251 std::istringstream loadStream(in);
252 loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3;
253
254 if( dataHead1 == 'T' && dataHead2 == 'C' )
255 {
256 m_auiEncounter[0] = data0;
257 m_auiEncounter[1] = data1;
258 m_auiEncounter[2] = data2;
259 InstanceProgress = data3;
262
263 for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
264 if( m_auiEncounter[i] == IN_PROGRESS )
266 }
267 else
269
271 }
std::uint16_t uint16
Definition: Define.h:109
#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.

112 {
114 {
115 Map::PlayerList const& players = instance->GetPlayers();
116 if( !players.IsEmpty() )
117 if( Player* pPlayer = players.begin()->GetSource() )
118 TeamIdInInstance = pPlayer->GetTeamId();
119 }
120
121 switch( creature->GetEntry() )
122 {
123 // Grand Champions:
124 case NPC_MOKRA:
126 creature->UpdateEntry(NPC_JACOB);
127 break;
128 case NPC_ERESSEA:
130 creature->UpdateEntry(NPC_AMBROSE);
131 break;
132 case NPC_RUNOK:
134 creature->UpdateEntry(NPC_COLOSOS);
135 break;
136 case NPC_ZULTORE:
138 creature->UpdateEntry(NPC_JAELYNE);
139 break;
140 case NPC_VISCERI:
142 creature->UpdateEntry(NPC_LANA);
143 break;
144
145 // Grand Champion Minions:
149 break;
153 break;
157 break;
161 break;
165 break;
166
167 // Argent Champion:
168 case NPC_EADRIC:
169 case NPC_PALETRESS:
170 NPC_ArgentChampionGUID = creature->GetGUID();
171 break;
172
173 // Coliseum Announcer:
174 case NPC_JAEREN:
175 case NPC_ARELAS:
176 NPC_AnnouncerGUID = creature->GetGUID();
177 //if( TeamIdInInstance == TEAM_ALLIANCE )
178 // creature->UpdateEntry(NPC_ARELAS);
179 creature->SetReactState(REACT_PASSIVE);
180 break;
181
182 // Highlord Tirion Fordring
183 case NPC_TIRION:
184 NPC_TirionGUID = creature->GetGUID();
185 break;
186
187 // Beginning vehicles:
191 {
192 creature->DespawnOrUnsummon();
193 creature->SetRespawnTime(3);
194 VehicleList.push_back(creature->GetGUID());
195 }
196 else
197 creature->DespawnOrUnsummon();
198 break;
199 }
201 if (const CreatureAddon* ca = creature->GetCreatureAddon())
202 if (ca->mount != creature->GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID))
203 creature->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, ca->mount);
204 }
@ UNIT_FIELD_MOUNTDISPLAYID
Definition: UpdateFields.h:126
@ VEHICLE_ARGENT_BATTLEWORG
Definition: trial_of_the_champion.h:188
@ VEHICLE_ARGENT_WARHORSE
Definition: trial_of_the_champion.h:187
@ NPC_JAELYNE
Definition: trial_of_the_champion.h:118
@ NPC_LANA
Definition: trial_of_the_champion.h:119
@ NPC_EXODAR_MINION
Definition: trial_of_the_champion.h:125
@ NPC_GNOMEREGAN_MINION
Definition: trial_of_the_champion.h:124
@ NPC_PALETRESS
Definition: trial_of_the_champion.h:135
@ NPC_COLOSOS
Definition: trial_of_the_champion.h:117
@ NPC_IRONFORGE_MINION
Definition: trial_of_the_champion.h:122
@ NPC_TIRION
Definition: trial_of_the_champion.h:148
@ NPC_ARELAS
Definition: trial_of_the_champion.h:145
@ NPC_AMBROSE
Definition: trial_of_the_champion.h:116
@ NPC_DARNASSUS_MINION
Definition: trial_of_the_champion.h:126
@ NPC_JAEREN
Definition: trial_of_the_champion.h:144
@ NPC_STORMWIND_MINION
Definition: trial_of_the_champion.h:123
@ NPC_EADRIC
Definition: trial_of_the_champion.h:133
@ NPC_JACOB
Definition: trial_of_the_champion.h:115
@ 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:3675
void SetReactState(ReactStates st)
Definition: Creature.h:90
bool UpdateEntry(uint32 entry, const CreatureData *data=nullptr, bool changelevel=true, bool updateAI=false)
Definition: Creature.cpp:482
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2117
CreatureAddon const * GetCreatureAddon() const
Definition: Creature.cpp:2621
Definition: CreatureData.h:429
uint32 GetUInt32Value(uint16 index) const
Definition: Object.cpp:305
uint32 GetEntry() const
Definition: Object.h:109
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:650
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
ObjectGuid NPC_TirionGUID
Definition: instance_trial_of_the_champion.cpp:74

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(), Object::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.

207 {
208 switch( go->GetEntry() )
209 {
210 case GO_MAIN_GATE:
211 GO_MainGateGUID = go->GetGUID();
213 break;
216 HandleGameObject(go->GetGUID(), false, go);
217 break;
219 HandleGameObject(go->GetGUID(), true, go);
221 break;
222 }
223 }
@ GO_SOUTH_PORTCULLIS
Definition: trial_of_the_champion.h:171
@ GO_EAST_PORTCULLIS
Definition: trial_of_the_champion.h:172
@ GO_MAIN_GATE
Definition: trial_of_the_champion.h:170
@ GO_NORTH_PORTCULLIS
Definition: trial_of_the_champion.h:173

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.

276 {
277 if (DoNeedCleanup(plr))
278 {
280 }
281
283 }
bool DoNeedCleanup(Player *ignoredPlayer=nullptr)
Definition: instance_trial_of_the_champion.cpp:285
void InstanceCleanup()
Definition: instance_trial_of_the_champion.cpp:308

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.

489 {
490 switch( uiType )
491 {
493 switch( InstanceProgress )
494 {
496 if (uiData == 0) // normal intro
497 {
498 shortver = false;
499
501 {
503 announcer->SetFacingToObject(gate);
505 tirion->AI()->Talk(TEXT_WELCOME);
506 }
507 events.RescheduleEvent(EVENT_YELL_WELCOME_2, 8s);
508 }
509 else // short version
510 {
511 shortver = true;
512
513 temp1 = urand(0, 4);
515 do { temp2 = urand(0, 4); }
516 while( temp1 == temp2 );
518 uint8 number = 0;
519 do { number = urand(0, 4); }
520 while( number == temp1 || number == temp2 );
521 DoSummonGrandChampion(number, 2);
522
524 uiData = DONE; // save to db
526 {
527 announcer->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
528 announcer->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
529 }
530 events.ScheduleEvent(EVENT_GRAND_GROUP_1_MOVE_MIDDLE, 10s);
531 }
532 break;
535 {
536 Counter = urand(0, 1);
537 if( Counter )
538 announcer->AI()->Talk(SAY_EADRIC_INTRO_ANNOUNCER);
539 else
540 announcer->AI()->Talk(SAY_JAEREN_PALETRESS_INTRO);
541 }
543 events.RescheduleEvent(EVENT_START_ARGENT_CHALLENGE_INTRO, 0ms);
544 break;
547 tirion->AI()->Talk(TEXT_BK_INTRO);
548 events.RescheduleEvent(EVENT_SUMMON_BLACK_KNIGHT, 3s);
549 break;
550 }
551 break;
553 if (shortver)
554 break;
555 switch( uiData )
556 {
557 case 0:
558 events.ScheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_2, 0ms);
559 break;
560 case 1:
561 events.ScheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_3, 0ms);
562 break;
563 case 2:
565 {
567 uiData = DONE; // save to db
568 announcer->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
569 announcer->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
570 events.ScheduleEvent(EVENT_GRAND_GROUP_1_MOVE_MIDDLE, 8500ms);
571 }
572 break;
573 }
574 break;
575 case DATA_MOUNT_DIED:
576 switch( InstanceProgress )
577 {
578 case INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST: // fighting group 1/3
579 if( ++Counter >= 3 )
580 {
581 Counter = 0;
583 uiData = DONE; // save to db
584 events.ScheduleEvent(EVENT_GRAND_GROUP_2_MOVE_MIDDLE, 0ms);
585 }
586 break;
587 case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1: // fighting group 2/3
588 if( ++Counter >= 3 )
589 {
590 Counter = 0;
592 uiData = DONE; // save to db
593 events.ScheduleEvent(EVENT_GRAND_GROUP_3_MOVE_MIDDLE, 0ms);
594 }
595 break;
596 case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2: // fighting group 3/3
597 if( ++Counter >= 3 )
598 {
599 Counter = 0;
601 uiData = DONE; // save to db
602 events.ScheduleEvent(EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE, 0ms);
603 }
604 break;
605 case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3: // fighting grand champions (on vehicles)
606 if( ++Counter >= 3 )
607 {
608 Counter = 0;
610 for (ObjectGuid const& guid : VehicleList)
611 if (Creature* veh = instance->GetCreature(guid))
612 veh->DespawnOrUnsummon();
613 events.ScheduleEvent(EVENT_GRAND_CHAMPIONS_MOVE_SIDE, 0ms);
614 }
615 break;
616 }
617 break;
619 --Counter;
620 break;
622 if( ++Counter >= 3 )
623 {
624 Counter = 0;
625 VehicleList.clear();
626 uiData = DONE;
628 m_auiEncounter[0] = DONE;
629 bool creditCasted = false;
630 for( uint8 i = 0; i < 3; ++i )
632 {
633 c->GetMotionMaster()->MovePoint(9, 747.36f, 670.07f, 411.9f);
634 if (!creditCasted)
635 {
636 c->CastSpell((Unit*)nullptr, 68572, true);
637 creditCasted = true;
638 }
639 }
641 {
642 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
643 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]
644 events.ScheduleEvent(EVENT_RESTORE_ANNOUNCER_GOSSIP, 15s);
645 events.ScheduleEvent(EVENT_GRATZ_SLAIN_CHAMPIONS, 6s);
646 }
647
648 // bind players to instance
649 if( instance->IsHeroic() )
651 }
652 break;
654 if( ++Counter >= 9 )
655 {
656 Counter = 0;
658 uiData = DONE; // save to db
660 }
661 break;
663 {
664 m_auiEncounter[1] = uiData;
665 if( uiData == DONE )
666 {
669 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_RUN_MIDDLE, 0ms);
670 }
671 }
672 break;
674 NPC_MemoryEntry = uiData;
675 break;
677 {
678 events.ScheduleEvent(EVENT_START_BLACK_KNIGHT_SCENE, 3s);
679 }
680 break;
682 {
683 m_auiEncounter[2] = uiData;
684 if (uiData == NOT_STARTED)
685 {
687 bAchievIveHadWorse = true;
688 }
689 else if( uiData == DONE )
690 {
693 }
694 }
695 break;
698 bAchievIveHadWorse = false;
699 break;
700 }
701
702 if( uiData == DONE )
703 SaveToDB();
704 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ MOVEMENTFLAG_WALKING
Definition: Unit.h:560
@ DONE
Definition: InstanceScript.h:60
@ GO_CHAMPIONS_LOOT_H
Definition: trial_of_the_champion.h:176
@ GO_CHAMPIONS_LOOT
Definition: trial_of_the_champion.h:175
@ EVENT_RESTORE_ANNOUNCER_GOSSIP
Definition: trial_of_the_champion.h:85
@ EVENT_SUMMON_BLACK_KNIGHT
Definition: trial_of_the_champion.h:96
@ EVENT_SUMMON_GRAND_CHAMPION_3
Definition: trial_of_the_champion.h:72
@ EVENT_YELL_WELCOME_2
Definition: trial_of_the_champion.h:73
@ EVENT_GRAND_GROUP_2_MOVE_MIDDLE
Definition: trial_of_the_champion.h:76
@ EVENT_GRAND_CHAMPIONS_MOVE_SIDE
Definition: trial_of_the_champion.h:82
@ EVENT_START_BLACK_KNIGHT_SCENE
Definition: trial_of_the_champion.h:97
@ EVENT_START_ARGENT_CHALLENGE_INTRO
Definition: trial_of_the_champion.h:86
@ EVENT_SUMMON_GRAND_CHAMPION_2
Definition: trial_of_the_champion.h:71
@ EVENT_GRAND_GROUP_1_MOVE_MIDDLE
Definition: trial_of_the_champion.h:74
@ EVENT_ARGENT_CHALLENGE_RUN_MIDDLE
Definition: trial_of_the_champion.h:93
@ EVENT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:84
@ EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE
Definition: trial_of_the_champion.h:80
@ EVENT_ARGENT_CHALLENGE_MOVE_FORWARD
Definition: trial_of_the_champion.h:91
@ EVENT_GRAND_GROUP_3_MOVE_MIDDLE
Definition: trial_of_the_champion.h:78
@ DATA_SKELETAL_GRYPHON_LANDED
Definition: trial_of_the_champion.h:44
@ DATA_GRAND_CHAMPION_DIED
Definition: trial_of_the_champion.h:42
@ DATA_ACHIEV_IVE_HAD_WORSE
Definition: trial_of_the_champion.h:48
@ DATA_REACHED_NEW_MOUNT
Definition: trial_of_the_champion.h:40
@ BOSS_BLACK_KNIGHT
Definition: trial_of_the_champion.h:32
@ DATA_GRAND_CHAMPION_REACHED_DEST
Definition: trial_of_the_champion.h:38
@ DATA_ARGENT_SOLDIER_DEFEATED
Definition: trial_of_the_champion.h:43
@ DATA_MOUNT_DIED
Definition: trial_of_the_champion.h:39
@ DATA_ANNOUNCER_GOSSIP_SELECT
Definition: trial_of_the_champion.h:37
@ DATA_MEMORY_ENTRY
Definition: trial_of_the_champion.h:47
@ BOSS_ARGENT_CHALLENGE
Definition: trial_of_the_champion.h:31
@ TEXT_WELCOME
Definition: trial_of_the_champion.h:228
@ SAY_EADRIC_INTRO_ANNOUNCER
Definition: trial_of_the_champion.h:199
@ SAY_JAEREN_PALETRESS_INTRO
Definition: trial_of_the_champion.h:200
@ TEXT_BK_INTRO
Definition: trial_of_the_champion.h:234
Definition: GameObject.h:122
Definition: Unit.h:1302
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3312
InstanceMap * ToInstanceMap()
Definition: Map.h:545
bool IsHeroic() const
Definition: Map.h:452
void PermBindAllPlayers()
Definition: Map.cpp:3145
void DoSummonGrandChampion(uint32 BossNumber, uint8 BossOrder)
Definition: instance_trial_of_the_champion.cpp:706

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.

787 {
788 events.Update(diff);
789 switch( events.ExecuteEvent() )
790 {
791 case EVENT_NULL:
792 break;
794 {
795 if (DoNeedCleanup())
796 {
798 }
799 events.RepeatEvent(CLEANUP_CHECK_INTERVAL);
800 }
801 break;
803 {
804 temp1 = urand(0, 4);
807 events.ScheduleEvent(EVENT_CLOSE_GATE, 6s);
808 }
809 break;
811 {
812 do { temp2 = urand(0, 4); }
813 while( temp1 == temp2 );
816 events.ScheduleEvent(EVENT_CLOSE_GATE, 6s);
817 }
818 break;
820 {
821 uint8 number = 0;
822 do { number = urand(0, 4); }
823 while( number == temp1 || number == temp2 );
824 DoSummonGrandChampion(number, 2);
826 events.ScheduleEvent(EVENT_CLOSE_GATE, 6000);
827 }
828 break;
829 case EVENT_CLOSE_GATE:
830 {
832 }
833 break;
835 {
837 {
838 tirion->AI()->Talk(TEXT_WELCOME_2);
839 }
840
841 events.RescheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_1, 8s);
842 break;
843 }
845 {
847 {
848 announcer->SetFacingTo(4.714f);
850 tirion->AI()->Talk(TEXT_BEGIN);
852 }
853 for( uint8 i = 0; i < 3; ++i )
855 {
856 float angle = rand_norm() * 2 * M_PI;
857 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
858 }
859
860 events.ScheduleEvent(EVENT_GRAND_GROUP_1_ATTACK, 3s);
861 }
862 break;
864 {
865 for( uint8 i = 0; i < 3; ++i )
867 {
868 c->SetReactState(REACT_AGGRESSIVE);
869 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
870 c->SetImmuneToAll(false);
871 if( Unit* target = c->SelectNearestTarget(200.0f) )
872 c->AI()->AttackStart(target);
873 c->AI()->DoZoneInCombat();
874 }
875 Counter = 0;
876 }
877 break;
879 {
880 for( uint8 i = 0; i < 3; ++i )
882 {
883 float angle = rand_norm() * 2 * M_PI;
884 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
885 }
886
887 events.ScheduleEvent(EVENT_GRAND_GROUP_2_ATTACK, 3s);
888 }
889 break;
891 {
892 for( uint8 i = 0; i < 3; ++i )
894 {
895 c->SetReactState(REACT_AGGRESSIVE);
896 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
897 c->SetImmuneToAll(false);
898 if( Unit* target = c->SelectNearestTarget(200.0f) )
899 c->AI()->AttackStart(target);
900 c->AI()->DoZoneInCombat();
901 }
902 }
903 break;
905 {
906 for( uint8 i = 0; i < 3; ++i )
908 {
909 float angle = rand_norm() * 2 * M_PI;
910 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
911 }
912
913 events.ScheduleEvent(EVENT_GRAND_GROUP_3_ATTACK, 3s);
914 }
915 break;
917 {
918 for( uint8 i = 0; i < 3; ++i )
920 {
921 c->SetReactState(REACT_AGGRESSIVE);
922 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
923 c->SetImmuneToAll(false);
924 if( Unit* target = c->SelectNearestTarget(200.0f) )
925 c->AI()->AttackStart(target);
926 c->AI()->DoZoneInCombat();
927 }
928 }
929 break;
931 {
932 for( uint8 i = 0; i < 3; ++i )
934 {
935 float angle = rand_norm() * 2 * M_PI;
936 c->GetMotionMaster()->MovePoint(4, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
937 }
938
940 }
941 break;
943 {
944 for( uint8 i = 0; i < 3; ++i )
946 {
947 c->SetReactState(REACT_AGGRESSIVE);
948 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
949 c->SetImmuneToAll(false);
950 if( Unit* target = c->SelectNearestTarget(200.0f) )
951 c->AI()->AttackStart(target);
952 c->AI()->DoZoneInCombat();
953 c->CastSpell(c, 67865, true); // SPELL_TRAMPLE_AURA
954 }
955 }
956 break;
958 {
959 for( uint8 i = 0; i < 3; ++i )
961 {
962 c->AI()->DoAction(1);
963 switch( i )
964 {
965 case 0:
966 c->GetMotionMaster()->MovePoint(5, 736.695f, 650.02f, 412.4f);
967 break;
968 case 1:
969 c->GetMotionMaster()->MovePoint(5, 756.32f, 650.05f, 412.4f);
970 break;
971 case 2:
972 c->GetMotionMaster()->MovePoint(5, 746.5f, 650.65f, 411.7f);
973 break;
974 }
975 }
976
977 events.ScheduleEvent(EVENT_GRAND_CHAMPIONS_ATTACK, 15s);
978 }
979 break;
981 {
982 for( uint8 i = 0; i < 3; ++i )
984 {
985 c->SetReactState(REACT_AGGRESSIVE);
986 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
987 c->SetImmuneToAll(false);
988 if( Unit* target = c->SelectNearestTarget(200.0f) )
989 c->AI()->AttackStart(target);
990 c->AI()->DoZoneInCombat();
991 c->AI()->DoAction(2);
992 }
993 }
994 break;
996 {
998 tirion->AI()->Talk(TEXT_GRATZ_SLAIN_CHAMPIONS);
999
1001 }
1002 break;
1004 {
1005 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1006 announcer->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
1007 }
1008 break;
1010 {
1011 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1012 {
1014 {
1015 announcer->SetFacingToObject(gate);
1016 HandleGameObject(GO_MainGateGUID, true, gate);
1017 HandleGameObject(GO_EnterGateGUID, false, gate);
1018 }
1019 }
1020
1021 for( int8 i = 0; i < 3; ++i )
1022 {
1024 float x = pos.GetPositionX();
1025
1026 pos.m_positionX = x - 2.0f + (i - 1) * 10.0f;
1028 {
1029 pTrash->AI()->SetData(i, 0);
1030 NPC_ArgentSoldierGUID[i][0] = pTrash->GetGUID();
1031 }
1032 pos.m_positionX = x + (i - 1) * 10.0f;
1033 if( Creature* pTrash = instance->SummonCreature(NPC_ARGENT_MONK, pos) )
1034 {
1035 pTrash->AI()->SetData(i, 0);
1036 NPC_ArgentSoldierGUID[i][1] = pTrash->GetGUID();
1037 }
1038 pos.m_positionX = x + 2.0f + (i - 1) * 10.0f;
1039 if( Creature* pTrash = instance->SummonCreature(NPC_PRIESTESS, pos) )
1040 {
1041 pTrash->AI()->SetData(i, 0);
1042 NPC_ArgentSoldierGUID[i][2] = pTrash->GetGUID();
1043 }
1044 }
1045 events.ScheduleEvent(EVENT_SUMMON_ARGENT_CHALLENGE, 4s);
1046 }
1047 break;
1049 {
1050 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1051 announcer->GetMotionMaster()->MovePoint(0, 735.81f, 661.92f, 412.39f);
1053 boss->GetMotionMaster()->MovePoint(0, 746.881f, 660.263f, 411.7f);
1054 events.ScheduleEvent(EVENT_CLOSE_GATE, 5s);
1055 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_SAY_1, 4s);
1056 events.ScheduleEvent(EVENT_ARGENT_SOLDIER_GROUP_ATTACK, 12s + 500ms);
1057 }
1058 break;
1060 {
1063 if( !Counter )
1064 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_SAY_2, 6s);
1065 }
1066 break;
1068 {
1070 ac->AI()->Talk(SAY_PALETRESS_INTRO_2);
1071 }
1072 break;
1074 {
1075 Counter = 0;
1076 for( uint8 i = 0; i < 3; ++i )
1077 for( uint8 j = 0; j < 3; ++j )
1079 {
1080 c->SetReactState(REACT_AGGRESSIVE);
1081 c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1082 c->SetImmuneToAll(false);
1083 //c->AI()->DoZoneInCombat();
1084 }
1086 tirion->AI()->Talk(TEXT_YOU_MAY_BEGIN);
1087 }
1088 break;
1090 {
1092 {
1093 boss->GetMotionMaster()->MovePoint(0, 746.881f, 635.263f, 411.7f);
1094 }
1095 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_ATTACK, 3s);
1096 }
1097 break;
1099 {
1101 {
1102 boss->SetReactState(REACT_AGGRESSIVE);
1103 boss->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1104 boss->SetImmuneToAll(false);
1105 if( Unit* target = boss->SelectNearestTarget(200.0f) )
1106 boss->AI()->AttackStart(target);
1107 boss->AI()->DoZoneInCombat();
1108 }
1109 }
1110 break;
1112 {
1114 {
1115 boss->GetMotionMaster()->MovePoint(1, 747.13f, 628.037f, 411.2f);
1116 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_LEAVE_CHEST, 6s);
1117 }
1118 }
1119 break;
1121 {
1122 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1124 {
1125 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
1126 uint32 chest = 0;
1127 if( instance->IsHeroic() )
1128 chest = (boss->GetEntry() == NPC_EADRIC || boss->GetEntry() == NPC_EADRIC_H) ? GO_EADRIC_LOOT_H : GO_PALETRESS_LOOT_H;
1129 else
1130 chest = (boss->GetEntry() == NPC_EADRIC || boss->GetEntry() == NPC_EADRIC_H) ? GO_EADRIC_LOOT : GO_PALETRESS_LOOT;
1131 announcer->SummonGameObject(chest, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000); // [LOOT]
1132 }
1133
1134 events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_DISAPPEAR, 4s);
1135 events.ScheduleEvent(EVENT_RESTORE_ANNOUNCER_GOSSIP, 15s);
1136 }
1137 break;
1139 {
1141 {
1142 boss->GetMotionMaster()->MovePoint(0, SpawnPosition);
1143 boss->DespawnOrUnsummon(3000);
1144 }
1145 }
1146 break;
1148 {
1149 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1150 if( Creature* bk_vehicle = announcer->SummonCreature(VEHICLE_BLACK_KNIGHT, 769.834f, 651.915f, 447.035f, 0.0f) )
1151 {
1152 NPC_BlackKnightVehicleGUID = bk_vehicle->GetGUID();
1153 bk_vehicle->SetReactState(REACT_PASSIVE);
1154 bk_vehicle->SetFacingTo(M_PI);
1155 if( Vehicle* v = bk_vehicle->GetVehicleKit() )
1156 if( Unit* bk = v->GetPassenger(0) )
1157 {
1158 NPC_BlackKnightGUID = bk->GetGUID();
1159 bk->SendMovementFlagUpdate(); // put him on vehicle visually
1160 if( bk->GetTypeId() == TYPEID_UNIT )
1161 bk->ToCreature()->SetReactState(REACT_PASSIVE);
1162 }
1163
1164 announcer->SetFacingToObject(bk_vehicle);
1165 announcer->AI()->Talk(SAY_KNIGHT_INTRO);
1166 }
1167 }
1168 break;
1170 {
1172 {
1173 Position exitPos = { 751.003357f, 638.145508f, 411.570129f, M_PI };
1174 bk->ExitVehicle(/*&exitPos*/);
1175 bk->GetMotionMaster()->MoveJump(exitPos, 2.0f, 2.0f);
1176 bk->AI()->Talk(SAY_BK_INTRO_1);
1177 }
1178 events.ScheduleEvent(EVENT_BLACK_KNIGHT_CAST_ANNOUNCER, 2s);
1179 }
1180 break;
1182 {
1183 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1184 {
1186 {
1187 bk->SetPosition(745.016f, 631.506f, 411.575f, bk->GetAngle(announcer));
1188 bk->SetHomePosition(*bk);
1189 bk->SetFacingToObject(announcer);
1190 announcer->SetFacingToObject(bk);
1191 announcer->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1192 bk->AddAura(68306, announcer); // spell has attribute player only
1194 tirion->AI()->Talk(TEXT_BK_MEANING);
1195 }
1196 }
1197 events.ScheduleEvent(EVENT_BLACK_KNIGHT_KILL_ANNOUNCER, 1s);
1198 }
1199 break;
1201 {
1203 bk_vehicle->AI()->DoAction(1);
1204
1205 events.ScheduleEvent(EVENT_BLACK_KNIGHT_MOVE_FORWARD, 4s);
1206 }
1207 break;
1209 {
1211 {
1212 bk->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
1213 bk->GetMotionMaster()->MovePoint(0, 746.81f, 623.15f, 411.42f);
1214 bk->AI()->Talk(SAY_BK_INTRO_2);
1215 }
1216 if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
1217 if (announcer->IsAlive())
1218 Unit::Kill(announcer, announcer);
1219 events.ScheduleEvent(EVENT_BLACK_KNIGHT_SAY_TASK, 14s);
1220 }
1221 break;
1223 {
1225 {
1226 bk->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
1227 bk->AI()->Talk(SAY_BK_INTRO_3);
1228 }
1229 events.ScheduleEvent(EVENT_BLACK_KNIGHT_ATTACK, 5s);
1230 }
1231 break;
1233 {
1235 {
1236 bk->SetReactState(REACT_AGGRESSIVE);
1237 bk->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
1238 if( Unit* target = bk->SelectNearestTarget(200.0f) )
1239 bk->AI()->AttackStart(target);
1240 bk->AI()->DoZoneInCombat();
1241 bk->AI()->DoAction(1);
1242 }
1243 }
1244 break;
1245 }
1246 }
std::int8_t int8
Definition: Define.h:106
double rand_norm()
Definition: Random.cpp:77
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ REACT_AGGRESSIVE
Definition: Unit.h:1037
@ UNIT_FLAG_NONE
Definition: Unit.h:447
@ NPC_PRIESTESS
Definition: blackrock_depths.h:100
@ GO_PALETRESS_LOOT
Definition: trial_of_the_champion.h:181
@ GO_PALETRESS_LOOT_H
Definition: trial_of_the_champion.h:182
@ GO_EADRIC_LOOT
Definition: trial_of_the_champion.h:178
@ GO_EADRIC_LOOT_H
Definition: trial_of_the_champion.h:179
@ EVENT_BLACK_KNIGHT_SAY_TASK
Definition: trial_of_the_champion.h:101
@ EVENT_BLACK_KNIGHT_CAST_ANNOUNCER
Definition: trial_of_the_champion.h:98
@ EVENT_BLACK_KNIGHT_ATTACK
Definition: trial_of_the_champion.h:102
@ EVENT_GRAND_GROUP_2_ATTACK
Definition: trial_of_the_champion.h:77
@ EVENT_BLACK_KNIGHT_MOVE_FORWARD
Definition: trial_of_the_champion.h:100
@ EVENT_SUMMON_ARGENT_CHALLENGE
Definition: trial_of_the_champion.h:87
@ EVENT_SUMMON_GRAND_CHAMPION_1
Definition: trial_of_the_champion.h:70
@ EVENT_ARGENT_CHALLENGE_SAY_1
Definition: trial_of_the_champion.h:88
@ EVENT_GRAND_CHAMPIONS_ATTACK
Definition: trial_of_the_champion.h:83
@ EVENT_CLOSE_GATE
Definition: trial_of_the_champion.h:69
@ EVENT_ARGENT_CHALLENGE_ATTACK
Definition: trial_of_the_champion.h:92
@ EVENT_BLACK_KNIGHT_KILL_ANNOUNCER
Definition: trial_of_the_champion.h:99
@ EVENT_GRAND_CHAMPIONS_MOUNTS_ATTACK
Definition: trial_of_the_champion.h:81
@ EVENT_GRAND_GROUP_3_ATTACK
Definition: trial_of_the_champion.h:79
@ EVENT_ARGENT_CHALLENGE_SAY_2
Definition: trial_of_the_champion.h:89
@ EVENT_ARGENT_SOLDIER_GROUP_ATTACK
Definition: trial_of_the_champion.h:90
@ EVENT_GRAND_GROUP_1_ATTACK
Definition: trial_of_the_champion.h:75
@ EVENT_ARGENT_CHALLENGE_DISAPPEAR
Definition: trial_of_the_champion.h:95
@ EVENT_ARGENT_CHALLENGE_LEAVE_CHEST
Definition: trial_of_the_champion.h:94
@ EVENT_NULL
Definition: trial_of_the_champion.h:67
@ TEXT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:231
@ TEXT_BK_MEANING
Definition: trial_of_the_champion.h:235
@ TEXT_BEGIN
Definition: trial_of_the_champion.h:230
@ SAY_BK_INTRO_1
Definition: trial_of_the_champion.h:238
@ SAY_BK_INTRO_2
Definition: trial_of_the_champion.h:239
@ SAY_BK_INTRO_3
Definition: trial_of_the_champion.h:240
@ TEXT_WELCOME_2
Definition: trial_of_the_champion.h:229
@ SAY_PALETRESS_INTRO_2
Definition: trial_of_the_champion.h:220
@ SAY_PALETRESS_INTRO_1
Definition: trial_of_the_champion.h:219
@ SAY_EADRIC_INTRO
Definition: trial_of_the_champion.h:210
@ TEXT_YOU_MAY_BEGIN
Definition: trial_of_the_champion.h:232
@ SAY_KNIGHT_INTRO
Definition: trial_of_the_champion.h:207
@ VEHICLE_BLACK_KNIGHT
Definition: trial_of_the_champion.h:190
@ NPC_ARGENT_LIGHTWIELDER
Definition: trial_of_the_champion.h:138
@ NPC_EADRIC_H
Definition: trial_of_the_champion.h:134
@ NPC_ARGENT_MONK
Definition: trial_of_the_champion.h:139
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:17956
Definition: Vehicle.h:30

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, TYPEID_UNIT, 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