Core/Scripts: Improvements to Trial of the Crusader
*Fixed creature_text errors. *Icehowl now works properly *Fixed waypoints so creatures don't enter the arena through the wall, Lich King now spawns at a proper place, after you start a new fight corpse of a the previous boss despawns (chest also after you start valkyries). Closes #7415
This commit is contained in:
+6
-6
@@ -207,7 +207,7 @@ public:
|
||||
{
|
||||
if (!m_bIntro)
|
||||
{
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
Talk(SAY_INTRO);
|
||||
m_bIntro = false;
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_ANUBARAK, DONE);
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
break;
|
||||
case NPC_SPIKE:
|
||||
summoned->CombatStart(target);
|
||||
DoScriptText(EMOTE_SPIKE, me, target);
|
||||
Talk(EMOTE_SPIKE, target->GetGUID());
|
||||
break;
|
||||
}
|
||||
Summons.Summon(summoned);
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetInCombatWithZone();
|
||||
if (instance)
|
||||
@@ -405,8 +405,8 @@ public:
|
||||
{
|
||||
m_bReachedPhase3 = true;
|
||||
DoCastAOE(SPELL_LEECHING_SWARM);
|
||||
DoScriptText(EMOTE_LEECHING_SWARM, me);
|
||||
DoScriptText(SAY_LEECHING_SWARM, me);
|
||||
Talk(EMOTE_LEECHING_SWARM);
|
||||
Talk(SAY_LEECHING_SWARM);
|
||||
}
|
||||
|
||||
if (m_uiBerserkTimer <= uiDiff && !me->HasAura(SPELL_BERSERK))
|
||||
|
||||
+7
-7
@@ -161,7 +161,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_JARAXXUS, DONE);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
me->SetInCombatWithZone();
|
||||
if (instance)
|
||||
instance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
@@ -186,8 +186,8 @@ public:
|
||||
|
||||
if (m_uiSummonInfernalEruptionTimer <= uiDiff)
|
||||
{
|
||||
DoScriptText(EMOTE_INFERNAL_ERUPTION, me);
|
||||
DoScriptText(SAY_INFERNAL_ERUPTION, me);
|
||||
Talk(EMOTE_INFERNAL_ERUPTION);
|
||||
Talk(SAY_INFERNAL_ERUPTION);
|
||||
DoCast(SPELL_INFERNAL_ERUPTION);
|
||||
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
|
||||
} else m_uiSummonInfernalEruptionTimer -= uiDiff;
|
||||
@@ -217,8 +217,8 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true))
|
||||
{
|
||||
DoScriptText(EMOTE_INCINERATE, me, target);
|
||||
DoScriptText(SAY_INCINERATE, me);
|
||||
Talk(EMOTE_INCINERATE, target->GetGUID());
|
||||
Talk(SAY_INCINERATE);
|
||||
DoCast(target, SPELL_INCINERATE_FLESH);
|
||||
}
|
||||
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true))
|
||||
{
|
||||
DoScriptText(EMOTE_LEGION_FLAME, me, target);
|
||||
Talk(EMOTE_LEGION_FLAME, target->GetGUID());
|
||||
DoCast(target, SPELL_LEGION_FLAME);
|
||||
}
|
||||
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
|
||||
|
||||
+13
-3
@@ -905,6 +905,8 @@ public:
|
||||
if (m_uiMassiveCrashTimer <= diff)
|
||||
{
|
||||
me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 10.0f, 20.0f); // 1: Middle of the room
|
||||
SetCombatMovement(false);
|
||||
me->AttackStop();
|
||||
m_uiStage = 7; //Invalid (Do nothing more than move)
|
||||
m_uiMassiveCrashTimer = 30*IN_MILLISECONDS;
|
||||
} else m_uiMassiveCrashTimer -= diff;
|
||||
@@ -913,22 +915,28 @@ public:
|
||||
break;
|
||||
case 1:
|
||||
DoCastAOE(SPELL_MASSIVE_CRASH);
|
||||
me->StopMoving();
|
||||
me->AttackStop();
|
||||
m_uiStage = 2;
|
||||
break;
|
||||
case 2:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
|
||||
{
|
||||
me->StopMoving();
|
||||
me->AttackStop();
|
||||
m_uiTrampleTargetGUID = target->GetGUID();
|
||||
me->SetTarget(m_uiTrampleTargetGUID);
|
||||
m_bTrampleCasted = false;
|
||||
SetCombatMovement(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
//SetCombatMovement(false);
|
||||
//me->GetMotionMaster()->MoveIdle();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_uiTrampleTimer = 4*IN_MILLISECONDS;
|
||||
m_uiStage = 3;
|
||||
} else m_uiStage = 6;
|
||||
break;
|
||||
case 3:
|
||||
me->StopMoving();
|
||||
me->AttackStop();
|
||||
if (m_uiTrampleTimer <= diff)
|
||||
{
|
||||
if (Unit* target = Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
|
||||
@@ -941,12 +949,14 @@ public:
|
||||
me->GetMotionMaster()->MoveJump(2*me->GetPositionX()-m_fTrampleTargetX,
|
||||
2*me->GetPositionY()-m_fTrampleTargetY,
|
||||
me->GetPositionZ(),
|
||||
10.0f, 20.0f); // 2: Hop Backwards
|
||||
20.0f, 30.0f); // 2: Hop Backwards
|
||||
m_uiStage = 7; //Invalid (Do nothing more than move)
|
||||
} else m_uiStage = 6;
|
||||
} else m_uiTrampleTimer -= diff;
|
||||
break;
|
||||
case 4:
|
||||
me->StopMoving();
|
||||
me->AttackStop();
|
||||
Talk(EMOTE_TRAMPLE_START, m_uiTrampleTargetGUID);
|
||||
me->GetMotionMaster()->MoveCharge(m_fTrampleTargetX, m_fTrampleTargetY, m_fTrampleTargetZ+2, 42, 1);
|
||||
me->SetTarget(0);
|
||||
|
||||
+3
-3
@@ -254,7 +254,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pSister = GetSister())
|
||||
@@ -296,7 +296,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
instance->SetData(TYPE_VALKIRIES, IN_PROGRESS);
|
||||
}
|
||||
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
DoCast(me, m_uiSurgeSpellId);
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ struct boss_twin_baseAI : public ScriptedAI
|
||||
if (!m_bIsBerserk && m_uiBerserkTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
Talk(SAY_BERSERK);
|
||||
m_bIsBerserk = true;
|
||||
}
|
||||
else
|
||||
|
||||
+11
@@ -244,10 +244,18 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
switch (type)
|
||||
{
|
||||
case TYPE_JARAXXUS:
|
||||
// Cleanup Icehowl
|
||||
if (Creature* icehowl = instance->GetCreature(IcehowlGUID))
|
||||
icehowl->DespawnOrUnsummon();
|
||||
if (data == DONE)
|
||||
EventStage = 2000;
|
||||
break;
|
||||
case TYPE_CRUSADERS:
|
||||
// Cleanup Jaraxxus
|
||||
if (Creature* jaraxxus = instance->GetCreature(JaraxxusGUID))
|
||||
jaraxxus->DespawnOrUnsummon();
|
||||
if (Creature* fizzlebang = instance->GetCreature(FizzlebangGUID))
|
||||
fizzlebang->DespawnOrUnsummon();
|
||||
switch (data)
|
||||
{
|
||||
case IN_PROGRESS:
|
||||
@@ -267,6 +275,9 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
}
|
||||
break;
|
||||
case TYPE_VALKIRIES:
|
||||
// Cleanup chest
|
||||
if (GameObject* cache = instance->GetGameObject(CrusadersCacheGUID))
|
||||
cache->Delete();
|
||||
switch (data)
|
||||
{
|
||||
case FAIL:
|
||||
|
||||
+1
-1
@@ -789,7 +789,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
case 5005:
|
||||
m_uiUpdateTimer = 8000;
|
||||
instance->SetData(TYPE_EVENT, 5010);
|
||||
me->SummonCreature(NPC_LICH_KING_1, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5);
|
||||
me->SummonCreature(NPC_LICH_KING_1, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5);
|
||||
break;
|
||||
case 5020:
|
||||
Talk(SAY_STAGE_4_03);
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ const Position ToCCommonLoc[]=
|
||||
{563.833008f, 195.244995f, 394.585561f, 0}, // 5 - Center
|
||||
{573.5f, 180.5f, 395.14f, 0}, // 6 Move 0 Right
|
||||
{553.5f, 180.5f, 395.14f, 0}, // 7 Move 0 Left
|
||||
{585.5f, 170.0f, 395.14f, 0}, // 8 Move 1 Right
|
||||
{545.5f, 170.0f, 395.14f, 0}, // 9 Move 1 Left
|
||||
{573.0f, 170.0f, 395.14f, 0}, // 8 Move 1 Right
|
||||
{555.5f, 170.0f, 395.14f, 0}, // 9 Move 1 Left
|
||||
{563.8f, 216.1f, 395.1f, 0}, // 10 Behind the door
|
||||
|
||||
{575.042358f, 195.260727f, 395.137146f, 0}, // 5
|
||||
|
||||
Reference in New Issue
Block a user