aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Vehicle.cpp15
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp207
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp43
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp1231
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp451
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp473
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h137
7 files changed, 1808 insertions, 749 deletions
diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp
index 2ff217e912e..09f1e8c2ade 100644
--- a/src/game/Vehicle.cpp
+++ b/src/game/Vehicle.cpp
@@ -125,6 +125,17 @@ void Vehicle::InstallAllAccessories()
case 35640:InstallAccessory(35571,0,false);break;
case 35641:InstallAccessory(35570,0,false);break;
case 35634:InstallAccessory(35617,0,false);break;
+ case 33298:InstallAccessory(35332,0);break; //Darnassian Nightsaber
+ case 33416:InstallAccessory(35330,0);break; //Exodar Elekk
+ case 33297:InstallAccessory(35328,0);break; //Stormwind Steed
+ case 33414:InstallAccessory(35327,0);break; //Forsaken Warhorse
+ case 33301:InstallAccessory(35331,0);break; //Gnomeregan Mechanostrider
+ case 33408:InstallAccessory(35329,0);break; //Ironforge Ram
+ case 33300:InstallAccessory(35325,0);break; //Thunder Bluff Kodo
+ case 33409:InstallAccessory(35314,0);break; //Orgrimmar Wolf
+ case 33418:InstallAccessory(35326,0);break; //Silvermoon Hawkstrider
+ case 33299:InstallAccessory(35323,0);break; //Darkspear Raptor
+ case 35491:InstallAccessory(35451,0,false);break; //Black Knight
}
}
@@ -307,7 +318,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
unit->m_movementInfo.t_seat = seat->first;
if(me->GetTypeId() == TYPEID_UNIT
- && unit->GetTypeId() == TYPEID_PLAYER
+ && unit->GetTypeId() == TYPEID_PLAYER
&& seat->first == 0 && seat->second.seatInfo->m_flags & 0x800) // not right
if (!me->SetCharmedBy(unit, CHARM_TYPE_VEHICLE))
assert(false);
@@ -365,7 +376,7 @@ void Vehicle::RemovePassenger(Unit *unit)
//SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
if(me->GetTypeId() == TYPEID_UNIT
- && unit->GetTypeId() == TYPEID_PLAYER
+ && unit->GetTypeId() == TYPEID_PLAYER
&& seat->first == 0 && seat->second.seatInfo->m_flags & 0x800)
me->RemoveCharmedBy(unit);
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp
index db2a46ea28e..5709150b70e 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp
@@ -18,13 +18,14 @@
/* ScriptData
SDName: Argent Challenge Encounter.
-SD%Complete: 90 %
-SDComment: Texts are not implemented.
+SD%Complete: 50 %
+SDComment: AI for Argent Soldiers are not implemented. AI from bosses need more improvements.
SDCategory: Trial of the Champion
EndScriptData */
#include "ScriptedPch.h"
#include "trial_of_the_champion.h"
+#include "ScriptedEscortAI.h"
enum eSpells
{
@@ -58,21 +59,62 @@ enum eSpells
struct TRINITY_DLL_DECL boss_eadricAI : public ScriptedAI
{
- boss_eadricAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+ boss_eadricAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+ pCreature->SetReactState(REACT_PASSIVE);
+ pCreature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ }
+
+ ScriptedInstance* pInstance;
uint32 uiVenganceTimer;
uint32 uiRadianceTimer;
uint32 uiHammerJusticeTimer;
+ uint32 uiResetTimer;
+
+ bool bDone;
void Reset()
{
uiVenganceTimer = 10000;
uiRadianceTimer = 16000;
uiHammerJusticeTimer = 25000;
+ uiResetTimer = 5000;
+
+ bDone = false;
+ }
+
+ void DamageTaken(Unit *done_by, uint32 &damage)
+ {
+ if (damage >= m_creature->GetHealth())
+ {
+ damage = 0;
+ EnterEvadeMode();
+ m_creature->setFaction(35);
+ bDone = true;
+ }
+ }
+
+ void MovementInform(uint32 MovementType, uint32 Data)
+ {
+ if (MovementType != POINT_MOTION_TYPE)
+ return;
+
+ if (pInstance)
+ pInstance->SetData(BOSS_ARGENT_CHALLENGE_E, DONE);
+
+ m_creature->DisappearAndDie();
}
void UpdateAI(const uint32 uiDiff)
{
+ if (bDone && uiResetTimer <= uiDiff)
+ {
+ m_creature->GetMotionMaster()->MovePoint(0,746.87,665.87,411.75);
+ bDone = false;
+ } else uiResetTimer -= uiDiff;
+
if (!UpdateVictim())
return;
@@ -118,7 +160,12 @@ struct TRINITY_DLL_DECL boss_paletressAI : public ScriptedAI
{
boss_paletressAI(Creature* pCreature) : ScriptedAI(pCreature)
{
+ pInstance = pCreature->GetInstanceData();
+
pMemory = NULL;
+ pCreature->SetReactState(REACT_PASSIVE);
+ pCreature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ pCreature->RestoreFaction();
}
ScriptedInstance* pInstance;
@@ -126,12 +173,12 @@ struct TRINITY_DLL_DECL boss_paletressAI : public ScriptedAI
Creature* pMemory;
bool bHealth;
+ bool bDone;
uint32 uiHolyFireTimer;
uint32 uiHolySmiteTimer;
uint32 uiRenewTimer;
-
- uint32 uiRandomSpell;
+ uint32 uiResetTimer;
void Reset()
{
@@ -140,9 +187,11 @@ struct TRINITY_DLL_DECL boss_paletressAI : public ScriptedAI
uiHolyFireTimer = urand(9000,12000);
uiHolySmiteTimer = urand(5000,7000);
uiRenewTimer = urand(2000,5000);
- uiRandomSpell = 0;
+
+ uiResetTimer = 7000;
bHealth = false;
+ bDone = false;
if (pMemory && pMemory->isAlive())
pMemory->RemoveFromWorld();
@@ -154,8 +203,36 @@ struct TRINITY_DLL_DECL boss_paletressAI : public ScriptedAI
m_creature->RemoveAura(SPELL_SHIELD);
}
+ void DamageTaken(Unit *done_by, uint32 &damage)
+ {
+ if (damage >= m_creature->GetHealth())
+ {
+ damage = 0;
+ EnterEvadeMode();
+ m_creature->setFaction(35);
+ bDone = true;
+ }
+ }
+
+ void MovementInform(uint32 MovementType, uint32 Data)
+ {
+ if (MovementType != POINT_MOTION_TYPE)
+ return;
+
+ if (pInstance)
+ pInstance->SetData(BOSS_ARGENT_CHALLENGE_P, DONE);
+
+ m_creature->DisappearAndDie();
+ }
+
void UpdateAI(const uint32 uiDiff)
{
+ if (bDone && uiResetTimer <= uiDiff)
+ {
+ m_creature->GetMotionMaster()->MovePoint(0,746.87,665.87,411.75);
+ bDone = false;
+ } else uiResetTimer -= uiDiff;
+
if (!UpdateVictim())
return;
@@ -207,7 +284,6 @@ struct TRINITY_DLL_DECL boss_paletressAI : public ScriptedAI
if (!bHealth && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 25)
{
m_creature->InterruptNonMeleeSpells(true);
- uiRandomSpell = urand(1,26);
DoCastAOE(SPELL_HOLY_NOVA,false);
DoCast(m_creature, SPELL_SHIELD);
DoCastAOE(SPELL_SUMMON_MEMORY,false);
@@ -282,11 +358,13 @@ struct TRINITY_DLL_DECL npc_memoryAI : public ScriptedAI
void JustDied(Unit* pKiller)
{
if (m_creature->isSummon())
+ {
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
{
if (pSummoner && pSummoner->isAlive())
CAST_CRE(pSummoner)->AI()->SetData(1,0);
}
+ }
}
};
@@ -295,6 +373,116 @@ CreatureAI* GetAI_npc_memory(Creature* pCreature)
return new npc_memoryAI(pCreature);
}
+// THIS AI NEEDS MORE IMPROVEMENTS
+struct TRINITY_DLL_DECL npc_argent_soldierAI : public npc_escortAI
+{
+ npc_argent_soldierAI(Creature* pCreature) : npc_escortAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+ m_creature->SetReactState(REACT_DEFENSIVE);
+ SetDespawnAtEnd(false);
+ uiWaypoint = 0;
+ }
+
+ ScriptedInstance* pInstance;
+
+ uint8 uiWaypoint;
+
+ void WaypointReached(uint32 uiPoint)
+ {
+ if (uiPoint == 0)
+ {
+ switch(uiWaypoint)
+ {
+ case 0:
+ m_creature->SetOrientation(5.81);
+ break;
+ case 1:
+ m_creature->SetOrientation(4.60);
+ break;
+ case 2:
+ m_creature->SetOrientation(2.79);
+ break;
+ }
+
+ m_creature->SendMovementFlagUpdate();
+ }
+ }
+
+ void SetData(uint32 uiType, uint32 uiData)
+ {
+ switch(m_creature->GetEntry())
+ {
+ case NPC_ARGENT_LIGHWIELDER:
+ switch(uiType)
+ {
+ case 0:
+ AddWaypoint(0,712.14,628.42,411.88);
+ break;
+ case 1:
+ AddWaypoint(0,742.44,650.29,411.79);
+ break;
+ case 2:
+ AddWaypoint(0,783.33,615.29,411.84);
+ break;
+ }
+ break;
+ case NPC_ARGENT_MONK:
+ switch(uiType)
+ {
+ case 0:
+ AddWaypoint(0,713.12,632.97,411.90);
+ break;
+ case 1:
+ AddWaypoint(0,746.73,650.24,411.56);
+ break;
+ case 2:
+ AddWaypoint(0,781.32,610.54,411.82);
+ break;
+ }
+ break;
+ case NPC_PRIESTESS:
+ switch(uiType)
+ {
+ case 0:
+ AddWaypoint(0,715.06,637.07,411.91);
+ break;
+ case 1:
+ AddWaypoint(0,750.72,650.20,411.77);
+ break;
+ case 2:
+ AddWaypoint(0,779.77,607.03,411.81);
+ break;
+ }
+ break;
+ }
+
+ Start(false,true,0);
+ uiWaypoint = uiType;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ npc_escortAI::UpdateAI(uiDiff);
+
+ if (!UpdateVictim())
+ return;
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_ARGENT_SOLDIER_DEFEATED,pInstance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1);
+ }
+};
+
+CreatureAI* GetAI_npc_argent_soldier(Creature* pCreature)
+{
+ return new npc_argent_soldierAI(pCreature);
+}
+
void AddSC_boss_argent_challenge()
{
Script* NewScript;
@@ -313,4 +501,9 @@ void AddSC_boss_argent_challenge()
NewScript->Name = "npc_memory";
NewScript->GetAI = &GetAI_npc_memory;
NewScript->RegisterSelf();
+
+ NewScript = new Script;
+ NewScript->Name = "npc_argent_soldier";
+ NewScript->GetAI = &GetAI_npc_argent_soldier;
+ NewScript->RegisterSelf();
}
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
index 03582e4a803..122e4430707 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ SDCategory: Trial of the Champion
EndScriptData */
#include "ScriptedPch.h"
+#include "ScriptedEscortAI.h"
#include "trial_of_the_champion.h"
enum eSpells
@@ -132,7 +133,7 @@ struct TRINITY_DLL_DECL boss_black_knightAI : public ScriptedAI
for(std::list<uint64>::iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
{
- if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr))
+ if (Creature* pTemp = Unit::GetCreature(*m_creature, *itr))
if (pTemp)
pTemp->DisappearAndDie();
}
@@ -276,6 +277,12 @@ struct TRINITY_DLL_DECL boss_black_knightAI : public ScriptedAI
bEventInProgress = true;
}
}
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(BOSS_BLACK_KNIGHT,DONE);
+ }
};
CreatureAI* GetAI_boss_black_knight(Creature *pCreature)
@@ -318,6 +325,33 @@ CreatureAI* GetAI_npc_risen_ghoul(Creature* pCreature)
return new npc_risen_ghoulAI(pCreature);
}
+struct TRINITY_DLL_DECL npc_black_knight_skeletal_gryphonAI : public npc_escortAI
+{
+ npc_black_knight_skeletal_gryphonAI(Creature* pCreature) : npc_escortAI(pCreature)
+ {
+ Start(false,true,0,NULL);
+ }
+
+ void WaypointReached(uint32 i)
+ {
+
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ npc_escortAI::UpdateAI(uiDiff);
+
+ if (!UpdateVictim())
+ return;
+ }
+
+};
+
+CreatureAI* GetAI_npc_black_knight_skeletal_gryphon(Creature* pCreature)
+{
+ return new npc_black_knight_skeletal_gryphonAI(pCreature);
+}
+
void AddSC_boss_black_knight()
{
Script* NewScript;
@@ -331,4 +365,9 @@ void AddSC_boss_black_knight()
NewScript->Name = "npc_risen_ghoul";
NewScript->GetAI = &GetAI_npc_risen_ghoul;
NewScript->RegisterSelf();
+
+ NewScript = new Script;
+ NewScript->Name = "npc_black_knight_skeletal_gryphon";
+ NewScript->GetAI = &GetAI_npc_black_knight_skeletal_gryphon;
+ NewScript->RegisterSelf();
}
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
index 327faafc0db..8f0efc86eac 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
@@ -16,537 +16,943 @@
/* ScriptData
SDName: boss_grand_champions
-SD%Complete: 92%
-SDComment: missing yells. hunter AI sucks. no pvp diminuishing returns(is it DB related?)
+SD%Complete: 50 %
+SDComment: Is missing the ai to make the npcs look for a new mount and use it.
SDCategory: Trial Of the Champion
EndScriptData */
#include "ScriptedPch.h"
+#include "ScriptedEscortAI.h"
+#include "Vehicle.h"
#include "trial_of_the_champion.h"
-enum Spells
+enum eSpells
{
- //yells
-
- //warrior
- SPELL_MORTAL_STRIKE = 68783,
- SPELL_MORTAL_STRIKE_H = 68784,
- SPELL_BLADESTORM = 63784,
- SPELL_INTERCEPT = 67540,
- SPELL_ROLLING_THROW = 47115, //need core support for spell 67546, using 47115 instead
- //mage
- SPELL_FIREBALL = 66042,
- SPELL_FIREBALL_H = 68310,
- SPELL_BLAST_WAVE = 66044,
- SPELL_BLAST_WAVE_H = 68312,
- SPELL_HASTE = 66045,
- SPELL_POLYMORPH = 66043,
- SPELL_POLYMORPH_H = 68311,
- //shaman
- SPELL_CHAIN_LIGHTNING = 67529,
- SPELL_CHAIN_LIGHTNING_H = 68319,
- SPELL_EARTH_SHIELD = 67530,
- SPELL_HEALING_WAVE = 67528,
- SPELL_HEALING_WAVE_H = 68318,
- SPELL_HEX_OF_MENDING = 67534,
- //hunter
- SPELL_DISENGAGE = 68340,
- SPELL_LIGHTNING_ARROWS = 66083,
- SPELL_MULTI_SHOT = 66081,
- SPELL_SHOOT = 66079,
- //rogue
- SPELL_EVISCERATE = 67709,
- SPELL_EVISCERATE_H = 68317,
- SPELL_FAN_OF_KNIVES = 67706,
- SPELL_POISON_BOTTLE = 67701
+ //Vehicle
+ SPELL_CHARGE = 63010,
+ SPELL_SHIELD_BREAKER = 68504,
+ SPELL_SHIELD = 66482,
+
+ // Marshal Jacob Alerius && Mokra the Skullcrusher || Warrior
+ SPELL_MORTAL_STRIKE = 68783,
+ SPELL_MORTAL_STRIKE_H = 68784,
+ SPELL_BLADESTORM = 63784,
+ SPELL_INTERCEPT = 67540,
+ SPELL_ROLLING_THROW = 47115, //not implemented in the AI yet...
+
+ // Ambrose Boltspark && Eressea Dawnsinger || Mage
+ SPELL_FIREBALL = 66042,
+ SPELL_FIREBALL_H = 68310,
+ SPELL_BLAST_WAVE = 66044,
+ SPELL_BLAST_WAVE_H = 68312,
+ SPELL_HASTE = 66045,
+ SPELL_POLYMORPH = 66043,
+ SPELL_POLYMORPH_H = 68311,
+
+ // Colosos && Runok Wildmane || Shaman
+ SPELL_CHAIN_LIGHTNING = 67529,
+ SPELL_CHAIN_LIGHTNING_H = 68319,
+ SPELL_EARTH_SHIELD = 67530,
+ SPELL_HEALING_WAVE = 67528,
+ SPELL_HEALING_WAVE_H = 68318,
+ SPELL_HEX_OF_MENDING = 67534,
+
+ // Jaelyne Evensong && Zul'tore || Hunter
+ SPELL_DISENGAGE = 68340, //not implemented in the AI yet...
+ SPELL_LIGHTNING_ARROWS = 66083,
+ SPELL_MULTI_SHOT = 66081,
+ SPELL_SHOOT = 65868,
+ SPELL_SHOOT_H = 67988,
+
+ // Lana Stouthammer Evensong && Deathstalker Visceri || Rouge
+ SPELL_EVISCERATE = 67709,
+ SPELL_EVISCERATE_H = 68317,
+ SPELL_FAN_OF_KNIVES = 67706,
+ SPELL_POISON_BOTTLE = 67701
};
-// Warrior
-struct TRINITY_DLL_DECL mob_toc5_warriorAI : public ScriptedAI
+enum eSeat
{
- mob_toc5_warriorAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
- }
+ SEAT_ID_0 = 0
+};
- ScriptedInstance* m_pInstance;
+struct Point
+{
+ float x,y,z;
+};
- uint32 Mortal_Strike_Timer;
- uint32 Bladestorm_Timer;
- uint32 Rolling_Throw_Timer;
- uint32 Intercept_Cooldown;
- uint32 intercept_check;
+const Point MovementPoint[] =
+{
+ {746.84,623.15,411.41},
+ {747.96,620.29,411.09},
+ {750.23,618.35,411.09}
+};
- void Reset()
+void AggroAllPlayers(Creature* pTemp)
+{
+ Map::PlayerList const &PlList = pTemp->GetMap()->GetPlayers();
+
+ if(PlList.isEmpty())
+ return;
+
+ for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
{
- m_creature->SetRespawnDelay(999999999);
- Mortal_Strike_Timer = 6000;
- Bladestorm_Timer = 20000;
- Rolling_Throw_Timer = 30000;
- Intercept_Cooldown = 0;
- intercept_check = 1000;
+ if(Player* pPlayer = i->getSource())
+ {
+ if(pPlayer->isGameMaster())
+ continue;
+
+ if(pPlayer->isAlive())
+ {
+ pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ pTemp->SetReactState(REACT_AGGRESSIVE);
+ pTemp->SetInCombatWith(pPlayer);
+ pPlayer->SetInCombatWith(pTemp);
+ pTemp->AddThreat(pPlayer, 0.0f);
+ }
+ }
+ }
+}
+
+bool GrandChampionsOutVehicle(Creature* m_creature)
+{
+ ScriptedInstance* pInstance = m_creature->GetInstanceData();
+
+ if (!pInstance)
+ return false;
+
+ Creature* pGrandChampion1 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_GRAND_CHAMPION_1));
+ Creature* pGrandChampion2 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_GRAND_CHAMPION_2));
+ Creature* pGrandChampion3 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_GRAND_CHAMPION_3));
+
+ if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
+ {
+ if (!pGrandChampion1->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) &&
+ !pGrandChampion2->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) &&
+ !pGrandChampion3->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
+ return true;
+ }
+
+ return false;
+}
+
+/*
+* Generic AI for vehicles used by npcs in ToC, it needs more improvements. *
+* Script Complete: 25%. *
+*/
+
+struct TRINITY_DLL_DECL generic_vehicleAI_toc5AI : public npc_escortAI
+{
+ generic_vehicleAI_toc5AI(Creature* pCreature) : npc_escortAI(pCreature), pVehicle(pCreature->GetVehicleKit())
+ {
+ SetDespawnAtEnd(false);
+ uiWaypointPath = 0;
+
+ pInstance = pCreature->GetInstanceData();
}
- void EnterEvadeMode()
- {
- }
+ Vehicle* pVehicle;
- void Aggro(Unit* pWho)
+ ScriptedInstance* pInstance;
+
+ uint32 uiChargeTimer;
+ uint32 uiShieldBreakerTimer;
+ uint32 uiBuffTimer;
+
+ uint32 uiWaypointPath;
+
+ void Reset()
+ {
+ uiChargeTimer = 5000;
+ uiShieldBreakerTimer = 8000;
+ uiBuffTimer = urand(30000,60000);
+ }
+
+ void SetData(uint32 uiType, uint32 uiData)
{
- if (!m_pInstance)
- return;
- if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
- m_creature->ForcedDespawn();
- else
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
+ switch(uiType)
+ {
+ case 1:
+ AddWaypoint(0,747.36,634.07,411.572);
+ AddWaypoint(1,780.43,607.15,411.82);
+ AddWaypoint(2,785.99,599.41,411.92);
+ AddWaypoint(3,778.44,601.64,411.79);
+ uiWaypointPath = 1;
+ break;
+ case 2:
+ AddWaypoint(0,747.35,634.07,411.57);
+ AddWaypoint(1,768.72,581.01,411.92);
+ AddWaypoint(2,763.55,590.52,411.71);
+ uiWaypointPath = 2;
+ break;
+ case 3:
+ AddWaypoint(0,747.35,634.07,411.57);
+ AddWaypoint(1,784.02,645.33,412.39);
+ AddWaypoint(2,775.67,641.91,411.91);
+ uiWaypointPath = 3;
+ break;
+ }
+
+ if (uiType <= 3)
+ Start(false,true,0,NULL);
}
- void JustDied(Unit* pKiller)
+ void WaypointReached(uint32 i)
+ {
+ switch(i)
{
- if (!m_pInstance)
- return;
+ case 2:
+ if (pInstance && uiWaypointPath == 3 || uiWaypointPath == 2)
+ pInstance->SetData(DATA_MOVEMENT_DONE, pInstance->GetData(DATA_MOVEMENT_DONE)+1);
+ break;
+ case 3:
+ if (pInstance)
+ pInstance->SetData(DATA_MOVEMENT_DONE, pInstance->GetData(DATA_MOVEMENT_DONE)+1);
+ break;
+ }
+ }
- if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
- !m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
- && !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
- && !m_creature->FindNearestCreature(34703, 200, true))
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
- }
+ void EnterCombat(Unit* pWho)
+ {
+ DoCastSpellShield();
+ }
- void UpdateAI(const uint32 diff)
+ void DoCastSpellShield()
{
- if (!m_creature->SelectVictim() || !m_creature->getVictim())
+ for (uint8 i = 0; i < 3; ++i)
+ DoCast(m_creature,SPELL_SHIELD,true);
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ npc_escortAI::UpdateAI(uiDiff);
+
+ if (!UpdateVictim())
return;
- if (Mortal_Strike_Timer < diff)
- {
- DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_MORTAL_STRIKE, SPELL_MORTAL_STRIKE_H));
- Mortal_Strike_Timer = 6000;
- }else Mortal_Strike_Timer -= diff;
-
- if (Rolling_Throw_Timer < diff)
- {
- DoCast(m_creature->getVictim(), SPELL_ROLLING_THROW);
- Rolling_Throw_Timer = 30000;
- }else Rolling_Throw_Timer -= diff;
-
- if (Bladestorm_Timer < diff)
- {
- DoCast(m_creature, SPELL_BLADESTORM);
- Bladestorm_Timer = 90000;
- }else Bladestorm_Timer -= diff;
-
- if (intercept_check < diff)
- {
- if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 25) && Intercept_Cooldown < diff)
- {
- DoCast(m_creature->getVictim(), SPELL_INTERCEPT);
- Intercept_Cooldown = 15000;
- }
- intercept_check = 1000;
- }
- else
- {
- intercept_check -= diff;
- Intercept_Cooldown -= diff;
- }
-
- DoMeleeAttackIfReady();
- }
+ if (uiBuffTimer <= uiDiff)
+ {
+ if (!m_creature->HasAura(SPELL_SHIELD))
+ DoCastSpellShield();
+
+ uiBuffTimer = urand(30000,45000);
+ }else uiBuffTimer -= uiDiff;
+
+ if (uiChargeTimer <= uiDiff)
+ {
+ Map::PlayerList const& players = m_creature->GetMap()->GetPlayers();
+ if (m_creature->GetMap()->IsDungeon() && !players.isEmpty())
+ {
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ Player* pPlayer = itr->getSource();
+ if (pPlayer && !pPlayer->isGameMaster() && m_creature->IsInRange(pPlayer,8.0f,25.0f,false))
+ {
+ DoResetThreat();
+ m_creature->AddThreat(pPlayer,1.0f);
+ DoCast(pPlayer, SPELL_CHARGE);
+ break;
+ }
+ }
+ }
+ uiChargeTimer = 5000;
+ }else uiChargeTimer -= uiDiff;
+
+ //dosen't work at all
+ if (uiShieldBreakerTimer <= uiDiff)
+ {
+ if (Unit* pPassenger = pVehicle->GetPassenger(SEAT_ID_0))
+ {
+ Map::PlayerList const& players = m_creature->GetMap()->GetPlayers();
+ if (m_creature->GetMap()->IsDungeon() && !players.isEmpty())
+ {
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ Player* pPlayer = itr->getSource();
+ if (pPlayer && !pPlayer->isGameMaster() && m_creature->IsInRange(pPlayer,10.0f,30.0f,false))
+ {
+ pPassenger->CastSpell(pPlayer,SPELL_SHIELD_BREAKER,true);
+ break;
+ }
+ }
+ }
+ }
+ uiShieldBreakerTimer = 7000;
+ }else uiShieldBreakerTimer <= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
};
-CreatureAI* GetAI_mob_toc5_warrior(Creature* pCreature)
+CreatureAI* GetAI_generic_vehicleAI_toc5(Creature* pCreature)
{
- return new mob_toc5_warriorAI(pCreature);
+ return new generic_vehicleAI_toc5AI(pCreature);
}
-// Mage
-struct TRINITY_DLL_DECL mob_toc5_mageAI : public ScriptedAI
+// Marshal Jacob Alerius && Mokra the Skullcrusher || Warrior
+struct TRINITY_DLL_DECL boss_warrior_toc5AI : public ScriptedAI
{
- mob_toc5_mageAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
- }
+ boss_warrior_toc5AI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+
+ bDone = false;
+ bHome = false;
+
+ uiPhase = 0;
+ uiPhaseTimer = 0;
+
+ m_creature->SetReactState(REACT_PASSIVE);
+ // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
+ m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ }
+
+ ScriptedInstance* pInstance;
- ScriptedInstance* m_pInstance;
+ uint8 uiPhase;
+ uint32 uiPhaseTimer;
- uint32 Fireball_Timer;
- uint32 Blast_Wave_Timer;
- uint32 Haste_Timer;
- uint32 Polymorph_Timer;
+ uint32 uiBladeStormTimer;
+ uint32 uiInterceptTimer;
+ uint32 uiMortalStrikeTimer;
+ uint32 uiAttackTimer;
+
+ bool bDone;
+ bool bHome;
void Reset()
{
- m_creature->SetRespawnDelay(999999999);
- Fireball_Timer = 0;
- Blast_Wave_Timer = 20000;
- Haste_Timer = 9000;
- Polymorph_Timer = 15000;
+ uiBladeStormTimer = urand(15000,20000);
+ uiInterceptTimer = 7000;
+ uiMortalStrikeTimer = urand(8000,12000);
}
- void EnterEvadeMode()
- {
- }
-
- void Aggro(Unit* pWho)
+ void JustReachedHome()
{
- if (!m_pInstance)
- return;
- if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
- m_creature->ForcedDespawn();
- else
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
+ ScriptedAI::JustReachedHome();
+
+ if (!bHome)
+ return;
+
+ uiPhaseTimer = 15000;
+ uiPhase = 1;
+
+ bHome = false;
}
- void JustDied(Unit* pKiller)
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!bDone && GrandChampionsOutVehicle(m_creature))
+ {
+ bDone = true;
+
+ if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_1))
+ m_creature->SetHomePosition(739.678,662.541,412.393,4.49);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_2))
+ m_creature->SetHomePosition(746.71,661.02,411.69,4.6);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_3))
+ m_creature->SetHomePosition(754.34,660.70,412.39,4.79);
+
+ EnterEvadeMode();
+ bHome = true;
+ }
+
+ if (uiPhaseTimer <= uiDiff)
+ {
+ if (uiPhase == 1)
+ {
+ AggroAllPlayers(m_creature);
+ uiPhase = 0;
+ }
+ }else uiPhaseTimer -= uiDiff;
+
+ if (!UpdateVictim() || m_creature->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
+ return;
+
+ if (uiInterceptTimer <= uiDiff)
+ {
+ Map::PlayerList const& players = m_creature->GetMap()->GetPlayers();
+ if (m_creature->GetMap()->IsDungeon() && !players.isEmpty())
+ {
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ Player* pPlayer = itr->getSource();
+ if (pPlayer && !pPlayer->isGameMaster() && m_creature->IsInRange(pPlayer,8.0f,25.0f,false))
+ {
+ DoResetThreat();
+ m_creature->AddThreat(pPlayer,5.0f);
+ DoCast(pPlayer,SPELL_INTERCEPT);
+ break;
+ }
+ }
+ }
+ uiInterceptTimer = 7000;
+ } else uiInterceptTimer -= uiDiff;
+
+ if (uiBladeStormTimer <= uiDiff)
+ {
+ DoCastVictim(SPELL_BLADESTORM);
+ uiBladeStormTimer = urand(15000,20000);
+ } else uiBladeStormTimer -= uiDiff;
+
+ if (uiMortalStrikeTimer <= uiDiff)
{
- if (!m_pInstance)
- return;
+ DoCastVictim(DUNGEON_MODE(SPELL_MORTAL_STRIKE, SPELL_MORTAL_STRIKE_H));
+ uiMortalStrikeTimer = urand(8000,12000);
+ } else uiMortalStrikeTimer -= uiDiff;
- if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
- !m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
- && !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
- && !m_creature->FindNearestCreature(34703, 200, true))
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
- }
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
+ }
+};
+
+CreatureAI* GetAI_boss_warrior_toc5(Creature* pCreature)
+{
+ return new boss_warrior_toc5AI(pCreature);
+}
- void UpdateAI(const uint32 diff)
+// Ambrose Boltspark && Eressea Dawnsinger || Mage
+struct TRINITY_DLL_DECL boss_mage_toc5AI : public ScriptedAI
+{
+ boss_mage_toc5AI(Creature* pCreature) : ScriptedAI(pCreature)
{
- if (!m_creature->SelectVictim() || !m_creature->getVictim())
+ pInstance = pCreature->GetInstanceData();
+
+ bDone = false;
+ bHome = false;
+
+ uiPhase = 0;
+ uiPhaseTimer = 0;
+
+ m_creature->SetReactState(REACT_PASSIVE);
+ // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
+ m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ }
+
+ ScriptedInstance* pInstance;
+
+ uint8 uiPhase;
+ uint32 uiPhaseTimer;
+
+ uint32 uiFireBallTimer;
+ uint32 uiBlastWaveTimer;
+ uint32 uiHasteTimer;
+ uint32 uiPolymorphTimer;
+
+ bool bDone;
+ bool bHome;
+
+ void Reset()
+ {
+ uiFireBallTimer = 5000;
+ uiPolymorphTimer = 8000;
+ uiBlastWaveTimer = 12000;
+ uiHasteTimer = 22000;
+ }
+
+ void JustReachedHome()
+ {
+ ScriptedAI::JustReachedHome();
+
+ if (!bHome)
return;
- if (Fireball_Timer < diff)
+ uiPhaseTimer = 15000;
+ uiPhase = 1;
+
+ bHome = false;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!bDone && GrandChampionsOutVehicle(m_creature))
+ {
+ bDone = true;
+
+ if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_1))
+ m_creature->SetHomePosition(739.678,662.541,412.393,4.49);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_2))
+ m_creature->SetHomePosition(746.71,661.02,411.69,4.6);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_3))
+ m_creature->SetHomePosition(754.34,660.70,412.39,4.79);
+
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
+
+ EnterEvadeMode();
+ bHome = true;
+ }
+
+ if (uiPhaseTimer <= uiDiff)
+ {
+ if (uiPhase == 1)
+ {
+ AggroAllPlayers(m_creature);
+ uiPhase = 0;
+ }
+ }else uiPhaseTimer -= uiDiff;
+
+ if (uiFireBallTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H));
- Fireball_Timer = 3000;
- }else Fireball_Timer -= diff;
+ if (m_creature->getVictim())
+ DoCastVictim(DUNGEON_MODE(SPELL_FIREBALL,SPELL_FIREBALL_H));
+ uiFireBallTimer = 5000;
+ } else uiFireBallTimer -= uiDiff;
- if (Blast_Wave_Timer < diff)
+
+ if (!UpdateVictim() || m_creature->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
+ return;
+
+ if (uiFireBallTimer <= uiDiff)
{
- DoCast(m_creature, DUNGEON_MODE(SPELL_BLAST_WAVE, SPELL_BLAST_WAVE_H));
- Blast_Wave_Timer = 20000;
- }else Blast_Wave_Timer -= diff;
+ DoCastVictim(DUNGEON_MODE(SPELL_FIREBALL,SPELL_FIREBALL_H));
+ uiFireBallTimer = 5000;
+ } else uiFireBallTimer -= uiDiff;
- if (Haste_Timer < diff)
+ if (uiPolymorphTimer <= uiDiff)
{
- DoCast(m_creature, SPELL_HASTE);
- Haste_Timer = 10000;
- }else Haste_Timer -= diff;
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ DoCast(pTarget, DUNGEON_MODE(SPELL_POLYMORPH,SPELL_POLYMORPH_H));
+ uiPolymorphTimer = 8000;
+ } else uiPolymorphTimer -= uiDiff;
- if (Polymorph_Timer < diff)
+ if (uiBlastWaveTimer <= uiDiff)
{
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1))
- DoCast(target, DUNGEON_MODE(SPELL_POLYMORPH, SPELL_POLYMORPH_H));
- Polymorph_Timer = 15000;
- }else Polymorph_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
+ DoCastAOE(DUNGEON_MODE(SPELL_BLAST_WAVE,SPELL_BLAST_WAVE_H),false);
+ uiBlastWaveTimer = 13000;
+ } else uiBlastWaveTimer -= uiDiff;
+
+ if (uiHasteTimer <= uiDiff)
+ {
+ m_creature->InterruptNonMeleeSpells(true);
+
+ DoCast(m_creature,SPELL_HASTE);
+ uiHasteTimer = 22000;
+ } else uiHasteTimer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
+ }
};
-CreatureAI* GetAI_mob_toc5_mage(Creature* pCreature)
+CreatureAI* GetAI_boss_mage_toc5(Creature* pCreature)
{
- return new mob_toc5_mageAI(pCreature);
+ return new boss_mage_toc5AI(pCreature);
}
-// Shaman
-struct TRINITY_DLL_DECL mob_toc5_shamanAI : public ScriptedAI
+// Colosos && Runok Wildmane || Shaman
+struct TRINITY_DLL_DECL boss_shaman_toc5AI : public ScriptedAI
{
- mob_toc5_shamanAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
- }
+ boss_shaman_toc5AI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+
+ bDone = false;
+ bHome = false;
- ScriptedInstance* m_pInstance;
+ uiPhase = 0;
+ uiPhaseTimer = 0;
- uint32 Chain_Lightning_Timer;
- uint32 Earth_Shield_Timer;
- uint32 Healing_Wave_Timer;
- uint32 Hex_Timer;
+ m_creature->SetReactState(REACT_PASSIVE);
+ // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
+ m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ }
- float mob1_health;
- float mob2_health;
- float mob3_health;
+ ScriptedInstance* pInstance;
+
+ uint8 uiPhase;
+ uint32 uiPhaseTimer;
+
+ uint32 uiChainLightningTimer;
+ uint32 uiEartShieldTimer;
+ uint32 uiHealingWaveTimer;
+ uint32 uiHexMendingTimer;
+
+ bool bDone;
+ bool bHome;
void Reset()
{
- m_creature->SetRespawnDelay(999999999);
- Chain_Lightning_Timer = 1000;
- Earth_Shield_Timer = 5000;
- Healing_Wave_Timer = 13000;
- Hex_Timer = 10000;
+ uiChainLightningTimer = 16000;
+ uiHealingWaveTimer = 12000;
+ uiEartShieldTimer = urand(30000,35000);
+ uiHexMendingTimer = urand(20000,25000);
}
- void EnterEvadeMode()
- {
- }
+ void EnterCombat(Unit* pWho)
+ {
+ DoCast(m_creature,SPELL_EARTH_SHIELD);
+ DoCast(pWho,SPELL_HEX_OF_MENDING);
+ };
- void Aggro(Unit* pWho)
+ void JustReachedHome()
{
- if (!m_pInstance)
- return;
- if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
- m_creature->ForcedDespawn();
- else
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
+ ScriptedAI::JustReachedHome();
+
+ if (!bHome)
+ return;
+
+ uiPhaseTimer = 15000;
+ uiPhase = 1;
+
+ bHome = false;
}
- void JustDied(Unit* pKiller)
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!bDone && GrandChampionsOutVehicle(m_creature))
{
- if (!m_pInstance)
- return;
+ bDone = true;
- if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
- !m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
- && !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
- && !m_creature->FindNearestCreature(34703, 200, true))
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
- }
+ if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_1))
+ m_creature->SetHomePosition(739.678,662.541,412.393,4.49);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_2))
+ m_creature->SetHomePosition(746.71,661.02,411.69,4.6);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_3))
+ m_creature->SetHomePosition(754.34,660.70,412.39,4.79);
- void UpdateAI(const uint32 diff)
- {
- if (!m_creature->SelectVictim() || !m_creature->getVictim())
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
+
+ EnterEvadeMode();
+ bHome = true;
+ }
+
+ if (uiPhaseTimer <= uiDiff)
+ {
+ if (uiPhase == 1)
+ {
+ AggroAllPlayers(m_creature);
+ uiPhase = 0;
+ }
+ }else uiPhaseTimer -= uiDiff;
+
+ if (!UpdateVictim() || m_creature->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
return;
- if (Chain_Lightning_Timer < diff)
+ if (uiChainLightningTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_CHAIN_LIGHTNING, SPELL_CHAIN_LIGHTNING_H));
- Chain_Lightning_Timer = 10000;
- }else Chain_Lightning_Timer -= diff;
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ DoCast(pTarget,DUNGEON_MODE(SPELL_CHAIN_LIGHTNING,SPELL_CHAIN_LIGHTNING_H));
- if (Hex_Timer < diff)
+ uiChainLightningTimer = 16000;
+ } else uiChainLightningTimer -= uiDiff;
+
+ if (uiHealingWaveTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), SPELL_HEX_OF_MENDING);
- Hex_Timer = 20000;
- }else Hex_Timer -= diff;
+ bool bChance = urand(0,1);
+
+ if (!bChance)
+ {
+ if (Unit* pFriend = DoSelectLowestHpFriendly(40))
+ DoCast(pFriend,DUNGEON_MODE(SPELL_HEALING_WAVE,SPELL_HEALING_WAVE_H));
+ } else
+ DoCast(m_creature,DUNGEON_MODE(SPELL_HEALING_WAVE,SPELL_HEALING_WAVE_H));
- if (Healing_Wave_Timer < diff)
+ uiHealingWaveTimer = 12000;
+ } else uiHealingWaveTimer -= uiDiff;
+
+ if (uiEartShieldTimer <= uiDiff)
{
- if(Unit* target = m_creature->SelectNearestTarget(40))
- if(target->GetHealth() == target->GetHealth() * 100 / target->GetMaxHealth() && target->IsFriendlyTo(m_creature))
- {
- DoCast(target, DUNGEON_MODE(SPELL_HEALING_WAVE, SPELL_HEALING_WAVE_H));
- Healing_Wave_Timer = 8000;
- }
- }else Healing_Wave_Timer -= diff;
+ DoCast(m_creature,SPELL_EARTH_SHIELD);
+
+ uiEartShieldTimer = urand(30000,35000);
+ } else uiEartShieldTimer -= uiDiff;
- if (Earth_Shield_Timer < diff)
+ if (uiHexMendingTimer <= uiDiff)
{
- if(Unit* target = m_creature->SelectNearestTarget(40))
- if(!target->HasAura(SPELL_EARTH_SHIELD,m_creature->GetGUID()) && target->IsFriendlyTo(m_creature))
- {
- DoCast(target, SPELL_EARTH_SHIELD);
- Earth_Shield_Timer = 25000;
- }
- }else Earth_Shield_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
+ DoCastVictim(SPELL_HEX_OF_MENDING,true);
+
+ uiHexMendingTimer = urand(20000,25000);
+ } else uiHexMendingTimer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
+ }
};
-CreatureAI* GetAI_mob_toc5_shaman(Creature* pCreature)
+CreatureAI* GetAI_boss_shaman_toc5(Creature* pCreature)
{
- return new mob_toc5_shamanAI(pCreature);
+ return new boss_shaman_toc5AI(pCreature);
}
-// Hunter
-struct TRINITY_DLL_DECL mob_toc5_hunterAI : public ScriptedAI
+// Jaelyne Evensong && Zul'tore || Hunter
+struct TRINITY_DLL_DECL boss_hunter_toc5AI : public ScriptedAI
{
- mob_toc5_hunterAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
- }
+ boss_hunter_toc5AI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+
+ bDone = false;
+ bHome = false;
+
+ uiPhase = 0;
+ uiPhaseTimer = 0;
+
+ m_creature->SetReactState(REACT_PASSIVE);
+ // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
+ m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ }
+
+ ScriptedInstance* pInstance;
- ScriptedInstance* m_pInstance;
+ uint8 uiPhase;
+ uint32 uiPhaseTimer;
- uint32 Shoot_Timer;
- uint32 Lightning_Arrows_Timer;
- uint32 Multi_Shot_Timer;
- uint32 Disengage_Cooldown;
- uint32 enemy_check;
- uint32 disengage_check;
+ uint32 uiShootTimer;
+ uint32 uiMultiShotTimer;
+ uint32 uiLightningArrowsTimer;
+
+ uint64 uiTargetGUID;
+
+ bool bShoot;
+ bool bDone;
+ bool bHome;
void Reset()
{
- m_creature->SetRespawnDelay(999999999);
- Shoot_Timer = 0;
- Lightning_Arrows_Timer = 13000;
- Multi_Shot_Timer = 10000;
- Disengage_Cooldown = 0;
- enemy_check = 1000;
- disengage_check;
- }
+ uiShootTimer = 12000;
+ uiMultiShotTimer = 0;
+ uiLightningArrowsTimer = 7000;
- void EnterEvadeMode()
- {
- }
+ uiTargetGUID = 0;
- void Aggro(Unit* pWho)
+ bShoot = false;
+ }
+
+ void JustReachedHome()
{
- if (!m_pInstance)
- return;
- if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
- m_creature->ForcedDespawn();
- else
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
+ ScriptedAI::JustReachedHome();
+
+ if (!bHome)
+ return;
+
+ uiPhaseTimer = 15000;
+ uiPhase = 1;
+
+ bHome = false;
}
- void JustDied(Unit* pKiller)
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!bDone && GrandChampionsOutVehicle(m_creature))
{
- if (!m_pInstance)
- return;
+ bDone = true;
- if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
- !m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
- && !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
- && !m_creature->FindNearestCreature(34703, 200, true))
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
- }
+ if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_1))
+ m_creature->SetHomePosition(739.678,662.541,412.393,4.49);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_2))
+ m_creature->SetHomePosition(746.71,661.02,411.69,4.6);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_3))
+ m_creature->SetHomePosition(754.34,660.70,412.39,4.79);
- void UpdateAI(const uint32 diff)
- {
- if (!m_creature->SelectVictim() || !m_creature->getVictim())
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
+
+ EnterEvadeMode();
+ bHome = true;
+ }
+
+ if (uiPhaseTimer <= uiDiff)
+ {
+ if (uiPhase == 1)
+ {
+ AggroAllPlayers(m_creature);
+ uiPhase = 0;
+ }
+ }else uiPhaseTimer -= uiDiff;
+
+ if (!UpdateVictim() || m_creature->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
return;
- if (enemy_check < diff)
- {
- if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30))
- {
- m_creature->SetSpeed(MOVE_RUN, 0.0001);
- }
- else
- {
- m_creature->SetSpeed(MOVE_RUN, 1);
- }
- enemy_check = 100;
- }else enemy_check -= diff;
-
- if (Disengage_Cooldown>0)
- Disengage_Cooldown -= diff;
-
- if (Shoot_Timer < diff)
- {
- DoCast(m_creature->getVictim(), SPELL_SHOOT);
- Shoot_Timer = 3000;
- }else Shoot_Timer -= diff;
-
- if (Multi_Shot_Timer < diff)
- {
- m_creature->CastStop(SPELL_SHOOT);
- DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT);
- Multi_Shot_Timer = 10000;
- }else Multi_Shot_Timer -= diff;
-
- if (Lightning_Arrows_Timer < diff)
- {
- m_creature->CastStop(SPELL_SHOOT);
- DoCast(m_creature, SPELL_LIGHTNING_ARROWS);
- Lightning_Arrows_Timer = 25000;
- }else Lightning_Arrows_Timer -= diff;
-
- if (disengage_check < diff)
- {
- if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5) && Disengage_Cooldown == 0)
- {
- DoCast(m_creature, SPELL_DISENGAGE);
- Disengage_Cooldown = 15000;
- }
- disengage_check = 1000;
- }else disengage_check -= diff;
-
- DoMeleeAttackIfReady();
- }
+ if (uiLightningArrowsTimer <= uiDiff)
+ {
+ DoCastAOE(SPELL_LIGHTNING_ARROWS,false);
+ uiLightningArrowsTimer = 7000;
+ } else uiLightningArrowsTimer -= uiDiff;
+
+ if (uiShootTimer <= uiDiff)
+ {
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST,0,30))
+ {
+ uiTargetGUID = pTarget->GetGUID();
+ DoCast(pTarget, DUNGEON_MODE(SPELL_SHOOT,SPELL_SHOOT_H));
+ }
+ uiShootTimer = 12000;
+ uiMultiShotTimer = 3000;
+ bShoot = true;
+ } else uiShootTimer -= uiDiff;
+
+ if (bShoot && uiMultiShotTimer <= uiDiff)
+ {
+ m_creature->InterruptNonMeleeSpells(true);
+ Unit* pTarget = Unit::GetUnit(*m_creature, uiTargetGUID);
+
+ if (pTarget && m_creature->IsInRange(pTarget,5.0f,30.0f,false))
+ {
+ DoCast(pTarget,SPELL_MULTI_SHOT);
+ } else
+ {
+ Map::PlayerList const& players = m_creature->GetMap()->GetPlayers();
+ if (m_creature->GetMap()->IsDungeon() && !players.isEmpty())
+ {
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ Player* pPlayer = itr->getSource();
+ if (pPlayer && !pPlayer->isGameMaster() && m_creature->IsInRange(pPlayer,5.0f,30.0f,false))
+ {
+ DoCast(pTarget,SPELL_MULTI_SHOT);
+ break;
+ }
+ }
+ }
+ }
+ bShoot = false;
+ } else uiMultiShotTimer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
+ }
};
-CreatureAI* GetAI_mob_toc5_hunter(Creature* pCreature)
+CreatureAI* GetAI_boss_hunter_toc5(Creature* pCreature)
{
- return new mob_toc5_hunterAI(pCreature);
+ return new boss_hunter_toc5AI(pCreature);
}
-// Rogue
-struct TRINITY_DLL_DECL mob_toc5_rogueAI : public ScriptedAI
+// Lana Stouthammer Evensong && Deathstalker Visceri || Rouge
+struct TRINITY_DLL_DECL boss_rouge_toc5AI : public ScriptedAI
{
- mob_toc5_rogueAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- Reset();
- m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
- }
+ boss_rouge_toc5AI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
- ScriptedInstance* m_pInstance;
+ bDone = false;
+ bHome = false;
- uint32 Eviscerate_Timer;
- uint32 FoK_Timer;
- uint32 Poison_Timer;
+ uiPhase = 0;
+ uiPhaseTimer = 0;
+
+ m_creature->SetReactState(REACT_PASSIVE);
+ // THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
+ m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ }
+
+ ScriptedInstance* pInstance;
+
+ uint8 uiPhase;
+ uint32 uiPhaseTimer;
+ uint32 uiEviscerateTimer;
+ uint32 uiFanKivesTimer;
+ uint32 uiPosionBottleTimer;
+
+ bool bDone;
+ bool bHome;
void Reset()
{
- m_creature->SetRespawnDelay(999999999);
- Eviscerate_Timer = 15000;
- FoK_Timer = 10000;
- Poison_Timer = 7000;
+ uiEviscerateTimer = 8000;
+ uiFanKivesTimer = 14000;
+ uiPosionBottleTimer = 19000;
}
- void EnterEvadeMode()
- {
- }
-
- void Aggro(Unit* pWho)
+ void JustReachedHome()
{
- if (!m_pInstance)
- return;
- if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
- m_creature->ForcedDespawn();
- else
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
+ ScriptedAI::JustReachedHome();
+
+ if (!bHome)
+ return;
+
+ uiPhaseTimer = 15000;
+ uiPhase = 1;
+
+ bHome = false;
}
- void JustDied(Unit* pKiller)
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (!bDone && GrandChampionsOutVehicle(m_creature))
{
- if (!m_pInstance)
- return;
+ bDone = true;
- if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
- !m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
- && !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
- && !m_creature->FindNearestCreature(34703, 200, true))
- m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
- }
+ if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_1))
+ m_creature->SetHomePosition(739.678,662.541,412.393,4.49);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_2))
+ m_creature->SetHomePosition(746.71,661.02,411.69,4.6);
+ else if (m_creature->GetGUID() == pInstance->GetData64(DATA_GRAND_CHAMPION_3))
+ m_creature->SetHomePosition(754.34,660.70,412.39,4.79);
- void UpdateAI(const uint32 diff)
- {
- if (!m_creature->SelectVictim() || !m_creature->getVictim())
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
+
+ EnterEvadeMode();
+ bHome = true;
+ }
+
+ if (uiPhaseTimer <= uiDiff)
+ {
+ if (uiPhase == 1)
+ {
+ AggroAllPlayers(m_creature);
+ uiPhase = 0;
+ }
+ } else uiPhaseTimer -= uiDiff;
+
+ if (!UpdateVictim() || m_creature->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
return;
- if (Eviscerate_Timer < diff)
+ if (uiEviscerateTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_EVISCERATE, SPELL_EVISCERATE_H));
- Eviscerate_Timer = 10000;
- }else Eviscerate_Timer -= diff;
+ DoCast(m_creature->getVictim(),DUNGEON_MODE(SPELL_EVISCERATE,SPELL_EVISCERATE_H));
+ uiEviscerateTimer = 8000;
+ } else uiEviscerateTimer -= uiDiff;
- if (FoK_Timer < diff)
+ if (uiFanKivesTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES);
- FoK_Timer = 7000;
- }else FoK_Timer -= diff;
+ DoCastAOE(SPELL_FAN_OF_KNIVES,false);
+ uiFanKivesTimer = 14000;
+ } else uiFanKivesTimer -= uiDiff;
- if (Poison_Timer < diff)
+ if (uiPosionBottleTimer <= uiDiff)
{
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
- DoCast(m_creature, SPELL_POISON_BOTTLE);
- Poison_Timer = 6000;
- }else Poison_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ DoCast(pTarget,SPELL_POISON_BOTTLE);
+ uiPosionBottleTimer = 19000;
+ } else uiPosionBottleTimer -= uiDiff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ if (pInstance)
+ pInstance->SetData(BOSS_GRAND_CHAMPIONS, DONE);
+ }
};
-CreatureAI* GetAI_mob_toc5_rogue(Creature* pCreature)
+CreatureAI* GetAI_boss_rouge_toc5(Creature* pCreature)
{
- return new mob_toc5_rogueAI(pCreature);
+ return new boss_rouge_toc5AI(pCreature);
}
void AddSC_boss_grand_champions()
@@ -554,27 +960,32 @@ void AddSC_boss_grand_champions()
Script* NewScript;
NewScript = new Script;
- NewScript->Name = "mob_toc5_warrior";
- NewScript->GetAI = &GetAI_mob_toc5_warrior;
+ NewScript->Name = "generic_vehicleAI_toc5";
+ NewScript->GetAI = &GetAI_generic_vehicleAI_toc5;
NewScript->RegisterSelf();
- NewScript = new Script;
- NewScript->Name = "mob_toc5_mage";
- NewScript->GetAI = &GetAI_mob_toc5_mage;
+ NewScript = new Script;
+ NewScript->Name = "boss_warrior_toc5";
+ NewScript->GetAI = &GetAI_boss_warrior_toc5;
NewScript->RegisterSelf();
- NewScript = new Script;
- NewScript->Name = "mob_toc5_shaman";
- NewScript->GetAI = &GetAI_mob_toc5_shaman;
+ NewScript = new Script;
+ NewScript->Name = "boss_mage_toc5";
+ NewScript->GetAI = &GetAI_boss_mage_toc5;
+ NewScript->RegisterSelf();
+
+ NewScript = new Script;
+ NewScript->Name = "boss_shaman_toc5";
+ NewScript->GetAI = &GetAI_boss_shaman_toc5;
NewScript->RegisterSelf();
- NewScript = new Script;
- NewScript->Name = "mob_toc5_hunter";
- NewScript->GetAI = &GetAI_mob_toc5_hunter;
+ NewScript = new Script;
+ NewScript->Name = "boss_hunter_toc5";
+ NewScript->GetAI = &GetAI_boss_hunter_toc5;
NewScript->RegisterSelf();
- NewScript = new Script;
- NewScript->Name = "mob_toc5_rogue";
- NewScript->GetAI = &GetAI_mob_toc5_rogue;
+ NewScript = new Script;
+ NewScript->Name = "boss_rouge_toc5";
+ NewScript->GetAI = &GetAI_boss_rouge_toc5;
NewScript->RegisterSelf();
}
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp
index 1605b7fd0ab..7b921c27d0e 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp
@@ -1,64 +1,80 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
/* ScriptData
-SDName: Instance_Trial_Of_the_Champion
-SD%Complete: 100
-SDComment:
+SDName: Instance Trial of the Champion
+SDComment:
SDCategory: Trial Of the Champion
EndScriptData */
#include "ScriptedPch.h"
#include "trial_of_the_champion.h"
+#define MAX_ENCOUNTER 4
+
struct TRINITY_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance
{
- instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap), m_uiChampionsLootGUID(NULL), m_uiPaletressLootGUID(NULL), m_uiEadricLootGUID(NULL) { Initialize(); }
+ instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap) {Initialize();}
uint32 m_auiEncounter[MAX_ENCOUNTER];
- std::string strInstData;
-
- uint64 m_uiEadricGUID;
- uint64 m_uiPaletressGUID;
- uint64 m_uiBlackKnightGUID;
- uint64 m_uiJaerenGUID;
- uint64 m_uiArelasGUID;
- uint64 m_uiAnnouncerGUID;
- uint64 m_uiBlackKnightMinionGUID;
- uint64 m_uiArgentChallenger;
- uint64 m_uiMemoryGUID;
-
- GameObject* m_uiChampionsLootGUID;
- GameObject* m_uiPaletressLootGUID;
- GameObject* m_uiEadricLootGUID;
+
+ uint8 uiMovementDone;
+ uint8 uiGrandChampionsDeaths;
+ uint8 uiArgentSoldierDeaths;
+
+ uint64 uiAnnouncerGUID;
+ uint64 uiMainGateGUID;
+ uint64 uiGrandChampionVehicle1GUID;
+ uint64 uiGrandChampionVehicle2GUID;
+ uint64 uiGrandChampionVehicle3GUID;
+ uint64 uiGrandChampion1GUID;
+ uint64 uiGrandChampion2GUID;
+ uint64 uiGrandChampion3GUID;
+ uint64 uiChampionLootGUID;
+ uint64 uiArgentChampionGUID;
+
+ std::list<uint64> VehicleList;
+
+ std::string str_data;
+
+ bool bDone;
void Initialize()
{
- m_uiChampionsLootGUID = 0;
- m_uiEadricGUID = 0;
- m_uiEadricLootGUID = 0;
- m_uiPaletressGUID = 0;
- m_uiPaletressLootGUID = 0;
- m_uiBlackKnightGUID = 0;
- m_uiJaerenGUID = 0;
- m_uiArelasGUID = 0;
- m_uiAnnouncerGUID = 0;
- m_uiBlackKnightMinionGUID = 0;
- m_uiArgentChallenger = 0;
- m_uiMemoryGUID = 0;
+ uiMovementDone = 0;
+ uiGrandChampionsDeaths = 0;
+ uiArgentSoldierDeaths = 0;
+
+ uiAnnouncerGUID = 0;
+ uiMainGateGUID = 0;
+ uiGrandChampionVehicle1GUID = 0;
+ uiGrandChampionVehicle2GUID = 0;
+ uiGrandChampionVehicle3GUID = 0;
+ uiGrandChampion1GUID = 0;
+ uiGrandChampion2GUID = 0;
+ uiGrandChampion3GUID = 0;
+ uiChampionLootGUID = 0;
+ uiArgentChampionGUID = 0;
+
+ bDone = false;
+
+ VehicleList.clear();
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
}
@@ -84,251 +100,226 @@ struct TRINITY_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance
if (Player* pPlayer = players.begin()->getSource())
TeamInInstance = pPlayer->GetTeam();
}
+
switch(pCreature->GetEntry())
{
-
// Champions
- case NPC_MOKRA:
+ case VEHICLE_MOKRA_SKILLCRUSHER_MOUNT:
if (TeamInInstance == HORDE)
- pCreature->UpdateEntry(NPC_JACOB, ALLIANCE);
+ pCreature->UpdateEntry(VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT, ALLIANCE);
break;
- case NPC_ERESSEA:
+ case VEHICLE_ERESSEA_DAWNSINGER_MOUNT:
if (TeamInInstance == HORDE)
- pCreature->UpdateEntry(NPC_AMBROSE, ALLIANCE);
+ pCreature->UpdateEntry(VEHICLE_AMBROSE_BOLTSPARK_MOUNT, ALLIANCE);
break;
- case NPC_RUNOK:
+ case VEHICLE_RUNOK_WILDMANE_MOUNT:
if (TeamInInstance == HORDE)
- pCreature->UpdateEntry(NPC_COLOSOS, ALLIANCE);
+ pCreature->UpdateEntry(VEHICLE_COLOSOS_MOUNT, ALLIANCE);
break;
- case NPC_ZULTORE:
+ case VEHICLE_ZUL_TORE_MOUNT:
if (TeamInInstance == HORDE)
- pCreature->UpdateEntry(NPC_JAELYNE, ALLIANCE);
+ pCreature->UpdateEntry(VEHICLE_EVENSONG_MOUNT, ALLIANCE);
break;
- case NPC_VISCERI:
+ case VEHICLE_DEATHSTALKER_VESCERI_MOUNT:
if (TeamInInstance == HORDE)
- pCreature->UpdateEntry(NPC_LANA, ALLIANCE);
- break;
-
- // Argent Challenge
- case NPC_EADRIC:
- m_uiEadricGUID = pCreature->GetGUID();
- m_uiArgentChallenger = pCreature->GetGUID();
- break;
- case NPC_PALETRESS:
- m_uiPaletressGUID = pCreature->GetGUID();
- m_uiArgentChallenger = pCreature->GetGUID();
- break;
-
- // Black Knight
- case NPC_BLACK_KNIGHT:
- m_uiBlackKnightGUID = pCreature->GetGUID();
- break;
- case NPC_RISEN_JAEREN:
- m_uiBlackKnightMinionGUID = pCreature->GetGUID();
- break;
- case NPC_RISEN_ARELAS:
- m_uiBlackKnightMinionGUID = pCreature->GetGUID();
+ pCreature->UpdateEntry(VEHICLE_LANA_STOUTHAMMER_MOUNT, ALLIANCE);
break;
-
- // Coliseum Announcers
+ // Coliseum Announcer || Just NPC_JAEREN must be spawned.
case NPC_JAEREN:
- m_uiJaerenGUID = pCreature->GetGUID();
+ uiAnnouncerGUID = pCreature->GetGUID();
+ if (TeamInInstance == ALLIANCE)
+ pCreature->UpdateEntry(NPC_ARELAS,ALLIANCE);
break;
- case NPC_ARELAS:
- m_uiArelasGUID = pCreature->GetGUID();
+ case VEHICLE_ARGENT_WARHORSE:
+ case VEHICLE_ARGENT_BATTLEWORG:
+ VehicleList.push_back(pCreature->GetGUID());
+ break;
+ case NPC_EADRIC:
+ case NPC_PALETRESS:
+ uiArgentChampionGUID = pCreature->GetGUID();
break;
-
- // memories
- case MEMORY_ALGALON:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_ARCHIMONDE:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_CHROMAGGUS:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_CYANIGOSA:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_DELRISSA:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_ECK:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_ENTROPIUS:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_GRUUL:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_HAKKAR:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_HEIGAN:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_HEROD:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_HOGGER:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_IGNIS:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_ILLIDAN:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_INGVAR:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_KALITHRESH:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_LUCIFRON:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_MALCHEZAAR:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_MUTANUS:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_ONYXIA:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_THUNDERAAN:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_VANCLEEF:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_VASHJ:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_VEKNILASH:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
- case MEMORY_VEZAX:
- m_uiMemoryGUID = pCreature->GetGUID();
- break;
}
}
- void OnGameObjectCreate(GameObject* pGo, bool add)
+ void OnGameObjectCreate(GameObject* pGO, bool bAdd)
{
- switch(pGo->GetEntry())
+ switch(pGO->GetEntry())
{
- case GO_CHAMPIONS_LOOT: m_uiChampionsLootGUID = add ? pGo : NULL; break;
- case GO_EADRIC_LOOT: m_uiEadricLootGUID = add ? pGo : NULL; break;
- case GO_PALETRESS_LOOT: m_uiPaletressLootGUID = add ? pGo : NULL; break;
- case GO_CHAMPIONS_LOOT_H: m_uiChampionsLootGUID = add ? pGo : NULL; break;
- case GO_EADRIC_LOOT_H: m_uiEadricLootGUID = add ? pGo : NULL; break;
- case GO_PALETRESS_LOOT_H: m_uiPaletressLootGUID = add ? pGo : NULL; break;
- }
+ case GO_MAIN_GATE:
+ uiMainGateGUID = pGO->GetGUID();
+ break;
+ case GO_CHAMPIONS_LOOT:
+ case GO_CHAMPIONS_LOOT_H:
+ uiChampionLootGUID = pGO->GetGUID();
+ break;
+ }
}
- void SetData(uint32 Type, uint32 Data)
+ void SetData(uint32 uiType, uint32 uiData)
{
- switch(Type)
+ switch(uiType)
{
- case DATA_TOC5_ANNOUNCER:
- m_uiAnnouncerGUID = Data;
- break;
- case DATA_BLACK_KNIGHT_MINION:
- m_uiBlackKnightMinionGUID = Data;
- break;
- case TYPE_GRAND_CHAMPIONS:
- if (Data == DONE)
- m_uiChampionsLootGUID->SetRespawnTime(m_uiChampionsLootGUID->GetRespawnDelay());
- m_auiEncounter[0] = Data;
+ case DATA_MOVEMENT_DONE:
+ uiMovementDone = uiData;
+ if (uiMovementDone == 3)
+ {
+ if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
+ pAnnouncer->AI()->SetData(DATA_IN_POSITION,0);
+ }
+ break;
+ case BOSS_GRAND_CHAMPIONS:
+ m_auiEncounter[0] = uiData;
+ if (uiData == IN_PROGRESS)
+ {
+ for(std::list<uint64>::iterator itr = VehicleList.begin(); itr != VehicleList.end(); ++itr)
+ if (Creature* pSummon = instance->GetCreature(*itr))
+ pSummon->RemoveFromWorld();
+ }else if (uiData == DONE)
+ {
+ ++uiGrandChampionsDeaths;
+ if (uiGrandChampionsDeaths == 3)
+ {
+ if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
+ {
+ pAnnouncer->GetMotionMaster()->MovePoint(0,748.309,619.487,411.171);
+ pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT,746.59,618.49,411.09,1.42,0, 0, 0, 0,90000000);
+ }
+ }
+ }
break;
- case TYPE_ARGENT_CHALLENGE:
- if (Data == DONE)
+ case DATA_ARGENT_SOLDIER_DEFEATED:
+ uiArgentSoldierDeaths = uiData;
+ if (uiArgentSoldierDeaths == 9)
{
- if(m_uiEadricGUID == m_uiArgentChallenger)
- m_uiEadricLootGUID->SetRespawnTime(m_uiEadricLootGUID->GetRespawnDelay());
- if(m_uiPaletressGUID == m_uiArgentChallenger)
- m_uiPaletressLootGUID->SetRespawnTime(m_uiPaletressLootGUID->GetRespawnDelay());
+ if (Creature* pBoss = instance->GetCreature(uiArgentChampionGUID))
+ {
+ pBoss->GetMotionMaster()->MovePoint(0,746.88,618.74,411.06);
+ pBoss->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->SetReactState(REACT_AGGRESSIVE);
+ }
}
- m_auiEncounter[1] = Data;
break;
- case TYPE_BLACK_KNIGHT:
- m_auiEncounter[2] = Data;
+ case BOSS_ARGENT_CHALLENGE_E:
+ m_auiEncounter[1] = uiData;
+ if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
+ {
+ pAnnouncer->GetMotionMaster()->MovePoint(0,748.309,619.487,411.171);
+ pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT,746.59,618.49,411.09,1.42,0, 0, 0, 0,90000000);
+ }
+ break;
+ case BOSS_ARGENT_CHALLENGE_P:
+ m_auiEncounter[2] = uiData;
+ if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
+ {
+ pAnnouncer->GetMotionMaster()->MovePoint(0,748.309,619.487,411.171);
+ pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT,746.59,618.49,411.09,1.42,0, 0, 0, 0,90000000);
+ }
break;
}
- if (Data == DONE)
- {
- OUT_SAVE_INST_DATA;
-
- std::ostringstream saveStream;
- saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2];
-
- strInstData = saveStream.str();
-
+ if (uiData == DONE)
SaveToDB();
- OUT_SAVE_INST_DATA_COMPLETE;
- }
}
- uint64 GetData64(uint32 uiData)
+ uint32 GetData(uint32 uiData)
{
switch(uiData)
{
- case DATA_MEMORY:
- return m_uiMemoryGUID;
- case DATA_BLACK_KNIGHT:
- return m_uiBlackKnightGUID;
+ case BOSS_GRAND_CHAMPIONS: return m_auiEncounter[0];
+ case BOSS_ARGENT_CHALLENGE_E: return m_auiEncounter[1];
+ case BOSS_ARGENT_CHALLENGE_P: return m_auiEncounter[2];
+ case BOSS_BLACK_KNIGHT: return m_auiEncounter[3];
+
+ case DATA_MOVEMENT_DONE: return uiMovementDone;
+ case DATA_ARGENT_SOLDIER_DEFEATED: return uiArgentSoldierDeaths;
}
return 0;
}
- std::string GetSaveData()
+ uint64 GetData64(uint32 uiData)
{
- return strInstData;
+ switch(uiData)
+ {
+ case DATA_ANNOUNCER: return uiAnnouncerGUID;
+ case DATA_MAIN_GATE: return uiMainGateGUID;
+
+ case DATA_GRAND_CHAMPION_1: return uiGrandChampion1GUID;
+ case DATA_GRAND_CHAMPION_2: return uiGrandChampion2GUID;
+ case DATA_GRAND_CHAMPION_3: return uiGrandChampion3GUID;
+ }
+
+ return 0;
}
- uint32 GetData(uint32 uiType)
+ void SetData64(uint32 uiType, uint64 uiData)
{
switch(uiType)
{
- case DATA_BLACK_KNIGHT_MINION:
- return m_uiBlackKnightMinionGUID;
- case DATA_TOC5_ANNOUNCER:
- return m_uiAnnouncerGUID;
- case DATA_JAEREN:
- return m_uiJaerenGUID;
- case DATA_ARELAS:
- return m_uiArelasGUID;
- case TYPE_GRAND_CHAMPIONS:
- case TYPE_ARGENT_CHALLENGE:
- case TYPE_BLACK_KNIGHT:
- return m_auiEncounter[uiType];
+ case DATA_GRAND_CHAMPION_1:
+ uiGrandChampion1GUID = uiData;
+ break;
+ case DATA_GRAND_CHAMPION_2:
+ uiGrandChampion2GUID = uiData;
+ break;
+ case DATA_GRAND_CHAMPION_3:
+ uiGrandChampion3GUID = uiData;
+ break;
}
+ }
- return 0;
+ std::string GetSaveData()
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+
+ saveStream << "T C " << m_auiEncounter[0]
+ << " " << m_auiEncounter[1]
+ << " " << m_auiEncounter[2]
+ << " " << m_auiEncounter[3]
+ << " " << uiGrandChampionsDeaths
+ << " " << uiMovementDone;
+
+ str_data = saveStream.str();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return str_data;
}
- void Load(const char *chrIn)
+ void Load(const char* in)
{
- if (!chrIn)
+ if (!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
- OUT_LOAD_INST_DATA(chrIn);
+ OUT_LOAD_INST_DATA(in);
- std::istringstream loadStream(chrIn);
- loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2];
+ char dataHead1, dataHead2;
+ uint16 data0, data1, data2, data3, data4, data5;
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- m_auiEncounter[i] = NOT_STARTED;
+ std::istringstream loadStream(in);
+ loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4 >> data5;
+
+ if (dataHead1 == 'T' && dataHead2 == 'C')
+ {
+ m_auiEncounter[0] = data0;
+ m_auiEncounter[1] = data1;
+ m_auiEncounter[2] = data2;
+ m_auiEncounter[3] = data3;
+
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ if (m_auiEncounter[i] == IN_PROGRESS)
+ m_auiEncounter[i] = NOT_STARTED;
+
+ uiGrandChampionsDeaths = data4;
+ uiMovementDone = data5;
+ } else OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
}
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp
index afc11b99baf..43122c9d6b9 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp
@@ -1,4 +1,6 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+/*
+ * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -6,117 +8,492 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Trial Of the Champion
-SD%Complete: 80%
-SDComment: event script
+SD%Complete:
+SDComment:
SDCategory: trial_of_the_champion
EndScriptData */
/* ContentData
-npc_toc5_announcer
+npc_announcer_toc5
EndContentData */
#include "ScriptedPch.h"
#include "trial_of_the_champion.h"
+#include "Vehicle.h"
#define GOSSIP_START_EVENT1 "I'm ready to start challenge."
#define GOSSIP_START_EVENT2 "I'm ready for the next challenge."
+#define ORIENTATION 4.714
+
/*######
-## npc_toc5_announcer
+## npc_announcer_toc5
######*/
-struct TRINITY_DLL_DECL npc_toc5_announcerAI : public ScriptedAI
+const Position SpawnPosition = {746.261,657.401,411.681,4.65};
+
+struct TRINITY_DLL_DECL npc_announcer_toc5AI : public ScriptedAI
{
- npc_toc5_announcerAI(Creature* pCreature) : ScriptedAI(pCreature)
+ npc_announcer_toc5AI(Creature* pCreature) : ScriptedAI(pCreature)
{
- pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
- Reset();
+ pInstance = pCreature->GetInstanceData();
+
+ uiSummonTimes = 0;
+ uiPosition = 0;
+ uiLesserChampions = 0;
+
+ uiFirstBoss = 0;
+ uiSecondBoss = 0;
+ uiThirdBoss = 0;
+
+ uiArgentChampion = 0;
+
+ uiPhase = 0;
+ uiTimer = 0;
+
+ uiVehicle1GUID = 0;
+ uiVehicle2GUID = 0;
+ uiVehicle3GUID = 0;
+
+ Champion1List.clear();
+ Champion2List.clear();
+ Champion3List.clear();
+
+ m_creature->SetReactState(REACT_PASSIVE);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+
+ SetGrandChampionsForEncounter();
+ SetArgentChampion();
}
ScriptedInstance* pInstance;
-
- uint32 chmp1, chmp2, chmp3, argent;
- void Reset()
+ uint8 uiSummonTimes;
+ uint8 uiPosition;
+ uint8 uiLesserChampions;
+
+ uint32 uiArgentChampion;
+
+ uint32 uiFirstBoss;
+ uint32 uiSecondBoss;
+ uint32 uiThirdBoss;
+
+ uint32 uiPhase;
+ uint32 uiTimer;
+
+ uint64 uiVehicle1GUID;
+ uint64 uiVehicle2GUID;
+ uint64 uiVehicle3GUID;
+
+ uint64 uiGrandChampionBoss1;
+
+ std::list<uint64> Champion1List;
+ std::list<uint64> Champion2List;
+ std::list<uint64> Champion3List;
+
+ void NextStep(uint32 uiTimerStep,bool bNextStep = true,uint8 uiPhaseStep = 0)
{
+ uiTimer = uiTimerStep;
+ if (bNextStep)
+ ++uiPhase;
+ else
+ uiPhase = uiPhaseStep;
}
- void StartEvent(Player* pPlayer)
+ void SetData(uint32 uiType, uint32 uiData)
{
- if(!pInstance)
+ switch (uiType)
+ {
+ case DATA_START:
+ DoSummonGrandChampion(uiFirstBoss);
+ NextStep(10000,false,1);
+ break;
+ case DATA_IN_POSITION: //movement done.
+ m_creature->GetMotionMaster()->MovePoint(1,735.81,661.92,412.39);
+ if (GameObject* pGO = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_MAIN_GATE)))
+ pInstance->HandleGameObject(pGO->GetGUID(),false);
+ NextStep(10000,false,3);
+ break;
+ case DATA_LESSER_CHAMPIONS_DEFEATED:
+ {
+ ++uiLesserChampions;
+ std::list<uint64> TempList;
+ if (uiLesserChampions == 3 || uiLesserChampions == 6)
+ {
+ switch(uiLesserChampions)
+ {
+ case 3:
+ TempList = Champion2List;
+ break;
+ case 6:
+ TempList = Champion3List;
+ break;
+ }
+
+ for(std::list<uint64>::iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
+ if (Creature* pSummon = Unit::GetCreature(*m_creature, *itr))
+ AggroAllPlayers(pSummon);
+ }else if (uiLesserChampions == 9)
+ StartGrandChampionsAttack();
+
+ break;
+ }
+ }
+ }
+
+ void StartGrandChampionsAttack()
+ {
+ Creature* pGrandChampion1 = Unit::GetCreature(*m_creature, uiVehicle1GUID);
+ Creature* pGrandChampion2 = Unit::GetCreature(*m_creature, uiVehicle2GUID);
+ Creature* pGrandChampion3 = Unit::GetCreature(*m_creature, uiVehicle3GUID);
+
+ if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
+ {
+ AggroAllPlayers(pGrandChampion1);
+ AggroAllPlayers(pGrandChampion2);
+ AggroAllPlayers(pGrandChampion3);
+ }
+ }
+
+ void MovementInform(uint32 uiType, uint32 uiPointId)
+ {
+ if (uiType != POINT_MOTION_TYPE)
return;
- if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
+
+ if (uiPointId == 1)
{
- chmp1 = RAND(35572,35569,35571,35570,35617);
- chmp2 = RAND(35572,35569,35571,35570,35617);
- chmp3 = RAND(35572,35569,35571,35570,35617);
- if(chmp1 != chmp2 && chmp2 != chmp3 && chmp1 != chmp3)
+ m_creature->SetOrientation(ORIENTATION);
+ m_creature->SendMovementFlagUpdate();
+ }
+ }
+
+ void DoSummonGrandChampion(uint32 uiBoss)
+ {
+ ++uiSummonTimes;
+ uint32 VEHICLE_TO_SUMMON1 = 0;
+ uint32 VEHICLE_TO_SUMMON2 = 0;
+ switch(uiBoss)
+ {
+ case 0:
+ VEHICLE_TO_SUMMON1 = VEHICLE_MOKRA_SKILLCRUSHER_MOUNT;
+ VEHICLE_TO_SUMMON2 = VEHICLE_ORGRIMMAR_WOLF;
+ break;
+ case 1:
+ VEHICLE_TO_SUMMON1 = VEHICLE_ERESSEA_DAWNSINGER_MOUNT;
+ VEHICLE_TO_SUMMON2 = VEHICLE_SILVERMOON_HAWKSTRIDER;
+ break;
+ case 2:
+ VEHICLE_TO_SUMMON1 = VEHICLE_RUNOK_WILDMANE_MOUNT;
+ VEHICLE_TO_SUMMON2 = VEHICLE_THUNDER_BLUFF_KODO;
+ break;
+ case 3:
+ VEHICLE_TO_SUMMON1 = VEHICLE_ZUL_TORE_MOUNT;
+ VEHICLE_TO_SUMMON2 = VEHICLE_DARKSPEAR_RAPTOR;
+ break;
+ case 4:
+ VEHICLE_TO_SUMMON1 = VEHICLE_DEATHSTALKER_VESCERI_MOUNT;
+ VEHICLE_TO_SUMMON2 = VEHICLE_FORSAKE_WARHORSE;
+ break;
+ default:
+ return;
+ }
+
+ if (Creature* pBoss = m_creature->SummonCreature(VEHICLE_TO_SUMMON1,SpawnPosition))
+ {
+ switch(uiSummonTimes)
{
- m_creature->SummonCreature(chmp1, 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0);
- m_creature->SummonCreature(chmp2, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
- m_creature->SummonCreature(chmp3, 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
- pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
- } else return;
+ case 1:
+ {
+ uiVehicle1GUID = pBoss->GetGUID();
+ uint64 uiGrandChampionBoss1 = 0;
+ if (Creature* pBoss = Unit::GetCreature(*m_creature, uiVehicle1GUID))
+ if (Vehicle* pVehicle = pBoss->GetVehicleKit())
+ if (Unit* pUnit = pVehicle->GetPassenger(0))
+ uiGrandChampionBoss1 = pUnit->GetGUID();
+ if (pInstance)
+ {
+ pInstance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1,uiVehicle1GUID);
+ pInstance->SetData64(DATA_GRAND_CHAMPION_1,uiGrandChampionBoss1);
+ }
+ pBoss->AI()->SetData(1,0);
+ break;
+ }
+ case 2:
+ {
+ uiVehicle2GUID = pBoss->GetGUID();
+ uint64 uiGrandChampionBoss2 = 0;
+ if (Creature* pBoss = Unit::GetCreature(*m_creature, uiVehicle2GUID))
+ if (Vehicle* pVehicle = pBoss->GetVehicleKit())
+ if (Unit* pUnit = pVehicle->GetPassenger(0))
+ uiGrandChampionBoss2 = pUnit->GetGUID();
+ if (pInstance)
+ {
+ pInstance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2,uiVehicle2GUID);
+ pInstance->SetData64(DATA_GRAND_CHAMPION_2,uiGrandChampionBoss2);
+ }
+ pBoss->AI()->SetData(2,0);
+ break;
+ }
+ case 3:
+ {
+ uiVehicle3GUID = pBoss->GetGUID();
+ uint64 uiGrandChampionBoss3 = 0;
+ if (Creature* pBoss = Unit::GetCreature(*m_creature, uiVehicle3GUID))
+ if (Vehicle* pVehicle = pBoss->GetVehicleKit())
+ if (Unit* pUnit = pVehicle->GetPassenger(0))
+ uiGrandChampionBoss3 = pUnit->GetGUID();
+ if (pInstance)
+ {
+ pInstance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3,uiVehicle3GUID);
+ pInstance->SetData64(DATA_GRAND_CHAMPION_3,uiGrandChampionBoss3);
+ }
+ pBoss->AI()->SetData(3,0);
+ break;
+ }
+ default:
+ return;
+ }
+
+ for (uint8 i = 0; i < 3; ++i)
+ {
+ if (Creature* pAdd = m_creature->SummonCreature(VEHICLE_TO_SUMMON2,SpawnPosition,TEMPSUMMON_CORPSE_DESPAWN))
+ {
+ switch(uiSummonTimes)
+ {
+ case 1:
+ Champion1List.push_back(pAdd->GetGUID());
+ break;
+ case 2:
+ Champion2List.push_back(pAdd->GetGUID());
+ break;
+ case 3:
+ Champion3List.push_back(pAdd->GetGUID());
+ break;
+ }
+
+ switch(i)
+ {
+ case 0:
+ pAdd->GetMotionMaster()->MoveFollow(pBoss,2.0f,M_PI);
+ break;
+ case 1:
+ pAdd->GetMotionMaster()->MoveFollow(pBoss,2.0f,M_PI / 2);
+ break;
+ case 2:
+ pAdd->GetMotionMaster()->MoveFollow(pBoss,2.0f,M_PI / 2 + M_PI);
+ break;
+ }
+ }
+
+ }
}
+ }
- if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
+ void DoStartArgentChampionEncounter()
+ {
+ m_creature->GetMotionMaster()->MovePoint(1,735.81,661.92,412.39);
+
+ if (Creature* pBoss = m_creature->SummonCreature(uiArgentChampion,SpawnPosition))
+ {
+ for (uint8 i = 0; i < 3; ++i)
+ {
+ if (Creature* pTrash = m_creature->SummonCreature(NPC_ARGENT_LIGHWIELDER,SpawnPosition))
+ pTrash->AI()->SetData(i,0);
+ if (Creature* pTrash = m_creature->SummonCreature(NPC_ARGENT_MONK,SpawnPosition))
+ pTrash->AI()->SetData(i,0);
+ if (Creature* pTrash = m_creature->SummonCreature(NPC_PRIESTESS,SpawnPosition))
+ pTrash->AI()->SetData(i,0);
+ }
+ }
+ }
+
+ void SetGrandChampionsForEncounter()
+ {
+ uiFirstBoss = urand(0,4);
+
+ while(uiSecondBoss == uiFirstBoss || uiThirdBoss == uiFirstBoss || uiThirdBoss == uiSecondBoss)
{
- argent = RAND(35119,34928);
- m_creature->SummonCreature(argent, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
- pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS);
+ uiSecondBoss = urand(0,4);
+ uiThirdBoss = urand(0,4);
+ }
+ }
+
+ void SetArgentChampion()
+ {
+ uint8 uiTempBoss = urand(0,1);
+
+ switch(uiTempBoss)
+ {
+ case 0:
+ uiArgentChampion = NPC_EADRIC;
+ break;
+ case 1:
+ uiArgentChampion = NPC_PALETRESS;
+ break;
+ }
+ }
+
+ void StartEncounter()
+ {
+ if (!pInstance)
+ return;
+
+ m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+
+ if (pInstance->GetData(BOSS_BLACK_KNIGHT) == NOT_STARTED)
+ {
+ if (pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == NOT_STARTED && pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == NOT_STARTED)
+ {
+ if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED)
+ m_creature->AI()->SetData(DATA_START,0);
+
+ if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE)
+ DoStartArgentChampionEncounter();
+ }
+
+ if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
+ pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
+ pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
+ m_creature->SummonCreature(VEHICLE_BLACK_KNIGHT,769.834,651.915,447.035,0);
}
+ }
+
+ void AggroAllPlayers(Creature* pTemp)
+ {
+ Map::PlayerList const &PlList = m_creature->GetMap()->GetPlayers();
- if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
+ if(PlList.isEmpty())
+ return;
+
+ for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
{
- m_creature->SummonCreature(NPC_BLACK_KNIGHT, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
- pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS);
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ if(Player* pPlayer = i->getSource())
+ {
+ if(pPlayer->isGameMaster())
+ continue;
+
+ if(pPlayer->isAlive())
+ {
+ pTemp->SetHomePosition(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation());
+ pTemp->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ pTemp->SetReactState(REACT_AGGRESSIVE);
+ pTemp->SetInCombatWith(pPlayer);
+ pPlayer->SetInCombatWith(pTemp);
+ pTemp->AddThreat(pPlayer, 0.0f);
+ }
+ }
}
}
- void UpdateAI(const uint32 diff)
+
+ void UpdateAI(const uint32 uiDiff)
{
+ ScriptedAI::UpdateAI(uiDiff);
+
+ if (uiTimer <= uiDiff)
+ {
+ switch(uiPhase)
+ {
+ case 1:
+ DoSummonGrandChampion(uiSecondBoss);
+ NextStep(10000,true);
+ break;
+ case 2:
+ DoSummonGrandChampion(uiThirdBoss);
+ NextStep(0,false);
+ break;
+ case 3:
+ if (!Champion1List.empty())
+ {
+ for(std::list<uint64>::iterator itr = Champion1List.begin(); itr != Champion1List.end(); ++itr)
+ if (Creature* pSummon = Unit::GetCreature(*m_creature, *itr))
+ AggroAllPlayers(pSummon);
+ NextStep(0,false);
+ }
+ break;
+ }
+ } else uiTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
+ }
+
+ void JustSummoned(Creature* pSummon)
+ {
+ if (pInstance && pInstance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED)
+ {
+ pSummon->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ pSummon->SetReactState(REACT_PASSIVE);
+ }
+ }
+
+ void SummonedCreatureDespawn(Creature* pSummon)
+ {
+ switch(pSummon->GetEntry())
+ {
+ case VEHICLE_DARNASSIA_NIGHTSABER:
+ case VEHICLE_EXODAR_ELEKK:
+ case VEHICLE_STORMWIND_STEED:
+ case VEHICLE_GNOMEREGAN_MECHANOSTRIDER:
+ case VEHICLE_IRONFORGE_RAM:
+ case VEHICLE_FORSAKE_WARHORSE:
+ case VEHICLE_THUNDER_BLUFF_KODO:
+ case VEHICLE_ORGRIMMAR_WOLF:
+ case VEHICLE_SILVERMOON_HAWKSTRIDER:
+ case VEHICLE_DARKSPEAR_RAPTOR:
+ m_creature->AI()->SetData(DATA_LESSER_CHAMPIONS_DEFEATED,0);
+ break;
+ }
}
};
-CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature)
+CreatureAI* GetAI_npc_announcer_toc5(Creature* pCreature)
{
- return new npc_toc5_announcerAI(pCreature);
+ return new npc_announcer_toc5AI(pCreature);
}
-bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature)
+bool GossipHello_npc_announcer_toc5(Player* pPlayer, Creature* pCreature)
{
ScriptedInstance* pInstance = pCreature->GetInstanceData();
- if(!pInstance)
+ if (pInstance &&
+ pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
+ pInstance->GetData(BOSS_BLACK_KNIGHT) == DONE &&
+ pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
+ pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
return false;
- if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
+ if (pInstance &&
+ pInstance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED &&
+ pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == NOT_STARTED &&
+ pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == NOT_STARTED &&
+ pInstance->GetData(BOSS_BLACK_KNIGHT) == NOT_STARTED)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- else
+ else if (pInstance)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- pPlayer->SEND_GOSSIP_MENU(pCreature->GetEntry(), pCreature->GetGUID());
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+
return true;
}
-bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+bool GossipSelect_npc_announcer_toc5(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->CLOSE_GOSSIP_MENU();
- CAST_AI(npc_toc5_announcerAI, pCreature->AI())->StartEvent(pPlayer);
+ CAST_AI(npc_announcer_toc5AI, pCreature->AI())->StartEncounter();
}
return true;
@@ -127,9 +504,9 @@ void AddSC_trial_of_the_champion()
Script* NewScript;
NewScript = new Script;
- NewScript->Name = "npc_toc5_announcer";
- NewScript->GetAI = &GetAI_npc_toc5_announcer;
- NewScript->pGossipHello = &GossipHello_npc_toc5_announcer;
- NewScript->pGossipSelect = &GossipSelect_npc_toc5_announcer;
+ NewScript->Name = "npc_announcer_toc5";
+ NewScript->GetAI = &GetAI_npc_announcer_toc5;
+ NewScript->pGossipHello = &GossipHello_npc_announcer_toc5;
+ NewScript->pGossipSelect = &GossipSelect_npc_announcer_toc5;
NewScript->RegisterSelf();
}
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
index 5b76bd8e7d8..2ac62bd5b01 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
@@ -5,74 +5,111 @@
#ifndef DEF_TOC_H
#define DEF_TOC_H
-enum
+
+enum eData
{
- MAX_ENCOUNTER = 3,
-
- TYPE_GRAND_CHAMPIONS = 0,
- TYPE_ARGENT_CHALLENGE = 1,
- TYPE_BLACK_KNIGHT = 2,
-
- DATA_BLACK_KNIGHT = 6,
- DATA_BLACK_KNIGHT_MINION = 7,
- DATA_TOC5_ANNOUNCER = 8,
- DATA_JAEREN = 9,
- DATA_ARELAS = 10,
- DATA_CHAMPIONID_1 = 11,
- DATA_CHAMPIONID_2 = 12,
- DATA_CHAMPIONID_3 = 13,
- DATA_MEMORY = 14,
- DATA_ARGENT_CHALLENGER = 15,
+ BOSS_GRAND_CHAMPIONS,
+ BOSS_ARGENT_CHALLENGE_E,
+ BOSS_ARGENT_CHALLENGE_P,
+ BOSS_BLACK_KNIGHT,
+ DATA_MOVEMENT_DONE,
+ DATA_LESSER_CHAMPIONS_DEFEATED,
+ DATA_START,
+ DATA_IN_POSITION,
+ DATA_ARGENT_SOLDIER_DEFEATED
+};
- NPC_JACOB = 34705,
- NPC_AMBROSE = 34702,
- NPC_COLOSOS = 34701,
- NPC_JAELYNE = 34657,
- NPC_LANA = 34703,
+enum Data64
+{
+ DATA_ANNOUNCER,
+ DATA_MAIN_GATE,
+
+ DATA_GRAND_CHAMPION_VEHICLE_1,
+ DATA_GRAND_CHAMPION_VEHICLE_2,
+ DATA_GRAND_CHAMPION_VEHICLE_3,
+
+ DATA_GRAND_CHAMPION_1,
+ DATA_GRAND_CHAMPION_2,
+ DATA_GRAND_CHAMPION_3
+};
+
+enum eNpcs
+{
+ // Horde Champions
NPC_MOKRA = 35572,
NPC_ERESSEA = 35569,
NPC_RUNOK = 35571,
NPC_ZULTORE = 35570,
NPC_VISCERI = 35617,
+
+ // Alliance Champions
+ NPC_JACOB = 34705,
+ NPC_AMBROSE = 34702,
+ NPC_COLOSOS = 34701,
+ NPC_JAELYNE = 34657,
+ NPC_LANA = 34703,
+
NPC_EADRIC = 35119,
NPC_PALETRESS = 34928,
+
+ NPC_ARGENT_LIGHWIELDER = 35309,
+ NPC_ARGENT_MONK = 35305,
+ NPC_PRIESTESS = 35307,
+
NPC_BLACK_KNIGHT = 35451,
+
NPC_RISEN_JAEREN = 35545,
NPC_RISEN_ARELAS = 35564,
+
NPC_JAEREN = 35004,
- NPC_ARELAS = 35005,
- MEMORY_ALGALON = 35052,
- MEMORY_ARCHIMONDE = 35041,
- MEMORY_CHROMAGGUS = 35033,
- MEMORY_CYANIGOSA = 35046,
- MEMORY_DELRISSA = 35043,
- MEMORY_ECK = 35047,
- MEMORY_ENTROPIUS = 35044,
- MEMORY_GRUUL = 35039,
- MEMORY_HAKKAR = 35034,
- MEMORY_HEIGAN = 35049,
- MEMORY_HEROD = 35030,
- MEMORY_HOGGER = 34942,
- MEMORY_IGNIS = 35050,
- MEMORY_ILLIDAN = 35042,
- MEMORY_INGVAR = 35045,
- MEMORY_KALITHRESH = 35037,
- MEMORY_LUCIFRON = 35031,
- MEMORY_MALCHEZAAR = 35038,
- MEMORY_MUTANUS = 35029,
- MEMORY_ONYXIA = 35048,
- MEMORY_THUNDERAAN = 35032,
- MEMORY_VANCLEEF = 35028,
- MEMORY_VASHJ = 35040,
- MEMORY_VEKNILASH = 35036,
- MEMORY_VEZAX = 35051,
+ NPC_ARELAS = 35005
+};
+
+enum eGameObjects
+{
+ GO_MAIN_GATE = 195647,
GO_CHAMPIONS_LOOT = 195709,
- GO_CHAMPIONS_LOOT_H = 195710,
+ GO_CHAMPIONS_LOOT_H = 195710,
+
GO_EADRIC_LOOT = 195374,
GO_EADRIC_LOOT_H = 195375,
+
GO_PALETRESS_LOOT = 195323,
- GO_PALETRESS_LOOT_H = 195324
+ GO_PALETRESS_LOOT_H = 195324
+};
+
+enum eVehicles
+{
+ //Grand Champions Alliance Vehicles
+ VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT = 35637,
+ VEHICLE_AMBROSE_BOLTSPARK_MOUNT = 35633,
+ VEHICLE_COLOSOS_MOUNT = 35768,
+ VEHICLE_EVENSONG_MOUNT = 34658,
+ VEHICLE_LANA_STOUTHAMMER_MOUNT = 35636,
+ //Faction Champions (ALLIANCE)
+ VEHICLE_DARNASSIA_NIGHTSABER = 33298,
+ VEHICLE_EXODAR_ELEKK = 33416,
+ VEHICLE_STORMWIND_STEED = 33297,
+ VEHICLE_GNOMEREGAN_MECHANOSTRIDER = 33301,
+ VEHICLE_IRONFORGE_RAM = 33408,
+ //Grand Champions Horde Vehicles
+ VEHICLE_MOKRA_SKILLCRUSHER_MOUNT = 35638,
+ VEHICLE_ERESSEA_DAWNSINGER_MOUNT = 35635,
+ VEHICLE_RUNOK_WILDMANE_MOUNT = 35640,
+ VEHICLE_ZUL_TORE_MOUNT = 35641,
+ VEHICLE_DEATHSTALKER_VESCERI_MOUNT = 35634,
+ //Faction Champions (HORDE)
+ VEHICLE_FORSAKE_WARHORSE = 33414,
+ VEHICLE_THUNDER_BLUFF_KODO = 33300,
+ VEHICLE_ORGRIMMAR_WOLF = 33409,
+ VEHICLE_SILVERMOON_HAWKSTRIDER = 33418,
+ VEHICLE_DARKSPEAR_RAPTOR = 33299,
+
+ VEHICLE_ARGENT_WARHORSE = 35644,
+ VEHICLE_ARGENT_BATTLEWORG = 36558,
+
+ VEHICLE_BLACK_KNIGHT = 35491
};
#endif