mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Scripts: Updated Trial of Crusader instance model
- TODO: Bosses rewrite, instance cleanup, add missing gossips/texts, port all gossips from db.
Sniffs will be nice :/
(cherry picked from commit c436be6f61)
This commit is contained in:
@@ -166,7 +166,7 @@ class boss_anubarak_trial : public CreatureScript
|
||||
|
||||
struct boss_anubarak_trialAI : public BossAI
|
||||
{
|
||||
boss_anubarak_trialAI(Creature* creature) : BossAI(creature, BOSS_ANUBARAK)
|
||||
boss_anubarak_trialAI(Creature* creature) : BossAI(creature, DATA_ANUBARAK)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
@@ -221,7 +221,7 @@ class boss_anubarak_trial : public CreatureScript
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->SetBossState(BOSS_ANUBARAK, FAIL);
|
||||
instance->SetBossState(DATA_ANUBARAK, FAIL);
|
||||
//Summon Scarab Swarms neutral at random places
|
||||
for (int i = 0; i < 10; i++)
|
||||
if (Creature* scarab = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
|
||||
@@ -459,8 +459,8 @@ class npc_swarm_scarab : public CreatureScript
|
||||
DoCast(me, SPELL_ACID_MANDIBLE);
|
||||
me->SetInCombatWithZone();
|
||||
if (me->IsInCombat())
|
||||
if (Creature* Anubarak = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK)))
|
||||
Anubarak->AI()->JustSummoned(me);
|
||||
if (Creature* anubarak = _instance->GetCreature(DATA_ANUBARAK))
|
||||
anubarak->AI()->JustSummoned(me);
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
@@ -483,7 +483,7 @@ class npc_swarm_scarab : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_instance->GetBossState(BOSS_ANUBARAK) != IN_PROGRESS)
|
||||
if (_instance->GetBossState(DATA_ANUBARAK) != IN_PROGRESS)
|
||||
me->DisappearAndDie();
|
||||
|
||||
if (!UpdateVictim())
|
||||
@@ -539,8 +539,8 @@ class npc_nerubian_burrower : public CreatureScript
|
||||
DoCast(me, SPELL_AWAKENED);
|
||||
me->SetInCombatWithZone();
|
||||
if (me->IsInCombat())
|
||||
if (Creature* Anubarak = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK)))
|
||||
Anubarak->AI()->JustSummoned(me);
|
||||
if (Creature* anubarak = _instance->GetCreature(DATA_ANUBARAK))
|
||||
anubarak->AI()->JustSummoned(me);
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
@@ -559,7 +559,7 @@ class npc_nerubian_burrower : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_instance->GetBossState(BOSS_ANUBARAK) != IN_PROGRESS)
|
||||
if (_instance->GetBossState(DATA_ANUBARAK) != IN_PROGRESS)
|
||||
me->DisappearAndDie();
|
||||
|
||||
if (!UpdateVictim() && !me->HasAura(SPELL_SUBMERGE_EFFECT))
|
||||
|
||||
@@ -374,12 +374,11 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
public:
|
||||
boss_toc_champion_controller() : CreatureScript("boss_toc_champion_controller") { }
|
||||
|
||||
struct boss_toc_champion_controllerAI : public ScriptedAI
|
||||
struct boss_toc_champion_controllerAI : public BossAI
|
||||
{
|
||||
boss_toc_champion_controllerAI(Creature* creature) : ScriptedAI(creature), _summons(me)
|
||||
boss_toc_champion_controllerAI(Creature* creature) : BossAI(creature, DATA_FACTION_CRUSADERS)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -395,6 +394,8 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* /*summon*/) override { }
|
||||
|
||||
std::vector<uint32> SelectChampions(Team playerTeam)
|
||||
{
|
||||
std::vector<uint32> vHealersEntries;
|
||||
@@ -485,7 +486,7 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
uint8 pos = urand(0, vChampionJumpTarget.size()-1);
|
||||
if (Creature* champion = me->SummonCreature(vChampionEntries[i], vChampionJumpOrigin[urand(0, vChampionJumpOrigin.size()-1)], TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
_summons.Summon(champion);
|
||||
summons.Summon(champion);
|
||||
champion->SetReactState(REACT_PASSIVE);
|
||||
champion->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
champion->SetImmuneToPC(false);
|
||||
@@ -514,7 +515,7 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
SummonChampions((Team)uiData);
|
||||
break;
|
||||
case 1:
|
||||
for (SummonList::iterator i = _summons.begin(); i != _summons.end(); ++i)
|
||||
for (SummonList::iterator i = summons.begin(); i != summons.end(); ++i)
|
||||
{
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, *i))
|
||||
{
|
||||
@@ -529,10 +530,10 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
{
|
||||
case FAIL:
|
||||
_championsFailed++;
|
||||
if (_championsFailed + _championsKilled >= _summons.size())
|
||||
if (_championsFailed + _championsKilled >= summons.size())
|
||||
{
|
||||
_instance->SetBossState(BOSS_CRUSADERS, FAIL);
|
||||
_summons.DespawnAll();
|
||||
instance->SetBossState(DATA_FACTION_CRUSADERS, FAIL);
|
||||
summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
break;
|
||||
@@ -543,21 +544,23 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
_championsFailed = 0;
|
||||
_championsKilled = 0;
|
||||
_inProgress = true;
|
||||
_summons.DoZoneInCombat();
|
||||
_instance->SetBossState(BOSS_CRUSADERS, IN_PROGRESS);
|
||||
summons.DoZoneInCombat();
|
||||
instance->SetBossState(DATA_FACTION_CRUSADERS, IN_PROGRESS);
|
||||
}
|
||||
break;
|
||||
case DONE:
|
||||
{
|
||||
_championsKilled++;
|
||||
if (_championsKilled == 1)
|
||||
_instance->SetBossState(BOSS_CRUSADERS, SPECIAL);
|
||||
else if (_championsKilled >= _summons.size())
|
||||
instance->SetBossState(DATA_FACTION_CRUSADERS, SPECIAL);
|
||||
else if (_championsKilled >= summons.size())
|
||||
{
|
||||
_instance->SetBossState(BOSS_CRUSADERS, DONE);
|
||||
_summons.DespawnAll();
|
||||
instance->SetBossState(DATA_FACTION_CRUSADERS, DONE);
|
||||
summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -567,8 +570,6 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
}
|
||||
}
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
SummonList _summons;
|
||||
uint32 _championsNotStarted;
|
||||
uint32 _championsFailed;
|
||||
uint32 _championsKilled;
|
||||
@@ -583,9 +584,10 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
|
||||
struct boss_faction_championsAI : public BossAI
|
||||
{
|
||||
boss_faction_championsAI(Creature* creature, uint32 aitype) : BossAI(creature, BOSS_CRUSADERS)
|
||||
boss_faction_championsAI(Creature* creature, uint32 aitype) : BossAI(creature, DATA_FACTION_CHAMPIONS)
|
||||
{
|
||||
_aiType = aitype;
|
||||
SetBoundary(instance->GetBossBoundary(DATA_FACTION_CRUSADERS));
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -597,7 +599,7 @@ struct boss_faction_championsAI : public BossAI
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), instance->GetGuidData(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (Creature* pChampionController = instance->GetCreature(DATA_FACTION_CRUSADERS))
|
||||
pChampionController->AI()->SetData(2, FAIL);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -636,15 +638,17 @@ struct boss_faction_championsAI : public BossAI
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (_aiType != AI_PET)
|
||||
if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), instance->GetGuidData(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (Creature* pChampionController = instance->GetCreature(DATA_FACTION_CRUSADERS))
|
||||
pChampionController->AI()->SetData(2, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
DoCast(me, SPELL_ANTI_AOE, true);
|
||||
_EnterCombat();
|
||||
if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), instance->GetGuidData(NPC_CHAMPIONS_CONTROLLER)))
|
||||
me->SetCombatPulseDelay(5);
|
||||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
if (Creature* pChampionController = instance->GetCreature(DATA_FACTION_CRUSADERS))
|
||||
pChampionController->AI()->SetData(2, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -661,11 +665,11 @@ struct boss_faction_championsAI : public BossAI
|
||||
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
{
|
||||
if (Creature* varian = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_VARIAN)))
|
||||
if (Creature* varian = instance->GetCreature(DATA_VARIAN))
|
||||
varian->AI()->Talk(SAY_KILL_PLAYER);
|
||||
}
|
||||
else
|
||||
if (Creature* garrosh = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GARROSH)))
|
||||
if (Creature* garrosh = instance->GetCreature(DATA_GARROSH))
|
||||
garrosh->AI()->Talk(SAY_KILL_PLAYER);
|
||||
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class boss_jaraxxus : public CreatureScript
|
||||
|
||||
struct boss_jaraxxusAI : public BossAI
|
||||
{
|
||||
boss_jaraxxusAI(Creature* creature) : BossAI(creature, BOSS_JARAXXUS) { }
|
||||
boss_jaraxxusAI(Creature* creature) : BossAI(creature, DATA_JARAXXUS) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -116,7 +116,7 @@ class boss_jaraxxus : public CreatureScript
|
||||
void JustReachedHome() override
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(BOSS_JARAXXUS, FAIL);
|
||||
instance->SetBossState(DATA_JARAXXUS, FAIL);
|
||||
DoCast(me, SPELL_JARAXXUS_CHAINS);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToPC(true);
|
||||
@@ -235,7 +235,7 @@ class npc_legion_flame : public CreatureScript
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
UpdateVictim();
|
||||
if (_instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
|
||||
if (_instance->GetBossState(DATA_JARAXXUS) != IN_PROGRESS)
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
private:
|
||||
@@ -327,7 +327,7 @@ class npc_fel_infernal : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
|
||||
if (_instance->GetBossState(DATA_JARAXXUS) != IN_PROGRESS)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
@@ -435,7 +435,7 @@ class npc_mistress_of_pain : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
|
||||
if (_instance->GetBossState(DATA_JARAXXUS) != IN_PROGRESS)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
|
||||
@@ -178,7 +178,10 @@ class boss_gormok : public CreatureScript
|
||||
|
||||
struct boss_gormokAI : public BossAI
|
||||
{
|
||||
boss_gormokAI(Creature* creature) : BossAI(creature, BOSS_BEASTS) { }
|
||||
boss_gormokAI(Creature* creature) : BossAI(creature, DATA_GORMOK_THE_IMPALER)
|
||||
{
|
||||
SetBoundary(instance->GetBossBoundary(DATA_NORTHREND_BEASTS));
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -191,7 +194,7 @@ class boss_gormok : public CreatureScript
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
@@ -203,7 +206,7 @@ class boss_gormok : public CreatureScript
|
||||
switch (pointId)
|
||||
{
|
||||
case 0:
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
|
||||
me->SetImmuneToPC(false);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -221,7 +224,7 @@ class boss_gormok : public CreatureScript
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
@@ -229,8 +232,11 @@ class boss_gormok : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
_EnterCombat();
|
||||
me->SetCombatPulseDelay(5);
|
||||
me->setActive(true);
|
||||
//DoZoneInCombat();
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
|
||||
instance->SetBossState(DATA_NORTHREND_BEASTS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage) override
|
||||
@@ -386,7 +392,7 @@ class npc_snobold_vassal : public CreatureScript
|
||||
|
||||
void MountOnBoss()
|
||||
{
|
||||
Unit* gormok = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_GORMOK));
|
||||
Unit* gormok = _instance->GetCreature(DATA_GORMOK_THE_IMPALER);
|
||||
if (gormok && gormok->IsAlive())
|
||||
{
|
||||
me->AttackStop();
|
||||
@@ -510,7 +516,7 @@ class npc_firebomb : public CreatureScript
|
||||
|
||||
struct boss_jormungarAI : public BossAI
|
||||
{
|
||||
boss_jormungarAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
|
||||
boss_jormungarAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId)
|
||||
{
|
||||
OtherWormEntry = 0;
|
||||
ModelStationary = 0;
|
||||
@@ -524,6 +530,7 @@ struct boss_jormungarAI : public BossAI
|
||||
Phase = PHASE_MOBILE;
|
||||
Enraged = false;
|
||||
WasMobile = false;
|
||||
SetBoundary(instance->GetBossBoundary(DATA_NORTHREND_BEASTS));
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -538,9 +545,14 @@ struct boss_jormungarAI : public BossAI
|
||||
events.ScheduleEvent(EVENT_SLIME_POOL, 15*IN_MILLISECONDS, 0, PHASE_MOBILE);
|
||||
}
|
||||
|
||||
uint32 GetOtherWormData(uint32 wormEntry)
|
||||
{
|
||||
return wormEntry == NPC_ACIDMAW ? DATA_ACIDMAW : DATA_DREADSCALE;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* otherWorm = ObjectAccessor::GetCreature(*me, instance->GetGuidData(OtherWormEntry)))
|
||||
if (Creature* otherWorm = instance->GetCreature(GetOtherWormData(OtherWormEntry)))
|
||||
{
|
||||
if (!otherWorm->IsAlive())
|
||||
{
|
||||
@@ -713,7 +725,7 @@ class boss_acidmaw : public CreatureScript
|
||||
|
||||
struct boss_acidmawAI : public boss_jormungarAI
|
||||
{
|
||||
boss_acidmawAI(Creature* creature) : boss_jormungarAI(creature) { }
|
||||
boss_acidmawAI(Creature* creature) : boss_jormungarAI(creature, DATA_ACIDMAW) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -744,7 +756,7 @@ class boss_dreadscale : public CreatureScript
|
||||
|
||||
struct boss_dreadscaleAI : public boss_jormungarAI
|
||||
{
|
||||
boss_dreadscaleAI(Creature* creature) : boss_jormungarAI(creature) { }
|
||||
boss_dreadscaleAI(Creature* creature) : boss_jormungarAI(creature, DATA_DREADSCALE) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -771,7 +783,7 @@ class boss_dreadscale : public CreatureScript
|
||||
switch (pointId)
|
||||
{
|
||||
case 0:
|
||||
instance->DoCloseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoCloseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
|
||||
me->SetImmuneToPC(false);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -784,13 +796,13 @@ class boss_dreadscale : public CreatureScript
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
boss_jormungarAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
|
||||
boss_jormungarAI::JustReachedHome();
|
||||
}
|
||||
@@ -886,9 +898,10 @@ class boss_icehowl : public CreatureScript
|
||||
|
||||
struct boss_icehowlAI : public BossAI
|
||||
{
|
||||
boss_icehowlAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
|
||||
boss_icehowlAI(Creature* creature) : BossAI(creature, DATA_ICEHOWL)
|
||||
{
|
||||
Initialize();
|
||||
SetBoundary(instance->GetBossBoundary(DATA_NORTHREND_BEASTS));
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -945,7 +958,7 @@ class boss_icehowl : public CreatureScript
|
||||
_movementFinish = true;
|
||||
break;
|
||||
case 2:
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
|
||||
me->SetImmuneToPC(false);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -958,13 +971,13 @@ class boss_icehowl : public CreatureScript
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
@@ -148,9 +148,14 @@ class OrbsDespawner : public BasicEvent
|
||||
Creature* _creature;
|
||||
};
|
||||
|
||||
uint32 const GetSisterData(uint32 sisterEntry)
|
||||
{
|
||||
return sisterEntry == NPC_FJOLA_LIGHTBANE ? DATA_FJOLA_LIGHTBANE : DATA_EYDIS_DARKBANE;
|
||||
}
|
||||
|
||||
struct boss_twin_baseAI : public BossAI
|
||||
{
|
||||
boss_twin_baseAI(Creature* creature) : BossAI(creature, BOSS_VALKIRIES)
|
||||
boss_twin_baseAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId)
|
||||
{
|
||||
AuraState = AURA_STATE_NONE;
|
||||
Weapon = 0;
|
||||
@@ -163,6 +168,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
TwinPactSpellId = 0;
|
||||
SpikeSpellId = 0;
|
||||
TouchSpellId = 0;
|
||||
SetBoundary(instance->GetBossBoundary(DATA_TWIN_VALKIRIES));
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -179,7 +185,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->SetBossState(BOSS_VALKIRIES, FAIL);
|
||||
instance->SetBossState(DATA_TWIN_VALKIRIES, FAIL);
|
||||
|
||||
summons.DespawnAll();
|
||||
me->DespawnOrUnsummon();
|
||||
@@ -238,12 +244,14 @@ struct boss_twin_baseAI : public BossAI
|
||||
{
|
||||
me->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
pSister->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
_JustDied();
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
instance->SetBossState(DATA_TWIN_VALKIRIES, DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
instance->SetBossState(BOSS_VALKIRIES, SPECIAL);
|
||||
instance->SetBossState(DATA_TWIN_VALKIRIES, SPECIAL);
|
||||
}
|
||||
}
|
||||
summons.DespawnAll();
|
||||
@@ -252,7 +260,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
// Called when sister pointer needed
|
||||
Creature* GetSister()
|
||||
{
|
||||
return ObjectAccessor::GetCreature((*me), instance->GetGuidData(SisterNpcId));
|
||||
return instance->GetCreature(GetSisterData(SisterNpcId));
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -263,10 +271,12 @@ struct boss_twin_baseAI : public BossAI
|
||||
me->AddAura(MyEmphatySpellId, pSister);
|
||||
pSister->SetInCombatWithZone();
|
||||
}
|
||||
instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_TWIN_VALKIRIES, IN_PROGRESS);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
DoCast(me, SurgeSpellId);
|
||||
me->SetCombatPulseDelay(5);
|
||||
me->setActive(true);
|
||||
|
||||
events.ScheduleEvent(EVENT_TWIN_SPIKE, 20 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 10 * MINUTE*IN_MILLISECONDS);
|
||||
@@ -344,7 +354,7 @@ class boss_fjola : public CreatureScript
|
||||
|
||||
struct boss_fjolaAI : public boss_twin_baseAI
|
||||
{
|
||||
boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature)
|
||||
boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature, DATA_FJOLA_LIGHTBANE)
|
||||
{
|
||||
GenerateStageSequence();
|
||||
}
|
||||
@@ -354,7 +364,7 @@ class boss_fjola : public CreatureScript
|
||||
SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
|
||||
Weapon = EQUIP_MAIN_1;
|
||||
AuraState = AURA_STATE_UNKNOWN22;
|
||||
SisterNpcId = NPC_DARKBANE;
|
||||
SisterNpcId = NPC_EYDIS_DARKBANE;
|
||||
MyEmphatySpellId = SPELL_TWIN_EMPATHY_DARK;
|
||||
OtherEssenceSpellId = SPELL_DARK_ESSENCE;
|
||||
SurgeSpellId = SPELL_LIGHT_SURGE;
|
||||
@@ -411,13 +421,13 @@ class boss_fjola : public CreatureScript
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
boss_twin_baseAI::EnterEvadeMode(why);
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_MAIN_GATE));
|
||||
|
||||
boss_twin_baseAI::JustReachedHome();
|
||||
}
|
||||
@@ -455,14 +465,14 @@ class boss_eydis : public CreatureScript
|
||||
|
||||
struct boss_eydisAI : public boss_twin_baseAI
|
||||
{
|
||||
boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) { }
|
||||
boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature, DATA_EYDIS_DARKBANE) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
|
||||
Weapon = EQUIP_MAIN_2;
|
||||
AuraState = AURA_STATE_UNKNOWN19;
|
||||
SisterNpcId = NPC_LIGHTBANE;
|
||||
SisterNpcId = NPC_FJOLA_LIGHTBANE;
|
||||
MyEmphatySpellId = SPELL_TWIN_EMPATHY_LIGHT;
|
||||
OtherEssenceSpellId = SPELL_LIGHT_ESSENCE;
|
||||
SurgeSpellId = SPELL_DARK_SURGE;
|
||||
@@ -824,8 +834,8 @@ class spell_power_of_the_twins : public SpellScriptLoader
|
||||
{
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
{
|
||||
if (Creature* Valk = ObjectAccessor::GetCreature(*GetCaster(), instance->GetGuidData(GetCaster()->GetEntry())))
|
||||
ENSURE_AI(boss_twin_baseAI, Valk->AI())->EnableDualWield(true);
|
||||
if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
|
||||
ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -833,8 +843,8 @@ class spell_power_of_the_twins : public SpellScriptLoader
|
||||
{
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
{
|
||||
if (Creature* Valk = ObjectAccessor::GetCreature(*GetCaster(), instance->GetGuidData(GetCaster()->GetEntry())))
|
||||
ENSURE_AI(boss_twin_baseAI, Valk->AI())->EnableDualWield(false);
|
||||
if (Creature* valk = instance->GetCreature(GetSisterData(GetCaster()->GetEntry())))
|
||||
ENSURE_AI(boss_twin_baseAI, valk->AI())->EnableDualWield(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,11 +28,53 @@
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ BOSS_BEASTS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ BOSS_JARAXXUS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ BOSS_CRUSADERS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ BOSS_VALKIRIES, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ BOSS_ANUBARAK, new EllipseBoundary(Position(746.0f, 135.0f), 100.0, 75.0) }
|
||||
{ DATA_NORTHREND_BEASTS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_JARAXXUS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_FACTION_CRUSADERS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_TWIN_VALKIRIES, new CircleBoundary(Position(563.26f, 139.6f), 75.0) },
|
||||
{ DATA_ANUBARAK, new EllipseBoundary(Position(746.0f, 135.0f), 100.0, 75.0) }
|
||||
};
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_GORMOK, DATA_GORMOK_THE_IMPALER },
|
||||
{ NPC_ACIDMAW, DATA_ACIDMAW },
|
||||
{ NPC_DREADSCALE, DATA_DREADSCALE },
|
||||
{ NPC_ICEHOWL, DATA_ICEHOWL },
|
||||
{ NPC_JARAXXUS, DATA_JARAXXUS },
|
||||
{ NPC_CHAMPIONS_CONTROLLER, DATA_FACTION_CRUSADERS },
|
||||
{ NPC_FJOLA_LIGHTBANE, DATA_FJOLA_LIGHTBANE },
|
||||
{ NPC_EYDIS_DARKBANE, DATA_EYDIS_DARKBANE },
|
||||
{ NPC_LICH_KING, DATA_LICH_KING },
|
||||
{ NPC_ANUBARAK, DATA_ANUBARAK },
|
||||
{ NPC_BARRET_RAMSEY, DATA_BARRET_RAMSEY },
|
||||
{ NPC_TIRION_FORDRING, DATA_FORDRING },
|
||||
{ NPC_TIRION_FORDRING_ANUBARAK, DATA_FORDRING_ANUBARAK },
|
||||
{ NPC_VARIAN, DATA_VARIAN },
|
||||
{ NPC_GARROSH, DATA_GARROSH },
|
||||
{ NPC_FIZZLEBANG, DATA_FIZZLEBANG },
|
||||
{ 0, 0 } // END
|
||||
};
|
||||
|
||||
ObjectData const gameObjectData[] =
|
||||
{
|
||||
{ GO_CRUSADERS_CACHE_10, DATA_CRUSADERS_CHEST },
|
||||
{ GO_CRUSADERS_CACHE_25, DATA_CRUSADERS_CHEST },
|
||||
{ GO_CRUSADERS_CACHE_10_H, DATA_CRUSADERS_CHEST },
|
||||
{ GO_CRUSADERS_CACHE_25_H, DATA_CRUSADERS_CHEST },
|
||||
{ GO_ARGENT_COLISEUM_FLOOR, DATA_COLISEUM_FLOOR },
|
||||
{ GO_MAIN_GATE_DOOR, DATA_MAIN_GATE },
|
||||
{ GO_EAST_PORTCULLIS, DATA_EAST_PORTCULLIS },
|
||||
{ GO_WEB_DOOR, DATA_WEB_DOOR },
|
||||
{ GO_TRIBUTE_CHEST_10H_25, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_10H_45, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_10H_50, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_10H_99, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_25H_25, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_25H_45, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_25H_50, DATA_TRIBUTE_CHEST },
|
||||
{ GO_TRIBUTE_CHEST_25H_99, DATA_TRIBUTE_CHEST },
|
||||
{ 0, 0 } // END
|
||||
};
|
||||
|
||||
class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
@@ -45,8 +87,9 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
instance_trial_of_the_crusader_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadBossBoundaries(boundaries);
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
TrialCounter = 50;
|
||||
EventStage = 0;
|
||||
NorthrendBeasts = NOT_STARTED;
|
||||
@@ -61,12 +104,12 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
if (GetBossState(i) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
// Special state is set at Faction Champions after first champ dead, encounter is still in combat
|
||||
if (GetBossState(BOSS_CRUSADERS) == SPECIAL)
|
||||
if (GetBossState(DATA_FACTION_CRUSADERS) == SPECIAL)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -83,8 +126,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);
|
||||
|
||||
// make sure Anub'arak isnt missing
|
||||
if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
|
||||
if (!instance->GetCreature(AnubarakGUID))
|
||||
if (GetBossState(DATA_LICH_KING) == DONE && TrialCounter && GetBossState(DATA_ANUBARAK) != DONE)
|
||||
if (!GetCreature(DATA_ANUBARAK))
|
||||
player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
}
|
||||
|
||||
@@ -108,100 +151,18 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_BARRENT:
|
||||
BarrentGUID = creature->GetGUID();
|
||||
if (!TrialCounter)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
case NPC_TIRION:
|
||||
TirionGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_TIRION_FORDRING:
|
||||
TirionFordringGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_FIZZLEBANG:
|
||||
FizzlebangGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_GARROSH:
|
||||
GarroshGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_VARIAN:
|
||||
VarianGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
case NPC_GORMOK:
|
||||
GormokGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ACIDMAW:
|
||||
AcidmawGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_DREADSCALE:
|
||||
DreadscaleGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ICEHOWL:
|
||||
IcehowlGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_JARAXXUS:
|
||||
JaraxxusGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_CHAMPIONS_CONTROLLER:
|
||||
ChampionsControllerGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_DARKBANE:
|
||||
DarkbaneGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_LIGHTBANE:
|
||||
LightbaneGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ANUBARAK:
|
||||
AnubarakGUID = creature->GetGUID();
|
||||
creature->SetRespawnDelay(7 * DAY);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
if (creature->GetEntry() == NPC_BARRET_RAMSEY)
|
||||
if (!TrialCounter)
|
||||
creature->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_CRUSADERS_CACHE_10:
|
||||
case GO_CRUSADERS_CACHE_25:
|
||||
case GO_CRUSADERS_CACHE_10_H:
|
||||
case GO_CRUSADERS_CACHE_25_H:
|
||||
CrusadersCacheGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_ARGENT_COLISEUM_FLOOR:
|
||||
FloorGUID = go->GetGUID();
|
||||
if (GetBossState(BOSS_LICH_KING) == DONE)
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
|
||||
break;
|
||||
case GO_MAIN_GATE_DOOR:
|
||||
MainGateDoorGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_EAST_PORTCULLIS:
|
||||
EastPortcullisGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_WEB_DOOR:
|
||||
WebDoorGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case GO_TRIBUTE_CHEST_10H_25:
|
||||
case GO_TRIBUTE_CHEST_10H_45:
|
||||
case GO_TRIBUTE_CHEST_10H_50:
|
||||
case GO_TRIBUTE_CHEST_10H_99:
|
||||
case GO_TRIBUTE_CHEST_25H_25:
|
||||
case GO_TRIBUTE_CHEST_25H_45:
|
||||
case GO_TRIBUTE_CHEST_25H_50:
|
||||
case GO_TRIBUTE_CHEST_25H_99:
|
||||
TributeChestGUID = go->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
InstanceScript::OnGameObjectCreate(go);
|
||||
if (go->GetEntry() == GO_ARGENT_COLISEUM_FLOOR)
|
||||
if (GetBossState(DATA_LICH_KING) == DONE)
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit) override
|
||||
@@ -218,20 +179,20 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case BOSS_BEASTS:
|
||||
case DATA_NORTHREND_BEASTS:
|
||||
break;
|
||||
case BOSS_JARAXXUS:
|
||||
case DATA_JARAXXUS:
|
||||
// Cleanup Icehowl
|
||||
if (Creature* icehowl = instance->GetCreature(IcehowlGUID))
|
||||
if (Creature* icehowl = GetCreature(DATA_ICEHOWL))
|
||||
icehowl->DespawnOrUnsummon();
|
||||
if (state == DONE)
|
||||
EventStage = 2000;
|
||||
break;
|
||||
case BOSS_CRUSADERS:
|
||||
case DATA_FACTION_CRUSADERS:
|
||||
// Cleanup Jaraxxus
|
||||
if (Creature* jaraxxus = instance->GetCreature(JaraxxusGUID))
|
||||
if (Creature* jaraxxus = GetCreature(DATA_JARAXXUS))
|
||||
jaraxxus->DespawnOrUnsummon();
|
||||
if (Creature* fizzlebang = instance->GetCreature(FizzlebangGUID))
|
||||
if (Creature* fizzlebang = GetCreature(DATA_FIZZLEBANG))
|
||||
fizzlebang->DespawnOrUnsummon();
|
||||
switch (state)
|
||||
{
|
||||
@@ -246,8 +207,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
DoUpdateCriteria(CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_DEFEAT_FACTION_CHAMPIONS);
|
||||
if (ResilienceWillFixItTimer > 0)
|
||||
DoUpdateCriteria(CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_CHAMPIONS_KILLED_IN_MINUTE);
|
||||
DoRespawnGameObject(CrusadersCacheGUID, 7*DAY);
|
||||
if (GameObject* cache = instance->GetGameObject(CrusadersCacheGUID))
|
||||
DoRespawnGameObject(GetGuidData(DATA_CRUSADERS_CHEST), 7 * DAY);
|
||||
if (GameObject* cache = GetGameObject(DATA_CRUSADERS_CHEST))
|
||||
cache->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
EventStage = 3100;
|
||||
break;
|
||||
@@ -255,27 +216,27 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BOSS_VALKIRIES:
|
||||
case DATA_TWIN_VALKIRIES:
|
||||
// Cleanup chest
|
||||
if (GameObject* cache = instance->GetGameObject(CrusadersCacheGUID))
|
||||
if (GameObject* cache = GetGameObject(DATA_CRUSADERS_CHEST))
|
||||
cache->Delete();
|
||||
switch (state)
|
||||
{
|
||||
case FAIL:
|
||||
if (GetBossState(BOSS_VALKIRIES) == NOT_STARTED)
|
||||
if (GetBossState(DATA_TWIN_VALKIRIES) == NOT_STARTED)
|
||||
state = NOT_STARTED;
|
||||
break;
|
||||
case SPECIAL:
|
||||
if (GetBossState(BOSS_VALKIRIES) == SPECIAL)
|
||||
if (GetBossState(DATA_TWIN_VALKIRIES) == SPECIAL)
|
||||
state = DONE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BOSS_LICH_KING:
|
||||
case DATA_LICH_KING:
|
||||
break;
|
||||
case BOSS_ANUBARAK:
|
||||
case DATA_ANUBARAK:
|
||||
switch (state)
|
||||
{
|
||||
case DONE:
|
||||
@@ -318,7 +279,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
}
|
||||
|
||||
if (tributeChest)
|
||||
if (Creature* tirion = instance->GetCreature(TirionGUID))
|
||||
if (Creature* tirion = GetCreature(DATA_FORDRING))
|
||||
if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, QuaternionData::fromEulerAnglesZYX(3.27f, 0.0f, 0.0f), WEEK))
|
||||
chest->SetRespawnTime(chest->GetRespawnDelay());
|
||||
break;
|
||||
@@ -333,16 +294,16 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
if (IsEncounterInProgress())
|
||||
{
|
||||
CloseDoor(GetGuidData(GO_EAST_PORTCULLIS));
|
||||
CloseDoor(GetGuidData(GO_WEB_DOOR));
|
||||
CloseDoor(GetGuidData(DATA_EAST_PORTCULLIS));
|
||||
CloseDoor(GetGuidData(DATA_WEB_DOOR));
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenDoor(GetGuidData(GO_EAST_PORTCULLIS));
|
||||
OpenDoor(GetGuidData(GO_WEB_DOOR));
|
||||
OpenDoor(GetGuidData(DATA_EAST_PORTCULLIS));
|
||||
OpenDoor(GetGuidData(DATA_WEB_DOOR));
|
||||
}
|
||||
|
||||
if (type < MAX_ENCOUNTERS)
|
||||
if (type < EncounterCount)
|
||||
{
|
||||
TC_LOG_DEBUG("scripts", "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
|
||||
if (state == FAIL)
|
||||
@@ -359,21 +320,21 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
// if theres no more attemps allowed
|
||||
if (!TrialCounter)
|
||||
{
|
||||
if (Unit* announcer = instance->GetCreature(GetGuidData(NPC_BARRENT)))
|
||||
if (Unit* announcer = GetCreature(DATA_BARRET_RAMSEY))
|
||||
announcer->ToCreature()->DespawnOrUnsummon();
|
||||
|
||||
if (Creature* anubArak = instance->GetCreature(GetGuidData(NPC_ANUBARAK)))
|
||||
anubArak->DespawnOrUnsummon();
|
||||
if (Creature* anubarak = GetCreature(DATA_ANUBARAK))
|
||||
anubarak->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
NeedSave = true;
|
||||
EventStage = (type == BOSS_BEASTS ? 666 : 0);
|
||||
EventStage = (type == DATA_NORTHREND_BEASTS ? 666 : 0);
|
||||
state = NOT_STARTED;
|
||||
}
|
||||
|
||||
if (state == DONE || NeedSave)
|
||||
{
|
||||
if (Unit* announcer = instance->GetCreature(GetGuidData(NPC_BARRENT)))
|
||||
if (Unit* announcer = GetCreature(DATA_BARRET_RAMSEY))
|
||||
announcer->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
Save();
|
||||
}
|
||||
@@ -420,10 +381,10 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case ICEHOWL_DONE:
|
||||
EventStage = 400;
|
||||
SetData(TYPE_NORTHREND_BEASTS, DONE);
|
||||
SetBossState(BOSS_BEASTS, DONE);
|
||||
SetBossState(DATA_NORTHREND_BEASTS, DONE);
|
||||
break;
|
||||
case FAIL:
|
||||
SetBossState(BOSS_BEASTS, FAIL);
|
||||
SetBossState(DATA_NORTHREND_BEASTS, FAIL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -447,57 +408,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case NPC_BARRENT:
|
||||
return BarrentGUID;
|
||||
case NPC_TIRION:
|
||||
return TirionGUID;
|
||||
case NPC_TIRION_FORDRING:
|
||||
return TirionFordringGUID;
|
||||
case NPC_FIZZLEBANG:
|
||||
return FizzlebangGUID;
|
||||
case NPC_GARROSH:
|
||||
return GarroshGUID;
|
||||
case NPC_VARIAN:
|
||||
return VarianGUID;
|
||||
|
||||
case NPC_GORMOK:
|
||||
return GormokGUID;
|
||||
case NPC_ACIDMAW:
|
||||
return AcidmawGUID;
|
||||
case NPC_DREADSCALE:
|
||||
return DreadscaleGUID;
|
||||
case NPC_ICEHOWL:
|
||||
return IcehowlGUID;
|
||||
case NPC_JARAXXUS:
|
||||
return JaraxxusGUID;
|
||||
case NPC_CHAMPIONS_CONTROLLER:
|
||||
return ChampionsControllerGUID;
|
||||
case NPC_DARKBANE:
|
||||
return DarkbaneGUID;
|
||||
case NPC_LIGHTBANE:
|
||||
return LightbaneGUID;
|
||||
case NPC_ANUBARAK:
|
||||
return AnubarakGUID;
|
||||
|
||||
case GO_ARGENT_COLISEUM_FLOOR:
|
||||
return FloorGUID;
|
||||
case GO_MAIN_GATE_DOOR:
|
||||
return MainGateDoorGUID;
|
||||
case GO_EAST_PORTCULLIS:
|
||||
return EastPortcullisGUID;
|
||||
case GO_WEB_DOOR:
|
||||
return WebDoorGUID;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
@@ -552,7 +462,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case 6000:
|
||||
case 6005:
|
||||
case 6010:
|
||||
return NPC_TIRION;
|
||||
return NPC_TIRION_FORDRING;
|
||||
break;
|
||||
case 5010:
|
||||
case 5030:
|
||||
@@ -594,7 +504,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
return NPC_FIZZLEBANG;
|
||||
break;
|
||||
default:
|
||||
return NPC_TIRION;
|
||||
return NPC_TIRION_FORDRING;
|
||||
break;
|
||||
};
|
||||
default:
|
||||
@@ -614,7 +524,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
NotOneButTwoJormungarsTimer -= diff;
|
||||
}
|
||||
|
||||
if (GetBossState(BOSS_CRUSADERS) == SPECIAL && ResilienceWillFixItTimer)
|
||||
if (GetBossState(DATA_FACTION_CRUSADERS) == SPECIAL && ResilienceWillFixItTimer)
|
||||
{
|
||||
if (ResilienceWillFixItTimer <= diff)
|
||||
ResilienceWillFixItTimer = 0;
|
||||
@@ -629,7 +539,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
std::ostringstream saveStream;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
saveStream << GetBossState(i) << ' ';
|
||||
|
||||
saveStream << TrialCounter;
|
||||
@@ -657,7 +567,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
std::istringstream loadStream(strIn);
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
@@ -717,30 +627,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
bool NeedSave;
|
||||
std::string SaveDataBuffer;
|
||||
|
||||
ObjectGuid BarrentGUID;
|
||||
ObjectGuid TirionGUID;
|
||||
ObjectGuid TirionFordringGUID;
|
||||
ObjectGuid FizzlebangGUID;
|
||||
ObjectGuid GarroshGUID;
|
||||
ObjectGuid VarianGUID;
|
||||
|
||||
ObjectGuid GormokGUID;
|
||||
ObjectGuid AcidmawGUID;
|
||||
ObjectGuid DreadscaleGUID;
|
||||
ObjectGuid IcehowlGUID;
|
||||
ObjectGuid JaraxxusGUID;
|
||||
ObjectGuid ChampionsControllerGUID;
|
||||
ObjectGuid DarkbaneGUID;
|
||||
ObjectGuid LightbaneGUID;
|
||||
ObjectGuid AnubarakGUID;
|
||||
|
||||
ObjectGuid CrusadersCacheGUID;
|
||||
ObjectGuid FloorGUID;
|
||||
ObjectGuid TributeChestGUID;
|
||||
ObjectGuid MainGateDoorGUID;
|
||||
ObjectGuid EastPortcullisGUID;
|
||||
ObjectGuid WebDoorGUID;
|
||||
|
||||
// Achievement stuff
|
||||
uint32 NotOneButTwoJormungarsTimer;
|
||||
uint32 ResilienceWillFixItTimer;
|
||||
|
||||
@@ -163,12 +163,12 @@ struct _Messages
|
||||
|
||||
static _Messages _GossipMessage[]=
|
||||
{
|
||||
{MSG_BEASTS, GOSSIP_ACTION_INFO_DEF + 1, false, BOSS_BEASTS},
|
||||
{MSG_JARAXXUS, GOSSIP_ACTION_INFO_DEF + 2, false, BOSS_JARAXXUS},
|
||||
{MSG_CRUSADERS, GOSSIP_ACTION_INFO_DEF + 3, false, BOSS_CRUSADERS},
|
||||
{MSG_VALKIRIES, GOSSIP_ACTION_INFO_DEF + 4, false, BOSS_VALKIRIES},
|
||||
{MSG_LICH_KING, GOSSIP_ACTION_INFO_DEF + 5, false, BOSS_ANUBARAK},
|
||||
{MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF + 6, true, BOSS_ANUBARAK}
|
||||
{MSG_BEASTS, GOSSIP_ACTION_INFO_DEF + 1, false, DATA_NORTHREND_BEASTS},
|
||||
{MSG_JARAXXUS, GOSSIP_ACTION_INFO_DEF + 2, false, DATA_JARAXXUS},
|
||||
{MSG_CRUSADERS, GOSSIP_ACTION_INFO_DEF + 3, false, DATA_FACTION_CRUSADERS},
|
||||
{MSG_VALKIRIES, GOSSIP_ACTION_INFO_DEF + 4, false, DATA_TWIN_VALKIRIES},
|
||||
{MSG_LICH_KING, GOSSIP_ACTION_INFO_DEF + 5, false, DATA_ANUBARAK},
|
||||
{MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF + 6, true, DATA_ANUBARAK}
|
||||
};
|
||||
|
||||
enum Messages
|
||||
@@ -228,16 +228,16 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
ClearGossipMenuFor(player);
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
if (instance->GetBossState(BOSS_BEASTS) != DONE)
|
||||
if (instance->GetBossState(DATA_NORTHREND_BEASTS) != DONE)
|
||||
{
|
||||
instance->SetData(TYPE_EVENT, 110);
|
||||
instance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED);
|
||||
instance->SetBossState(BOSS_BEASTS, NOT_STARTED);
|
||||
instance->SetBossState(DATA_NORTHREND_BEASTS, NOT_STARTED);
|
||||
}
|
||||
else if (instance->GetBossState(BOSS_JARAXXUS) != DONE)
|
||||
else if (instance->GetBossState(DATA_JARAXXUS) != DONE)
|
||||
{
|
||||
// if Jaraxxus is spawned, but the raid wiped
|
||||
if (Creature* jaraxxus = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_JARAXXUS)))
|
||||
if (Creature* jaraxxus = instance->GetCreature(DATA_JARAXXUS))
|
||||
{
|
||||
jaraxxus->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS);
|
||||
jaraxxus->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -248,29 +248,29 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
else
|
||||
{
|
||||
instance->SetData(TYPE_EVENT, 1010);
|
||||
instance->SetBossState(BOSS_JARAXXUS, NOT_STARTED);
|
||||
instance->SetBossState(DATA_JARAXXUS, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
else if (instance->GetBossState(BOSS_CRUSADERS) != DONE)
|
||||
else if (instance->GetBossState(DATA_FACTION_CRUSADERS) != DONE)
|
||||
{
|
||||
if (player->GetTeam() == ALLIANCE)
|
||||
instance->SetData(TYPE_EVENT, 3000);
|
||||
else
|
||||
instance->SetData(TYPE_EVENT, 3001);
|
||||
instance->SetBossState(BOSS_CRUSADERS, NOT_STARTED);
|
||||
instance->SetBossState(DATA_FACTION_CRUSADERS, NOT_STARTED);
|
||||
}
|
||||
else if (instance->GetBossState(BOSS_VALKIRIES) != DONE)
|
||||
else if (instance->GetBossState(DATA_TWIN_VALKIRIES) != DONE)
|
||||
{
|
||||
instance->SetData(TYPE_EVENT, 4000);
|
||||
instance->SetBossState(BOSS_VALKIRIES, NOT_STARTED);
|
||||
instance->SetBossState(DATA_TWIN_VALKIRIES, NOT_STARTED);
|
||||
}
|
||||
else if (instance->GetBossState(BOSS_LICH_KING) != DONE)
|
||||
else if (instance->GetBossState(DATA_LICH_KING) != DONE)
|
||||
{
|
||||
if (me->GetMap()->GetPlayers().getFirst()->GetSource()->GetTeam() == ALLIANCE)
|
||||
instance->SetData(TYPE_EVENT, 4020);
|
||||
else
|
||||
instance->SetData(TYPE_EVENT, 4030);
|
||||
instance->SetBossState(BOSS_LICH_KING, NOT_STARTED);
|
||||
instance->SetBossState(DATA_LICH_KING, NOT_STARTED);
|
||||
}
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
return true;
|
||||
@@ -304,7 +304,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
summoned->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
_instance->SetBossState(BOSS_LICH_KING, IN_PROGRESS);
|
||||
_instance->SetBossState(DATA_LICH_KING, IN_PROGRESS);
|
||||
me->SetWalk(true);
|
||||
}
|
||||
|
||||
@@ -375,15 +375,15 @@ class boss_lich_king_toc : public CreatureScript
|
||||
break;
|
||||
case 5080:
|
||||
{
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
if (GameObject* go = _instance->GetGameObject(DATA_COLISEUM_FLOOR))
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
|
||||
|
||||
me->CastSpell(me, SPELL_CORPSE_TELEPORT, false);
|
||||
me->CastSpell(me, SPELL_DESTROY_FLOOR_KNOCKUP, false);
|
||||
|
||||
_instance->SetBossState(BOSS_LICH_KING, DONE);
|
||||
_instance->SetBossState(DATA_LICH_KING, DONE);
|
||||
|
||||
if (!ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_ANUBARAK)))
|
||||
if (!_instance->GetCreature(DATA_ANUBARAK))
|
||||
me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
|
||||
_instance->SetData(TYPE_EVENT, 0);
|
||||
@@ -428,7 +428,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
Talk(SAY_STAGE_1_06, killer);
|
||||
_instance->SetData(TYPE_EVENT, 1180);
|
||||
if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS)))
|
||||
if (Creature* jaraxxus = _instance->GetCreature(DATA_JARAXXUS))
|
||||
{
|
||||
jaraxxus->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
jaraxxus->SetImmuneToPC(false);
|
||||
@@ -453,7 +453,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
case 1:
|
||||
me->SetWalk(false);
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
_instance->SetData(TYPE_EVENT, 1120);
|
||||
_instance->SetData(TYPE_EVENT_TIMER, 1*IN_MILLISECONDS);
|
||||
break;
|
||||
@@ -537,7 +537,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
_updateTimer = 5*IN_MILLISECONDS;
|
||||
break;
|
||||
case 1142:
|
||||
if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS)))
|
||||
if (Creature* jaraxxus = _instance->GetCreature(DATA_JARAXXUS))
|
||||
jaraxxus->SetTarget(me->GetGUID());
|
||||
if (Creature* pTrigger = ObjectAccessor::GetCreature(*me, _triggerGUID))
|
||||
pTrigger->DespawnOrUnsummon();
|
||||
@@ -547,13 +547,13 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
_updateTimer = 10*IN_MILLISECONDS;
|
||||
break;
|
||||
case 1144:
|
||||
if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS)))
|
||||
if (Creature* jaraxxus = _instance->GetCreature(DATA_JARAXXUS))
|
||||
jaraxxus->AI()->Talk(SAY_STAGE_1_05);
|
||||
_instance->SetData(TYPE_EVENT, 1150);
|
||||
_updateTimer = 5*IN_MILLISECONDS;
|
||||
break;
|
||||
case 1150:
|
||||
if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS)))
|
||||
if (Creature* jaraxxus = _instance->GetCreature(DATA_JARAXXUS))
|
||||
{
|
||||
//1-shot Fizzlebang
|
||||
jaraxxus->CastSpell(me, 67888, false); // 67888 - Fel Lightning
|
||||
@@ -604,7 +604,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
if (!_instance)
|
||||
return;
|
||||
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION)
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION_FORDRING)
|
||||
return;
|
||||
|
||||
uint32 _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
@@ -626,9 +626,9 @@ class npc_tirion_toc : public CreatureScript
|
||||
break;
|
||||
case 150:
|
||||
me->SetEmoteState(EMOTE_STATE_NONE);
|
||||
if (_instance->GetBossState(BOSS_BEASTS) != DONE)
|
||||
if (_instance->GetBossState(DATA_NORTHREND_BEASTS) != DONE)
|
||||
{
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
|
||||
if (Creature* gormok = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS))
|
||||
{
|
||||
@@ -648,9 +648,9 @@ class npc_tirion_toc : public CreatureScript
|
||||
break;
|
||||
case 200:
|
||||
Talk(SAY_STAGE_0_04);
|
||||
if (_instance->GetBossState(BOSS_BEASTS) != DONE)
|
||||
if (_instance->GetBossState(DATA_NORTHREND_BEASTS) != DONE)
|
||||
{
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
if (Creature* dreadscale = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
dreadscale->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
|
||||
@@ -666,9 +666,9 @@ class npc_tirion_toc : public CreatureScript
|
||||
break;
|
||||
case 300:
|
||||
Talk(SAY_STAGE_0_05);
|
||||
if (_instance->GetBossState(BOSS_BEASTS) != DONE)
|
||||
if (_instance->GetBossState(DATA_NORTHREND_BEASTS) != DONE)
|
||||
{
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
if (Creature* icehowl = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN))
|
||||
{
|
||||
icehowl->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
|
||||
@@ -696,7 +696,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
case 1010:
|
||||
Talk(SAY_STAGE_1_01);
|
||||
_updateTimer = 7*IN_MILLISECONDS;
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
me->SummonCreature(NPC_FIZZLEBANG, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
_instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
@@ -750,7 +750,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
_instance->SetData(TYPE_EVENT, 3092);
|
||||
break;
|
||||
case 3092:
|
||||
if (Creature* pChampionController = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_CHAMPIONS_CONTROLLER)))
|
||||
if (Creature* pChampionController = _instance->GetCreature(DATA_FACTION_CRUSADERS))
|
||||
pChampionController->AI()->SetData(1, NOT_STARTED);
|
||||
_instance->SetData(TYPE_EVENT, 3095);
|
||||
break;
|
||||
@@ -767,14 +767,14 @@ class npc_tirion_toc : public CreatureScript
|
||||
break;
|
||||
case 4010:
|
||||
Talk(SAY_STAGE_3_02);
|
||||
if (Creature* lightbane = me->SummonCreature(NPC_LIGHTBANE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME))
|
||||
if (Creature* lightbane = me->SummonCreature(NPC_FJOLA_LIGHTBANE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME))
|
||||
{
|
||||
lightbane->SetVisible(false);
|
||||
lightbane->SetReactState(REACT_PASSIVE);
|
||||
lightbane->SummonCreature(NPC_LIGHT_ESSENCE, TwinValkyrsLoc[0].GetPositionX(), TwinValkyrsLoc[0].GetPositionY(), TwinValkyrsLoc[0].GetPositionZ());
|
||||
lightbane->SummonCreature(NPC_LIGHT_ESSENCE, TwinValkyrsLoc[1].GetPositionX(), TwinValkyrsLoc[1].GetPositionY(), TwinValkyrsLoc[1].GetPositionZ());
|
||||
}
|
||||
if (Creature* darkbane = me->SummonCreature(NPC_DARKBANE, ToCSpawnLoc[2].GetPositionX(), ToCSpawnLoc[2].GetPositionY(), ToCSpawnLoc[2].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME))
|
||||
if (Creature* darkbane = me->SummonCreature(NPC_EYDIS_DARKBANE, ToCSpawnLoc[2].GetPositionX(), ToCSpawnLoc[2].GetPositionY(), ToCSpawnLoc[2].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME))
|
||||
{
|
||||
darkbane->SetVisible(false);
|
||||
darkbane->SetReactState(REACT_PASSIVE);
|
||||
@@ -785,13 +785,13 @@ class npc_tirion_toc : public CreatureScript
|
||||
_instance->SetData(TYPE_EVENT, 4015);
|
||||
break;
|
||||
case 4015:
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
if (Creature* lightbane = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_LIGHTBANE)))
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
if (Creature* lightbane = _instance->GetCreature(DATA_FJOLA_LIGHTBANE))
|
||||
{
|
||||
lightbane->GetMotionMaster()->MovePoint(1, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
|
||||
lightbane->SetVisible(true);
|
||||
}
|
||||
if (Creature* darkbane = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_DARKBANE)))
|
||||
if (Creature* darkbane = _instance->GetCreature(DATA_EYDIS_DARKBANE))
|
||||
{
|
||||
darkbane->GetMotionMaster()->MovePoint(1, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ());
|
||||
darkbane->SetVisible(true);
|
||||
@@ -800,7 +800,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
_instance->SetData(TYPE_EVENT, 4016);
|
||||
break;
|
||||
case 4016:
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR));
|
||||
_instance->DoUseDoorOrButton(_instance->GetGuidData(DATA_MAIN_GATE));
|
||||
_instance->SetData(TYPE_EVENT, 4017);
|
||||
break;
|
||||
case 4040:
|
||||
@@ -823,14 +823,14 @@ class npc_tirion_toc : public CreatureScript
|
||||
_instance->SetData(TYPE_EVENT, 0);
|
||||
break;
|
||||
case 6000:
|
||||
me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0]);
|
||||
me->SummonCreature(NPC_TIRION_FORDRING_ANUBARAK, EndSpawnLoc[0]);
|
||||
me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1]);
|
||||
me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2], QuaternionData::fromEulerAnglesZYX(EndSpawnLoc[2].GetOrientation(), 0.0f, 0.0f), 0);
|
||||
_updateTimer = 20*IN_MILLISECONDS;
|
||||
_instance->SetData(TYPE_EVENT, 6005);
|
||||
break;
|
||||
case 6005:
|
||||
if (Creature* tirionFordring = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_TIRION_FORDRING)))
|
||||
if (Creature* tirionFordring = _instance->GetCreature(DATA_FORDRING_ANUBARAK))
|
||||
tirionFordring->AI()->Talk(SAY_STAGE_4_06);
|
||||
_updateTimer = 20*IN_MILLISECONDS;
|
||||
_instance->SetData(TYPE_EVENT, 6010);
|
||||
@@ -838,10 +838,10 @@ class npc_tirion_toc : public CreatureScript
|
||||
case 6010:
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (Creature* tirionFordring = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_TIRION_FORDRING)))
|
||||
if (Creature* tirionFordring = _instance->GetCreature(DATA_FORDRING_ANUBARAK))
|
||||
tirionFordring->AI()->Talk(SAY_STAGE_4_07);
|
||||
_updateTimer = 1*MINUTE*IN_MILLISECONDS;
|
||||
_instance->SetBossState(BOSS_ANUBARAK, SPECIAL);
|
||||
_instance->SetBossState(DATA_ANUBARAK, SPECIAL);
|
||||
_instance->SetData(TYPE_EVENT, 6020);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,19 +24,42 @@
|
||||
#define DataHeader "TCR"
|
||||
|
||||
struct Position;
|
||||
uint32 const EncounterCount = 6;
|
||||
|
||||
enum TCRDataTypes
|
||||
{
|
||||
BOSS_BEASTS = 0,
|
||||
BOSS_JARAXXUS = 1,
|
||||
BOSS_CRUSADERS = 2,
|
||||
BOSS_VALKIRIES = 3,
|
||||
BOSS_LICH_KING = 4, // not really a boss but oh well
|
||||
BOSS_ANUBARAK = 5,
|
||||
MAX_ENCOUNTERS = 6,
|
||||
// Encounter States
|
||||
DATA_NORTHREND_BEASTS = 0,
|
||||
DATA_JARAXXUS = 1,
|
||||
DATA_FACTION_CRUSADERS = 2,
|
||||
DATA_TWIN_VALKIRIES = 3,
|
||||
DATA_LICH_KING = 4,
|
||||
DATA_ANUBARAK = 5,
|
||||
|
||||
TYPE_COUNTER = 8,
|
||||
TYPE_EVENT = 9,
|
||||
// Additional Data
|
||||
DATA_GORMOK_THE_IMPALER = 5,
|
||||
DATA_ACIDMAW = 6,
|
||||
DATA_DREADSCALE = 7,
|
||||
DATA_ICEHOWL = 8,
|
||||
DATA_FJOLA_LIGHTBANE = 9,
|
||||
DATA_EYDIS_DARKBANE = 10,
|
||||
DATA_BARRET_RAMSEY = 11,
|
||||
DATA_FORDRING = 12,
|
||||
DATA_FORDRING_ANUBARAK = 13,
|
||||
DATA_VARIAN = 14,
|
||||
DATA_GARROSH = 15,
|
||||
DATA_FIZZLEBANG = 16,
|
||||
DATA_FACTION_CHAMPIONS = 17,
|
||||
|
||||
DATA_CRUSADERS_CHEST = 18,
|
||||
DATA_COLISEUM_FLOOR = 19,
|
||||
DATA_MAIN_GATE = 20,
|
||||
DATA_EAST_PORTCULLIS = 21,
|
||||
DATA_WEB_DOOR = 22,
|
||||
DATA_TRIBUTE_CHEST = 23,
|
||||
|
||||
TYPE_COUNTER = 24,
|
||||
TYPE_EVENT = 25,
|
||||
|
||||
TYPE_EVENT_TIMER = 101,
|
||||
TYPE_EVENT_NPC = 102,
|
||||
@@ -96,14 +119,14 @@ enum AnnouncerMessages
|
||||
|
||||
enum TCRCreatureIds
|
||||
{
|
||||
NPC_BARRENT = 34816,
|
||||
NPC_TIRION = 34996,
|
||||
NPC_TIRION_FORDRING = 36095,
|
||||
NPC_ARGENT_MAGE = 36097,
|
||||
NPC_FIZZLEBANG = 35458,
|
||||
NPC_GARROSH = 34995,
|
||||
NPC_VARIAN = 34990,
|
||||
NPC_LICH_KING = 35877,
|
||||
NPC_BARRET_RAMSEY = 34816,
|
||||
NPC_TIRION_FORDRING = 34996,
|
||||
NPC_TIRION_FORDRING_ANUBARAK = 36095,
|
||||
NPC_ARGENT_MAGE = 36097,
|
||||
NPC_FIZZLEBANG = 35458,
|
||||
NPC_GARROSH = 34995,
|
||||
NPC_VARIAN = 34990,
|
||||
NPC_LICH_KING = 35877,
|
||||
|
||||
NPC_THRALL = 34994,
|
||||
NPC_PROUDMOORE = 34992,
|
||||
@@ -149,8 +172,8 @@ enum TCRCreatureIds
|
||||
NPC_HORDE_WARLOCK = 34450,
|
||||
NPC_HORDE_WARRIOR = 34453,
|
||||
|
||||
NPC_LIGHTBANE = 34497,
|
||||
NPC_DARKBANE = 34496,
|
||||
NPC_FJOLA_LIGHTBANE = 34497,
|
||||
NPC_EYDIS_DARKBANE = 34496,
|
||||
|
||||
NPC_DARK_ESSENCE = 34567,
|
||||
NPC_LIGHT_ESSENCE = 34568,
|
||||
|
||||
Reference in New Issue
Block a user