mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Nexus, Nexus: Cleanup
--HG-- branch : trunk
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* Copyright (C) 2006 - 2010 TrinityCore <http://www.trinitycore.org>
|
||||
* Copyright (C) 2008 - 2010 TrinityCore <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
|
||||
@@ -18,31 +18,34 @@
|
||||
#include "ScriptedPch.h"
|
||||
#include "nexus.h"
|
||||
|
||||
bool DeadChaoticRift; // needed for achievement: Chaos Theory(2037)
|
||||
|
||||
enum eEnums
|
||||
enum Spells
|
||||
{
|
||||
ACHIEVEMENT_CHAOS_THEORY = 2037,
|
||||
|
||||
//Spells
|
||||
SPELL_SPARK_N = 47751,
|
||||
SPELL_SPARK_H = 57062,
|
||||
SPELL_RIFT_SHIELD = 47748,
|
||||
SPELL_CHARGE_RIFT = 47747, //Works wrong (affect players, not rifts)
|
||||
SPELL_CREATE_RIFT = 47743, //Don't work, using WA
|
||||
SPELL_ARCANE_ATTRACTION = 57063, //No idea, when it's used
|
||||
|
||||
MOB_CRAZED_MANA_WRAITH = 26746,
|
||||
MOB_CHAOTIC_RIFT = 26918,
|
||||
SPELL_CHAOTIC_ENERGY_BURST = 47688,
|
||||
SPELL_CHARGED_CHAOTIC_ENERGY_BURST = 47737,
|
||||
SPELL_ARCANEFORM = 48019, //Chaotic Rift visual
|
||||
SPELL_SPARK = 47751,
|
||||
H_SPELL_SPARK = 57062,
|
||||
SPELL_RIFT_SHIELD = 47748,
|
||||
SPELL_CHARGE_RIFT = 47747, //Works wrong (affect players, not rifts)
|
||||
SPELL_CREATE_RIFT = 47743, //Don't work, using WA
|
||||
SPELL_ARCANE_ATTRACTION = 57063, //No idea, when it's used
|
||||
};
|
||||
|
||||
enum Adds
|
||||
{
|
||||
MOB_CRAZED_MANA_WRAITH = 26746,
|
||||
MOB_CHAOTIC_RIFT = 26918
|
||||
};
|
||||
enum Yells
|
||||
{
|
||||
//Yell
|
||||
SAY_AGGRO = -1576010,
|
||||
SAY_DEATH = -1576011,
|
||||
SAY_RIFT = -1576012,
|
||||
SAY_SHIELD = -1576013
|
||||
SAY_AGGRO = -1576010,
|
||||
SAY_DEATH = -1576011,
|
||||
SAY_RIFT = -1576012,
|
||||
SAY_SHIELD = -1576013
|
||||
};
|
||||
|
||||
enum Achievs
|
||||
{
|
||||
ACHIEV_CHAOS_THEORY = 2037
|
||||
};
|
||||
|
||||
const Position RiftLocation[6] =
|
||||
@@ -65,18 +68,19 @@ struct boss_anomalusAI : public ScriptedAI
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint8 Phase;
|
||||
uint32 SPELL_SPARK_Timer;
|
||||
uint32 SPELL_CREATE_RIFT_Timer;
|
||||
uint64 ChaoticRiftGUID;
|
||||
uint32 uiSparkTimer;
|
||||
uint32 uiCreateRiftTimer;
|
||||
uint64 uiChaoticRiftGUID;
|
||||
|
||||
bool bDeadChaoticRift; // needed for achievement: Chaos Theory(2037)
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Phase = 0;
|
||||
SPELL_SPARK_Timer = 5000;
|
||||
SPELL_CREATE_RIFT_Timer = 25000;
|
||||
ChaoticRiftGUID = 0;
|
||||
uiSparkTimer = 5*IN_MILISECONDS;
|
||||
uiChaoticRiftGUID = 0;
|
||||
|
||||
DeadChaoticRift = false;
|
||||
bDeadChaoticRift = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED);
|
||||
@@ -94,23 +98,12 @@ struct boss_anomalusAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (IsHeroic() && !DeadChaoticRift)
|
||||
{
|
||||
AchievementEntry const *AchievChaosTheory = GetAchievementStore()->LookupEntry(ACHIEVEMENT_CHAOS_THEORY);
|
||||
if (AchievChaosTheory)
|
||||
{
|
||||
Map* pMap = m_creature->GetMap();
|
||||
if (pMap && pMap->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievChaosTheory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (IsHeroic() && !bDeadChaoticRift)
|
||||
pInstance->DoCompleteAchievement(ACHIEV_CHAOS_THEORY);
|
||||
pInstance->SetData(DATA_ANOMALUS_EVENT, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -127,44 +120,42 @@ struct boss_anomalusAI : public ScriptedAI
|
||||
|
||||
if (m_creature->HasAura(SPELL_RIFT_SHIELD))
|
||||
{
|
||||
if (ChaoticRiftGUID)
|
||||
if (uiChaoticRiftGUID)
|
||||
{
|
||||
Unit* Rift = Unit::GetUnit((*m_creature), ChaoticRiftGUID);
|
||||
Unit* Rift = Unit::GetUnit((*m_creature), uiChaoticRiftGUID);
|
||||
if (Rift && Rift->isDead())
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD);
|
||||
ChaoticRiftGUID = 0;
|
||||
uiChaoticRiftGUID = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
} else
|
||||
ChaoticRiftGUID = 0;
|
||||
uiChaoticRiftGUID = 0;
|
||||
|
||||
if ((Phase == 0) && HealthBelowPct(50))
|
||||
{
|
||||
Phase = 1;
|
||||
DoScriptText(SAY_SHIELD, m_creature);
|
||||
DoCast(m_creature, SPELL_RIFT_SHIELD);
|
||||
|
||||
int tmp = rand()%(2);
|
||||
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[tmp], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
Creature* Rift = m_creature->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0,5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS);
|
||||
if (Rift)
|
||||
{
|
||||
//DoCast(Rift, SPELL_CHARGE_RIFT);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
Rift->AI()->AttackStart(pTarget);
|
||||
ChaoticRiftGUID = Rift->GetGUID();
|
||||
uiChaoticRiftGUID = Rift->GetGUID();
|
||||
DoScriptText(SAY_RIFT , m_creature);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (SPELL_SPARK_Timer <= diff)
|
||||
if (uiSparkTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_SPARK_N, SPELL_SPARK_H));
|
||||
SPELL_SPARK_Timer = 5000;
|
||||
} else SPELL_SPARK_Timer -=diff;
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_SPARK, H_SPELL_SPARK));
|
||||
uiSparkTimer = 5*IN_MILISECONDS;
|
||||
} else uiSparkTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -175,6 +166,13 @@ CreatureAI* GetAI_boss_anomalus(Creature* pCreature)
|
||||
return new boss_anomalusAI (pCreature);
|
||||
}
|
||||
|
||||
enum RiftSpells
|
||||
{
|
||||
SPELL_CHAOTIC_ENERGY_BURST = 47688,
|
||||
SPELL_CHARGED_CHAOTIC_ENERGY_BURST = 47737,
|
||||
SPELL_ARCANEFORM = 48019 //Chaotic Rift visual
|
||||
};
|
||||
|
||||
struct mob_chaotic_riftAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_chaotic_riftAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
@@ -184,14 +182,14 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 SPELL_CHAOTIC_ENERGY_BURST_Timer;
|
||||
uint32 SUMMON_CRAZED_MANA_WRAITH_Timer;
|
||||
uint32 uiChaoticEnergyBurstTimer;
|
||||
uint32 uiSummonCrazedManaWraithTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SPELL_CHAOTIC_ENERGY_BURST_Timer = 1000;
|
||||
SUMMON_CRAZED_MANA_WRAITH_Timer = 5000;
|
||||
m_creature->SetDisplayId(25206); //For some reason in DB models for ally and horde are different.
|
||||
uiChaoticEnergyBurstTimer = 1*IN_MILISECONDS;
|
||||
uiSummonCrazedManaWraithTimer = 5*IN_MILISECONDS;
|
||||
//m_creature->SetDisplayId(25206); //For some reason in DB models for ally and horde are different.
|
||||
//Model for ally (1126) does not show auras. Horde model works perfect.
|
||||
//Set model to horde number
|
||||
DoCast(m_creature, SPELL_ARCANEFORM, false);
|
||||
@@ -199,7 +197,8 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
DeadChaoticRift = true;
|
||||
if (Creature* pAnomalus = Unit::GetCreature(*m_creature, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0))
|
||||
CAST_AI(boss_anomalusAI,pAnomalus->AI())->bDeadChaoticRift = true;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -207,29 +206,29 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (SPELL_CHAOTIC_ENERGY_BURST_Timer <= diff)
|
||||
if (uiChaoticEnergyBurstTimer <= diff)
|
||||
{
|
||||
Unit* Anomalus = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
|
||||
Unit* pAnomalus = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
|
||||
if (pAnomalus && pAnomalus->HasAura(SPELL_RIFT_SHIELD))
|
||||
DoCast(pTarget, SPELL_CHARGED_CHAOTIC_ENERGY_BURST);
|
||||
else
|
||||
DoCast(pTarget, SPELL_CHAOTIC_ENERGY_BURST);
|
||||
SPELL_CHAOTIC_ENERGY_BURST_Timer = 1000;
|
||||
} else SPELL_CHAOTIC_ENERGY_BURST_Timer -=diff;
|
||||
uiChaoticEnergyBurstTimer = 1*IN_MILISECONDS;
|
||||
} else uiChaoticEnergyBurstTimer -= diff;
|
||||
|
||||
if (SUMMON_CRAZED_MANA_WRAITH_Timer <= diff)
|
||||
if (uiSummonCrazedManaWraithTimer <= diff)
|
||||
{
|
||||
Creature* Wraith = m_creature->SummonCreature(MOB_CRAZED_MANA_WRAITH, m_creature->GetPositionX()+1, m_creature->GetPositionY()+1, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
Creature* Wraith = m_creature->SummonCreature(MOB_CRAZED_MANA_WRAITH, m_creature->GetPositionX()+1, m_creature->GetPositionY()+1, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS);
|
||||
if (Wraith)
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
Wraith->AI()->AttackStart(pTarget);
|
||||
Unit* Anomalus = Unit::GetUnit(*m_creature, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
|
||||
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
|
||||
SUMMON_CRAZED_MANA_WRAITH_Timer = 5000;
|
||||
uiSummonCrazedManaWraithTimer = 5*IN_MILISECONDS;
|
||||
else
|
||||
SUMMON_CRAZED_MANA_WRAITH_Timer = 10000;
|
||||
} else SUMMON_CRAZED_MANA_WRAITH_Timer -=diff;
|
||||
uiSummonCrazedManaWraithTimer = 10*IN_MILISECONDS;
|
||||
} else uiSummonCrazedManaWraithTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* Copyright (C) 2008 - 2010 TrinityCore <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
|
||||
@@ -14,39 +15,38 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Keristrasza
|
||||
SD%Complete:
|
||||
SDComment:
|
||||
SDCategory: The Nexus, The Nexus
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
#include "nexus.h"
|
||||
|
||||
enum eEnums
|
||||
enum Spells
|
||||
{
|
||||
CONTAINMENT_SPHERES = 3,
|
||||
|
||||
ACHIEVEMENT_INTENSE_COLD = 2036,
|
||||
|
||||
//Spells
|
||||
SPELL_FROZEN_PRISON = 47854,
|
||||
SPELL_TAIL_SWEEP = 50155,
|
||||
SPELL_CRYSTAL_CHAINS = 50997,
|
||||
SPELL_ENRAGE = 8599,
|
||||
SPELL_CRYSTALFIRE_BREATH_N = 48096,
|
||||
SPELL_CRYSTALFIRE_BREATH_H = 57091,
|
||||
SPELL_CRYSTALIZE = 48179,
|
||||
SPELL_INTENSE_COLD = 48094,
|
||||
SPELL_INTENSE_COLD_TRIGGERED = 48095,
|
||||
|
||||
SPELL_FROZEN_PRISON = 47854,
|
||||
SPELL_TAIL_SWEEP = 50155,
|
||||
SPELL_CRYSTAL_CHAINS = 50997,
|
||||
SPELL_ENRAGE = 8599,
|
||||
SPELL_CRYSTALFIRE_BREATH = 48096,
|
||||
H_SPELL_CRYSTALFIRE_BREATH = 57091,
|
||||
SPELL_CRYSTALIZE = 48179,
|
||||
SPELL_INTENSE_COLD = 48094,
|
||||
SPELL_INTENSE_COLD_TRIGGERED = 48095
|
||||
};
|
||||
enum Yells
|
||||
{
|
||||
//Yell
|
||||
SAY_AGGRO = -1576040,
|
||||
SAY_SLAY = -1576041,
|
||||
SAY_ENRAGE = -1576042,
|
||||
SAY_DEATH = -1576043,
|
||||
SAY_CRYSTAL_NOVA = -1576044
|
||||
SAY_AGGRO = -1576040,
|
||||
SAY_SLAY = -1576041,
|
||||
SAY_ENRAGE = -1576042,
|
||||
SAY_DEATH = -1576043,
|
||||
SAY_CRYSTAL_NOVA = -1576044
|
||||
};
|
||||
enum Achievements
|
||||
{
|
||||
ACHIEV_INTENSE_COLD = 2036
|
||||
};
|
||||
enum Misc
|
||||
{
|
||||
DATA_CONTAINMENT_SPHERES = 3
|
||||
};
|
||||
|
||||
struct boss_keristraszaAI : public ScriptedAI
|
||||
@@ -58,25 +58,25 @@ struct boss_keristraszaAI : public ScriptedAI
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 CRYSTALFIRE_BREATH_Timer;
|
||||
uint32 CRYSTAL_CHAINS_CRYSTALIZE_Timer;
|
||||
uint32 TAIL_SWEEP_Timer;
|
||||
bool Enrage;
|
||||
uint32 uiCrystalfireBreathTimer;
|
||||
uint32 uiCrystalChainsCrystalizeTimer;
|
||||
uint32 uiTailSweepTimer;
|
||||
bool bEnrage;
|
||||
|
||||
uint64 ContainmentSphereGUIDs[CONTAINMENT_SPHERES];
|
||||
uint64 auiContainmentSphereGUIDs[DATA_CONTAINMENT_SPHERES];
|
||||
|
||||
uint32 CheckIntenseColdTimer;
|
||||
bool MoreThanTwoIntenseCold; // needed for achievement: Intense Cold(2036)
|
||||
uint32 uiCheckIntenseColdTimer;
|
||||
bool bMoreThanTwoIntenseCold; // needed for achievement: Intense Cold(2036)
|
||||
|
||||
void Reset()
|
||||
{
|
||||
CRYSTALFIRE_BREATH_Timer = 14000;
|
||||
CRYSTAL_CHAINS_CRYSTALIZE_Timer = DUNGEON_MODE(30000,11000);
|
||||
TAIL_SWEEP_Timer = 5000;
|
||||
Enrage = false;
|
||||
uiCrystalfireBreathTimer = 14*IN_MILISECONDS;
|
||||
uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILISECONDS,11*IN_MILISECONDS);
|
||||
uiTailSweepTimer = 5*IN_MILISECONDS;
|
||||
bEnrage = false;
|
||||
|
||||
CheckIntenseColdTimer = 2000;
|
||||
MoreThanTwoIntenseCold = false;
|
||||
uiCheckIntenseColdTimer = 2*IN_MILISECONDS;
|
||||
bMoreThanTwoIntenseCold = false;
|
||||
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
|
||||
@@ -99,23 +99,12 @@ struct boss_keristraszaAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (IsHeroic() && !MoreThanTwoIntenseCold)
|
||||
{
|
||||
AchievementEntry const *AchievIntenseCold = GetAchievementStore()->LookupEntry(ACHIEVEMENT_INTENSE_COLD);
|
||||
if (AchievIntenseCold)
|
||||
{
|
||||
Map* pMap = m_creature->GetMap();
|
||||
if (pMap && pMap->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievIntenseCold);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (IsHeroic() && !bMoreThanTwoIntenseCold)
|
||||
pInstance->DoCompleteAchievement(ACHIEV_INTENSE_COLD);
|
||||
pInstance->SetData(DATA_KERISTRASZA_EVENT, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -128,15 +117,15 @@ struct boss_keristraszaAI : public ScriptedAI
|
||||
if(!pInstance)
|
||||
return false;
|
||||
|
||||
ContainmentSphereGUIDs[0] = pInstance->GetData64(ANOMALUS_CONTAINMET_SPHERE);
|
||||
ContainmentSphereGUIDs[1] = pInstance->GetData64(ORMOROKS_CONTAINMET_SPHERE);
|
||||
ContainmentSphereGUIDs[2] = pInstance->GetData64(TELESTRAS_CONTAINMET_SPHERE);
|
||||
auiContainmentSphereGUIDs[0] = pInstance->GetData64(ANOMALUS_CONTAINMET_SPHERE);
|
||||
auiContainmentSphereGUIDs[1] = pInstance->GetData64(ORMOROKS_CONTAINMET_SPHERE);
|
||||
auiContainmentSphereGUIDs[2] = pInstance->GetData64(TELESTRAS_CONTAINMET_SPHERE);
|
||||
|
||||
GameObject *ContainmentSpheres[CONTAINMENT_SPHERES];
|
||||
GameObject *ContainmentSpheres[DATA_CONTAINMENT_SPHERES];
|
||||
|
||||
for (uint8 i = 0; i < CONTAINMENT_SPHERES; ++i)
|
||||
for (uint8 i = 0; i < DATA_CONTAINMENT_SPHERES; ++i)
|
||||
{
|
||||
ContainmentSpheres[i] = pInstance->instance->GetGameObject(ContainmentSphereGUIDs[i]);
|
||||
ContainmentSpheres[i] = pInstance->instance->GetGameObject(auiContainmentSphereGUIDs[i]);
|
||||
if (!ContainmentSpheres[i])
|
||||
return false;
|
||||
if (ContainmentSpheres[i]->GetGoState() != GO_STATE_ACTIVE)
|
||||
@@ -169,7 +158,7 @@ struct boss_keristraszaAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (CheckIntenseColdTimer < diff && !MoreThanTwoIntenseCold)
|
||||
if (uiCheckIntenseColdTimer < diff && !bMoreThanTwoIntenseCold)
|
||||
{
|
||||
std::list<HostileReference*> ThreatList = m_creature->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); itr++)
|
||||
@@ -181,41 +170,41 @@ struct boss_keristraszaAI : public ScriptedAI
|
||||
Aura *AuraIntenseCold = pTarget->GetAura(SPELL_INTENSE_COLD_TRIGGERED);
|
||||
if (AuraIntenseCold && AuraIntenseCold->GetStackAmount() > 2)
|
||||
{
|
||||
MoreThanTwoIntenseCold = true;
|
||||
bMoreThanTwoIntenseCold = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
CheckIntenseColdTimer = 2000;
|
||||
} else CheckIntenseColdTimer -= diff;
|
||||
uiCheckIntenseColdTimer = 2*IN_MILISECONDS;
|
||||
} else uiCheckIntenseColdTimer -= diff;
|
||||
|
||||
if (!Enrage && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
||||
if (!bEnrage && (m_creature->GetHealth() < HealthBelowPct(25)))
|
||||
{
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
DoCast(m_creature, SPELL_ENRAGE);
|
||||
Enrage = true;
|
||||
bEnrage = true;
|
||||
}
|
||||
|
||||
if (CRYSTALFIRE_BREATH_Timer <= diff)
|
||||
if (uiCrystalfireBreathTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_CRYSTALFIRE_BREATH_N, SPELL_CRYSTALFIRE_BREATH_H));
|
||||
CRYSTALFIRE_BREATH_Timer = 14000;
|
||||
} else CRYSTALFIRE_BREATH_Timer -=diff;
|
||||
DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_CRYSTALFIRE_BREATH, H_SPELL_CRYSTALFIRE_BREATH));
|
||||
uiCrystalfireBreathTimer = 14*IN_MILISECONDS;
|
||||
} else uiCrystalfireBreathTimer -= diff;
|
||||
|
||||
if (TAIL_SWEEP_Timer <= diff)
|
||||
if (uiTailSweepTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_TAIL_SWEEP);
|
||||
TAIL_SWEEP_Timer = 5000;
|
||||
} else TAIL_SWEEP_Timer -=diff;
|
||||
uiTailSweepTimer = 5*IN_MILISECONDS;
|
||||
} else uiTailSweepTimer -= diff;
|
||||
|
||||
if (CRYSTAL_CHAINS_CRYSTALIZE_Timer <= diff)
|
||||
if (uiCrystalChainsCrystalizeTimer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_CRYSTAL_NOVA, m_creature);
|
||||
if (IsHeroic())
|
||||
DoCast(m_creature, SPELL_CRYSTALIZE);
|
||||
else if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_CRYSTAL_CHAINS);
|
||||
CRYSTAL_CHAINS_CRYSTALIZE_Timer = DUNGEON_MODE(30000,11000);
|
||||
} else CRYSTAL_CHAINS_CRYSTALIZE_Timer -= diff;
|
||||
uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILISECONDS,11*IN_MILISECONDS);
|
||||
} else uiCrystalChainsCrystalizeTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -230,14 +219,14 @@ bool GOHello_containment_sphere(Player *pPlayer, GameObject *pGO)
|
||||
{
|
||||
ScriptedInstance *pInstance = pGO->GetInstanceData();
|
||||
|
||||
Creature *Keristrasza = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_KERISTRASZA) : 0);
|
||||
if (Keristrasza && Keristrasza->isAlive())
|
||||
Creature *pKeristrasza = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_KERISTRASZA) : 0);
|
||||
if (pKeristrasza && pKeristrasza->isAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
CAST_AI(boss_keristraszaAI, Keristrasza->AI())->CheckContainmentSpheres(true);
|
||||
CAST_AI(boss_keristraszaAI, pKeristrasza->AI())->CheckContainmentSpheres(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* Copyright (C) 2008 - 2010 TrinityCore <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
|
||||
@@ -14,52 +15,44 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Magus_Telestra
|
||||
SD%Complete:
|
||||
SDComment:
|
||||
SDCategory: The Nexus, The Nexus
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
#include "nexus.h"
|
||||
|
||||
enum eEnums
|
||||
enum Spells
|
||||
{
|
||||
//Spells
|
||||
SPELL_ICE_NOVA_N = 47772,
|
||||
SPELL_ICE_NOVA_H = 56935,
|
||||
SPELL_FIREBOMB_N = 47773,
|
||||
SPELL_FIREBOMB_H = 56934,
|
||||
SPELL_GRAVITY_WELL = 47756,
|
||||
SPELL_TELESTRA_BACK = 47714,
|
||||
SPELL_ICE_NOVA = 47772,
|
||||
H_SPELL_ICE_NOVA = 56935,
|
||||
SPELL_FIREBOMB = 47773,
|
||||
H_SPELL_FIREBOMB = 56934,
|
||||
SPELL_GRAVITY_WELL = 47756,
|
||||
SPELL_TELESTRA_BACK = 47714,
|
||||
|
||||
//At 50% HP - 3 clones, Frost, Fire, Arcane (and in 10% HP in Heroic)
|
||||
MOB_FIRE_MAGUS = 26928,
|
||||
MOB_FROST_MAGUS = 26930,
|
||||
MOB_ARCANE_MAGUS = 26929,
|
||||
|
||||
SPELL_FIRE_MAGUS_VISUAL = 47705,
|
||||
SPELL_FROST_MAGUS_VISUAL = 47706,
|
||||
SPELL_ARCANE_MAGUS_VISUAL = 47704,
|
||||
|
||||
//Yell
|
||||
SAY_AGGRO = -1576000,
|
||||
SAY_KILL = -1576001,
|
||||
SAY_DEATH = -1576002,
|
||||
SAY_MERGE = -1576003,
|
||||
SAY_SPLIT_1 = -1576004,
|
||||
SAY_SPLIT_2 = -1576005,
|
||||
|
||||
//Achievement
|
||||
ACHIEV_SPLIT_PERSONALITY = 2150,
|
||||
ACHIEV_TIMER = 5 * 1000
|
||||
SPELL_FIRE_MAGUS_VISUAL = 47705,
|
||||
SPELL_FROST_MAGUS_VISUAL = 47706,
|
||||
SPELL_ARCANE_MAGUS_VISUAL = 47704
|
||||
};
|
||||
enum Creatures
|
||||
{
|
||||
MOB_FIRE_MAGUS = 26928,
|
||||
MOB_FROST_MAGUS = 26930,
|
||||
MOB_ARCANE_MAGUS = 26929
|
||||
};
|
||||
enum Yells
|
||||
{
|
||||
SAY_AGGRO = -1576000,
|
||||
SAY_KILL = -1576001,
|
||||
SAY_DEATH = -1576002,
|
||||
SAY_MERGE = -1576003,
|
||||
SAY_SPLIT_1 = -1576004,
|
||||
SAY_SPLIT_2 = -1576005,
|
||||
};
|
||||
enum Achievements
|
||||
{
|
||||
ACHIEV_SPLIT_PERSONALITY = 2150,
|
||||
ACHIEV_TIMER = 5*IN_MILISECONDS
|
||||
};
|
||||
|
||||
float CenterOfRoom[1][4] =
|
||||
{
|
||||
{504.80, 89.07, -16.12, 6.27}
|
||||
};
|
||||
const Position CenterOfRoom = {504.80, 89.07, -16.12, 6.27};
|
||||
|
||||
struct boss_magus_telestraAI : public ScriptedAI
|
||||
{
|
||||
@@ -70,45 +63,44 @@ struct boss_magus_telestraAI : public ScriptedAI
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint64 FireMagusGUID;
|
||||
uint64 FrostMagusGUID;
|
||||
uint64 ArcaneMagusGUID;
|
||||
bool FireMagusDead;
|
||||
bool FrostMagusDead;
|
||||
bool ArcaneMagusDead;
|
||||
uint64 uiFireMagusGUID;
|
||||
uint64 uiFrostMagusGUID;
|
||||
uint64 uiArcaneMagusGUID;
|
||||
|
||||
bool bFireMagusDead;
|
||||
bool bFrostMagusDead;
|
||||
bool bArcaneMagusDead;
|
||||
bool bIsWaitingToAppear;
|
||||
bool bIsAchievementTimerRunning;
|
||||
|
||||
uint32 AppearDelay_Timer;
|
||||
bool AppearDelay;
|
||||
uint32 uiIsWaitingToAppearTimer;
|
||||
uint32 uiIceNovaTimer;
|
||||
uint32 uiFireBombTimer;
|
||||
uint32 uiGravityWellTimer;
|
||||
uint32 uiCooldown;
|
||||
uint32 uiAchievementTimer;
|
||||
|
||||
uint8 Phase;
|
||||
|
||||
uint32 SPELL_ICE_NOVA_Timer;
|
||||
uint32 SPELL_FIREBOMB_Timer;
|
||||
uint32 SPELL_GRAVITY_WELL_Timer;
|
||||
uint32 Cooldown;
|
||||
|
||||
bool AchievementTimerRunning;
|
||||
uint8 AchievementProgress;
|
||||
uint32 AchievementTimer;
|
||||
uint8 uiAchievementProgress;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Phase = 0;
|
||||
//These times are probably wrong
|
||||
SPELL_ICE_NOVA_Timer = 7000;
|
||||
SPELL_FIREBOMB_Timer = 0;
|
||||
SPELL_GRAVITY_WELL_Timer = 15000;
|
||||
Cooldown = 0;
|
||||
uiIceNovaTimer = 7*IN_MILISECONDS;
|
||||
uiFireBombTimer = 0;
|
||||
uiGravityWellTimer = 15*IN_MILISECONDS;
|
||||
uiCooldown = 0;
|
||||
|
||||
FireMagusGUID = 0;
|
||||
FrostMagusGUID = 0;
|
||||
ArcaneMagusGUID = 0;
|
||||
uiFireMagusGUID = 0;
|
||||
uiFrostMagusGUID = 0;
|
||||
uiArcaneMagusGUID = 0;
|
||||
|
||||
AchievementProgress = 0;
|
||||
AchievementTimer = 0;
|
||||
AchievementTimerRunning = false;
|
||||
|
||||
AppearDelay = false;
|
||||
uiAchievementProgress = 0;
|
||||
uiAchievementTimer = 0;
|
||||
|
||||
bIsAchievementTimerRunning = false;
|
||||
bIsWaitingToAppear = false;
|
||||
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
@@ -129,23 +121,12 @@ struct boss_magus_telestraAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (IsHeroic() && AchievementProgress == 2)
|
||||
{
|
||||
AchievementEntry const *AchievSplitPersonality = GetAchievementStore()->LookupEntry(ACHIEV_SPLIT_PERSONALITY);
|
||||
if (AchievSplitPersonality)
|
||||
{
|
||||
Map* pMap = m_creature->GetMap();
|
||||
if (pMap && pMap->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievSplitPersonality);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (IsHeroic() && uiAchievementProgress == 2)
|
||||
pInstance->DoCompleteAchievement(ACHIEV_SPLIT_PERSONALITY);
|
||||
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -155,8 +136,7 @@ struct boss_magus_telestraAI : public ScriptedAI
|
||||
|
||||
uint64 SplitPersonality(uint32 entry)
|
||||
{
|
||||
Creature* Summoned = m_creature->SummonCreature(entry, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
if (Summoned)
|
||||
if (Creature* Summoned = m_creature->SummonCreature(entry, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS))
|
||||
{
|
||||
switch (entry)
|
||||
{
|
||||
@@ -191,147 +171,148 @@ struct boss_magus_telestraAI : public ScriptedAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (AppearDelay)
|
||||
if (bIsWaitingToAppear)
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
m_creature->AttackStop();
|
||||
if (AppearDelay_Timer <= diff)
|
||||
if (uiIsWaitingToAppearTimer <= diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
AppearDelay = false;
|
||||
} else AppearDelay_Timer -= diff;
|
||||
bIsWaitingToAppear = false;
|
||||
} else uiIsWaitingToAppearTimer -= diff;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((Phase == 1)||(Phase == 3))
|
||||
if ((Phase == 1) ||(Phase == 3))
|
||||
{
|
||||
Unit* FireMagus;
|
||||
Unit* FrostMagus;
|
||||
Unit* ArcaneMagus;
|
||||
if (FireMagusGUID)
|
||||
FireMagus = Unit::GetUnit((*m_creature), FireMagusGUID);
|
||||
if (FrostMagusGUID)
|
||||
FrostMagus = Unit::GetUnit((*m_creature), FrostMagusGUID);
|
||||
if (ArcaneMagusGUID)
|
||||
ArcaneMagus = Unit::GetUnit((*m_creature), ArcaneMagusGUID);
|
||||
if (FireMagus && FireMagus->isDead())
|
||||
Unit* pFireMagus;
|
||||
Unit* pFrostMagus;
|
||||
Unit* pArcaneMagus;
|
||||
if (uiFireMagusGUID)
|
||||
pFireMagus = Unit::GetUnit((*m_creature), uiFireMagusGUID);
|
||||
if (uiFrostMagusGUID)
|
||||
pFrostMagus = Unit::GetUnit((*m_creature), uiFrostMagusGUID);
|
||||
if (uiArcaneMagusGUID)
|
||||
pArcaneMagus = Unit::GetUnit((*m_creature), uiArcaneMagusGUID);
|
||||
if (pFireMagus && pFireMagus->isDead())
|
||||
{
|
||||
FireMagusDead = true;
|
||||
if (!AchievementTimerRunning)
|
||||
AchievementTimerRunning = true;
|
||||
bFireMagusDead = true;
|
||||
if (!bIsAchievementTimerRunning)
|
||||
bIsAchievementTimerRunning = true;
|
||||
}
|
||||
if (FrostMagus && FrostMagus->isDead())
|
||||
if (pFrostMagus && pFrostMagus->isDead())
|
||||
{
|
||||
FrostMagusDead = true;
|
||||
if (!AchievementTimerRunning)
|
||||
AchievementTimerRunning = true;
|
||||
bFrostMagusDead = true;
|
||||
if (!bIsAchievementTimerRunning)
|
||||
bIsAchievementTimerRunning = true;
|
||||
}
|
||||
if (ArcaneMagus && ArcaneMagus->isDead())
|
||||
if (pArcaneMagus && pArcaneMagus->isDead())
|
||||
{
|
||||
ArcaneMagusDead = true;
|
||||
if (!AchievementTimerRunning)
|
||||
AchievementTimerRunning = true;
|
||||
bArcaneMagusDead = true;
|
||||
if (!bIsAchievementTimerRunning)
|
||||
bIsAchievementTimerRunning = true;
|
||||
}
|
||||
if (AchievementTimerRunning)
|
||||
AchievementTimer += diff;
|
||||
if (FireMagusDead && FrostMagusDead && ArcaneMagusDead)
|
||||
if (bIsAchievementTimerRunning)
|
||||
uiAchievementTimer += diff;
|
||||
if (bFireMagusDead && bFrostMagusDead && bArcaneMagusDead)
|
||||
{
|
||||
if (AchievementTimer <= ACHIEV_TIMER)
|
||||
AchievementProgress +=1;
|
||||
if (uiAchievementTimer <= ACHIEV_TIMER)
|
||||
uiAchievementProgress +=1;
|
||||
m_creature->GetMotionMaster()->Clear();
|
||||
m_creature->GetMap()->CreatureRelocation(m_creature, CenterOfRoom[0][0], CenterOfRoom[0][1], CenterOfRoom[0][2], CenterOfRoom[0][3]);
|
||||
m_creature->GetMap()->CreatureRelocation(m_creature, CenterOfRoom.GetPositionX(), CenterOfRoom.GetPositionY(), CenterOfRoom.GetPositionZ(), CenterOfRoom.GetOrientation());
|
||||
DoCast(m_creature, SPELL_TELESTRA_BACK);
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
if (Phase == 1)
|
||||
Phase = 2;
|
||||
if (Phase == 3)
|
||||
Phase = 4;
|
||||
FireMagusGUID = 0;
|
||||
FrostMagusGUID = 0;
|
||||
ArcaneMagusGUID = 0;
|
||||
AppearDelay = true;
|
||||
AppearDelay_Timer = 4000;
|
||||
uiFireMagusGUID = 0;
|
||||
uiFrostMagusGUID = 0;
|
||||
uiArcaneMagusGUID = 0;
|
||||
bIsWaitingToAppear = true;
|
||||
uiIsWaitingToAppearTimer = 4*IN_MILISECONDS;
|
||||
DoScriptText(SAY_MERGE, m_creature);
|
||||
AchievementTimerRunning = false;
|
||||
AchievementTimer = 0;
|
||||
}else
|
||||
bIsAchievementTimerRunning = false;
|
||||
uiAchievementTimer = 0;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if ((Phase == 0) && (m_creature->GetHealth() <= (m_creature->GetMaxHealth() * 0.5)))
|
||||
if ((Phase == 0) && HealthBelowPct(50))
|
||||
{
|
||||
Phase = 1;
|
||||
m_creature->CastStop();
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
||||
FrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
||||
ArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
||||
FireMagusDead = false;
|
||||
FrostMagusDead = false;
|
||||
ArcaneMagusDead = false;
|
||||
uiFireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
||||
uiFrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
||||
uiArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
||||
bFireMagusDead = false;
|
||||
bFrostMagusDead = false;
|
||||
bArcaneMagusDead = false;
|
||||
DoScriptText(RAND(SAY_SPLIT_1,SAY_SPLIT_2), m_creature);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsHeroic() && (Phase == 2) && (m_creature->GetHealth() <= (m_creature->GetMaxHealth() * 0.1)))
|
||||
if (IsHeroic() && (Phase == 2) && HealthBelowPct(10))
|
||||
{
|
||||
Phase = 3;
|
||||
m_creature->CastStop();
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
||||
FrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
||||
ArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
||||
FireMagusDead = false;
|
||||
FrostMagusDead = false;
|
||||
ArcaneMagusDead = false;
|
||||
uiFireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
|
||||
uiFrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
|
||||
uiArcaneMagusGUID = SplitPersonality(MOB_ARCANE_MAGUS);
|
||||
bFireMagusDead = false;
|
||||
bFrostMagusDead = false;
|
||||
bArcaneMagusDead = false;
|
||||
DoScriptText(RAND(SAY_SPLIT_1,SAY_SPLIT_2), m_creature);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Cooldown)
|
||||
if (uiCooldown)
|
||||
{
|
||||
if (Cooldown <= diff)
|
||||
Cooldown = 0;
|
||||
if (uiCooldown <= diff)
|
||||
uiCooldown = 0;
|
||||
else
|
||||
{
|
||||
Cooldown -= diff;
|
||||
uiCooldown -= diff;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (SPELL_ICE_NOVA_Timer <= diff)
|
||||
if (uiIceNovaTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_ICE_NOVA_N, SPELL_ICE_NOVA_H));
|
||||
Cooldown = 1500;
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_ICE_NOVA, H_SPELL_ICE_NOVA));
|
||||
uiCooldown = 1.5*IN_MILISECONDS;
|
||||
}
|
||||
SPELL_ICE_NOVA_Timer = 15000;
|
||||
} else SPELL_ICE_NOVA_Timer -=diff;
|
||||
uiIceNovaTimer = 15*IN_MILISECONDS;
|
||||
} else uiIceNovaTimer -= diff;
|
||||
|
||||
if (SPELL_GRAVITY_WELL_Timer <= diff)
|
||||
if (uiGravityWellTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = m_creature->getVictim())
|
||||
{
|
||||
DoCast(pTarget, SPELL_GRAVITY_WELL);
|
||||
Cooldown = 6000;
|
||||
uiCooldown = 6*IN_MILISECONDS;
|
||||
}
|
||||
SPELL_GRAVITY_WELL_Timer = 15000;
|
||||
} else SPELL_GRAVITY_WELL_Timer -=diff;
|
||||
uiGravityWellTimer = 15*IN_MILISECONDS;
|
||||
} else uiGravityWellTimer -= diff;
|
||||
|
||||
if (SPELL_FIREBOMB_Timer <= diff)
|
||||
if (uiFireBombTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_FIREBOMB_N, SPELL_FIREBOMB_H));
|
||||
Cooldown = 2000;
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_FIREBOMB, H_SPELL_FIREBOMB));
|
||||
uiCooldown = 2*IN_MILISECONDS;
|
||||
}
|
||||
SPELL_FIREBOMB_Timer = 2000;
|
||||
} else SPELL_FIREBOMB_Timer -=diff;
|
||||
uiFireBombTimer = 2*IN_MILISECONDS;
|
||||
} else uiFireBombTimer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* Copyright (C) 2008 - 2010 TrinityCore <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
|
||||
@@ -14,41 +15,35 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Ormorok
|
||||
SD%Complete:
|
||||
SDComment:
|
||||
SDCategory: The Nexus, The Nexus
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
#include "nexus.h"
|
||||
|
||||
enum eEnums
|
||||
enum Spells
|
||||
{
|
||||
//Spells
|
||||
SPELL_CRYSTAL_SPIKES_N = 47958, //Don't work, using walkaround
|
||||
SPELL_CRYSTAL_SPIKES_H = 57082, //Don't work, using walkaround
|
||||
//Walkaround for spells Crystal Spikes -----------------
|
||||
SPELL_CRYSTALL_SPIKE_DAMAGE_N = 47944,
|
||||
SPELL_CRYSTALL_SPIKE_DAMAGE_H = 57067,
|
||||
SPELL_CRYSTAL_SPIKE_PREVISUAL = 50442,
|
||||
MOB_CRYSTAL_SPIKE = 27099,
|
||||
//------------------------------------------------------
|
||||
SPELL_SPELL_REFLECTION = 47981,
|
||||
SPELL_TRAMPLE_N = 48016,
|
||||
SPELL_TRAMPLE_H = 57066,
|
||||
SPELL_FRENZY = 48017,
|
||||
SPELL_SUMMON_CRYSTALLINE_TANGLER = 61564, //summons npc 32665
|
||||
MOB_CRYSTALLINE_TANGLER = 32665,
|
||||
SPELL_ROOTS = 28858, //proper spell id is unknown
|
||||
|
||||
//Yell
|
||||
SAY_AGGRO = -1576020,
|
||||
SAY_DEATH = -1576021,
|
||||
SAY_REFLECT = -1576022,
|
||||
SAY_CRYSTAL_SPIKES = -1576023,
|
||||
SAY_KILL = -1576024
|
||||
SPELL_CRYSTAL_SPIKES = 47958, //Don't work, using walkaround
|
||||
H_SPELL_CRYSTAL_SPIKES = 57082, //Don't work, using walkaround
|
||||
SPELL_CRYSTALL_SPIKE_DAMAGE = 47944,
|
||||
H_SPELL_CRYSTALL_SPIKE_DAMAGE = 57067,
|
||||
SPELL_CRYSTAL_SPIKE_PREVISUAL = 50442,
|
||||
MOB_CRYSTAL_SPIKE = 27099,
|
||||
SPELL_SPELL_REFLECTION = 47981,
|
||||
SPELL_TRAMPLE = 48016,
|
||||
H_SPELL_TRAMPLE = 57066,
|
||||
SPELL_FRENZY = 48017,
|
||||
SPELL_SUMMON_CRYSTALLINE_TANGLER = 61564, //summons npc 32665
|
||||
SPELL_ROOTS = 28858 //proper spell id is unknown
|
||||
};
|
||||
enum Yells
|
||||
{
|
||||
SAY_AGGRO = -1576020,
|
||||
SAY_DEATH = -1576021,
|
||||
SAY_REFLECT = -1576022,
|
||||
SAY_CRYSTAL_SPIKES = -1576023,
|
||||
SAY_KILL = -1576024
|
||||
};
|
||||
enum Creatures
|
||||
{
|
||||
MOB_CRYSTALLINE_TANGLER = 32665
|
||||
};
|
||||
|
||||
#define SPIKE_DISTANCE 5.0f
|
||||
@@ -62,30 +57,30 @@ struct boss_ormorokAI : public ScriptedAI
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
bool Frenzy;
|
||||
bool CrystalSpikes;
|
||||
uint8 CrystalSpikes_Count;
|
||||
float BaseX;
|
||||
float BaseY;
|
||||
float BaseZ;
|
||||
float BaseO;
|
||||
float SpikeXY[4][2];
|
||||
bool bFrenzy;
|
||||
bool bCrystalSpikes;
|
||||
uint8 uiCrystalSpikesCount;
|
||||
float fBaseX;
|
||||
float fBaseY;
|
||||
float fBaseZ;
|
||||
float fBaseO;
|
||||
float fSpikeXY[4][2];
|
||||
|
||||
uint32 SPELL_CRYSTAL_SPIKES_Timer;
|
||||
uint32 CRYSTAL_SPIKES_Timer;
|
||||
uint32 SPELL_TRAMPLE_Timer;
|
||||
uint32 SPELL_FRENZY_Timer;
|
||||
uint32 SPELL_SPELL_REFLECTION_Timer;
|
||||
uint32 SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer;
|
||||
uint32 uiCrystalSpikesTimer;
|
||||
uint32 uiCrystalSpikesTimer2;
|
||||
uint32 uiTrampleTimer;
|
||||
uint32 uiFrenzyTimer;
|
||||
uint32 uiSpellReflectionTimer;
|
||||
uint32 uiSummonCrystallineTanglerTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SPELL_CRYSTAL_SPIKES_Timer = 12000;
|
||||
SPELL_TRAMPLE_Timer = 10000;
|
||||
SPELL_SPELL_REFLECTION_Timer = 30000;
|
||||
SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer = 17000;
|
||||
Frenzy = false;
|
||||
CrystalSpikes = false;
|
||||
uiCrystalSpikesTimer = 12*IN_MILISECONDS;
|
||||
uiTrampleTimer = 10*IN_MILISECONDS;
|
||||
uiSpellReflectionTimer = 30*IN_MILISECONDS;
|
||||
uiSummonCrystallineTanglerTimer = 17*IN_MILISECONDS;
|
||||
bFrenzy = false;
|
||||
bCrystalSpikes = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ORMOROK_EVENT, NOT_STARTED);
|
||||
@@ -118,57 +113,57 @@ struct boss_ormorokAI : public ScriptedAI
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (CrystalSpikes)
|
||||
if (CRYSTAL_SPIKES_Timer <= diff)
|
||||
if (bCrystalSpikes)
|
||||
if (uiCrystalSpikesTimer2 <= diff)
|
||||
{
|
||||
SpikeXY[0][0] = BaseX+(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO));
|
||||
SpikeXY[0][1] = BaseY+(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO));
|
||||
SpikeXY[1][0] = BaseX-(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO));
|
||||
SpikeXY[1][1] = BaseY-(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO));
|
||||
SpikeXY[2][0] = BaseX+(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO-(M_PI/2)));
|
||||
SpikeXY[2][1] = BaseY+(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO-(M_PI/2)));
|
||||
SpikeXY[3][0] = BaseX-(SPIKE_DISTANCE*CrystalSpikes_Count*cos(BaseO-(M_PI/2)));
|
||||
SpikeXY[3][1] = BaseY-(SPIKE_DISTANCE*CrystalSpikes_Count*sin(BaseO-(M_PI/2)));
|
||||
fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO));
|
||||
fSpikeXY[0][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO));
|
||||
fSpikeXY[1][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO));
|
||||
fSpikeXY[1][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO));
|
||||
fSpikeXY[2][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[2][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO-(M_PI/2)));
|
||||
fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO-(M_PI/2)));
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
Creature* Spike = m_creature->SummonCreature(MOB_CRYSTAL_SPIKE, SpikeXY[i][0], SpikeXY[i][1], BaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7000);
|
||||
if (++CrystalSpikes_Count >= 13)
|
||||
CrystalSpikes = false;
|
||||
CRYSTAL_SPIKES_Timer = 200;
|
||||
} else CRYSTAL_SPIKES_Timer -= diff;
|
||||
Creature* Spike = m_creature->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILISECONDS);
|
||||
if (++uiCrystalSpikesCount >= 13)
|
||||
bCrystalSpikes = false;
|
||||
uiCrystalSpikesTimer2 = 200;
|
||||
} else uiCrystalSpikesTimer2 -= diff;
|
||||
|
||||
if (!Frenzy && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
||||
if (!bFrenzy && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25))
|
||||
{
|
||||
DoCast(m_creature, SPELL_FRENZY);
|
||||
Frenzy = true;
|
||||
bFrenzy = true;
|
||||
}
|
||||
|
||||
if (SPELL_TRAMPLE_Timer <= diff)
|
||||
if (uiTrampleTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, DUNGEON_MODE(SPELL_TRAMPLE_N, SPELL_TRAMPLE_H));
|
||||
SPELL_TRAMPLE_Timer = 10000;
|
||||
} else SPELL_TRAMPLE_Timer -= diff;
|
||||
DoCast(m_creature, DUNGEON_MODE(SPELL_TRAMPLE, H_SPELL_TRAMPLE));
|
||||
uiTrampleTimer = 10*IN_MILISECONDS;
|
||||
} else uiTrampleTimer -= diff;
|
||||
|
||||
if (SPELL_SPELL_REFLECTION_Timer <= diff)
|
||||
if (uiSpellReflectionTimer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_REFLECT, m_creature);
|
||||
DoCast(m_creature, SPELL_SPELL_REFLECTION);
|
||||
SPELL_SPELL_REFLECTION_Timer = 30000;
|
||||
} else SPELL_SPELL_REFLECTION_Timer -= diff;
|
||||
uiSpellReflectionTimer = 30*IN_MILISECONDS;
|
||||
} else uiSpellReflectionTimer -= diff;
|
||||
|
||||
if (SPELL_CRYSTAL_SPIKES_Timer <= diff)
|
||||
if (uiCrystalSpikesTimer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_CRYSTAL_SPIKES, m_creature);
|
||||
CrystalSpikes = true;
|
||||
CrystalSpikes_Count = 1;
|
||||
CRYSTAL_SPIKES_Timer = 0;
|
||||
BaseX = m_creature->GetPositionX();
|
||||
BaseY = m_creature->GetPositionY();
|
||||
BaseZ = m_creature->GetPositionZ();
|
||||
BaseO = m_creature->GetOrientation();
|
||||
SPELL_CRYSTAL_SPIKES_Timer = 20000;
|
||||
} else SPELL_CRYSTAL_SPIKES_Timer -=diff;
|
||||
bCrystalSpikes = true;
|
||||
uiCrystalSpikesCount = 1;
|
||||
uiCrystalSpikesTimer2 = 0;
|
||||
fBaseX = m_creature->GetPositionX();
|
||||
fBaseY = m_creature->GetPositionY();
|
||||
fBaseZ = m_creature->GetPositionZ();
|
||||
fBaseO = m_creature->GetOrientation();
|
||||
uiCrystalSpikesTimer = 20*IN_MILISECONDS;
|
||||
} else uiCrystalSpikesTimer -= diff;
|
||||
|
||||
if (IsHeroic() && (SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer <= diff))
|
||||
if (IsHeroic() && (uiSummonCrystallineTanglerTimer <= diff))
|
||||
{
|
||||
Creature* Crystalline_Tangler = m_creature->SummonCreature(MOB_CRYSTALLINE_TANGLER, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
if (Crystalline_Tangler)
|
||||
@@ -205,8 +200,8 @@ struct boss_ormorokAI : public ScriptedAI
|
||||
Crystalline_Tangler->getThreatManager().addThreat(pTarget, 1000000000.0f);
|
||||
}
|
||||
}
|
||||
SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer = 17000;
|
||||
} else SPELL_SUMMON_CRYSTALLINE_TANGLER_Timer -=diff;
|
||||
uiSummonCrystallineTanglerTimer = 17*IN_MILISECONDS;
|
||||
} else uiSummonCrystallineTanglerTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -218,32 +213,28 @@ struct mob_crystal_spikeAI : public Scripted_NoMovementAI
|
||||
{
|
||||
}
|
||||
|
||||
uint32 SPELL_CRYSTALL_SPIKE_DAMAGE_Timer;
|
||||
uint32 SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer;
|
||||
uint32 SpellCrystalSpikeDamageTimer;
|
||||
uint32 SpellCrystalSpikePrevisualTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SPELL_CRYSTALL_SPIKE_DAMAGE_Timer = 3700;
|
||||
SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer = 1000;
|
||||
m_creature->SetLevel(80); //
|
||||
m_creature->setFaction(16); //Walkaround to be independent from data in DB
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); //
|
||||
SpellCrystalSpikeDamageTimer = 3.7*IN_MILISECONDS;
|
||||
SpellCrystalSpikePrevisualTimer = 1*IN_MILISECONDS;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer <= diff)
|
||||
if (SpellCrystalSpikePrevisualTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_CRYSTAL_SPIKE_PREVISUAL);
|
||||
SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer = 10000;
|
||||
} else SPELL_CRYSTAL_SPIKE_PREVISUAL_Timer -=diff;
|
||||
SpellCrystalSpikePrevisualTimer = 10*IN_MILISECONDS;
|
||||
} else SpellCrystalSpikePrevisualTimer -= diff;
|
||||
|
||||
if (SPELL_CRYSTALL_SPIKE_DAMAGE_Timer <= diff)
|
||||
if (SpellCrystalSpikeDamageTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, DUNGEON_MODE(SPELL_CRYSTALL_SPIKE_DAMAGE_N, SPELL_CRYSTALL_SPIKE_DAMAGE_H));
|
||||
SPELL_CRYSTALL_SPIKE_DAMAGE_Timer = 10000;
|
||||
} else SPELL_CRYSTALL_SPIKE_DAMAGE_Timer -=diff;
|
||||
DoCast(m_creature, DUNGEON_MODE(SPELL_CRYSTALL_SPIKE_DAMAGE, H_SPELL_CRYSTALL_SPIKE_DAMAGE));
|
||||
SpellCrystalSpikeDamageTimer = 10*IN_MILISECONDS;
|
||||
} else SpellCrystalSpikeDamageTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -251,23 +242,23 @@ struct mob_crystalline_tanglerAI : public ScriptedAI
|
||||
{
|
||||
mob_crystalline_tanglerAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 SPELL_ROOTS_Timer;
|
||||
uint32 uiRootsTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SPELL_ROOTS_Timer = 1000;
|
||||
uiRootsTimer = 1*IN_MILISECONDS;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (SPELL_ROOTS_Timer <= diff)
|
||||
if (uiRootsTimer <= diff)
|
||||
{
|
||||
if (m_creature->IsWithinDist(m_creature->getVictim(), 5.0f, false))
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ROOTS);
|
||||
SPELL_ROOTS_Timer = 15000;
|
||||
uiRootsTimer = 15*IN_MILISECONDS;
|
||||
}
|
||||
} else SPELL_ROOTS_Timer -=diff;
|
||||
} else uiRootsTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* Copyright (C) 2008 - 2010 TrinityCore <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
|
||||
@@ -14,13 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Instance_Nexus
|
||||
SD%Complete:
|
||||
SDComment:
|
||||
SDCategory: The Nexus, The Nexus
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
#include "nexus.h"
|
||||
|
||||
@@ -46,6 +40,7 @@ struct instance_nexus : public ScriptedInstance
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
Anomalus = 0;
|
||||
Keristrasza = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature *pCreature, bool bAdd)
|
||||
@@ -69,35 +64,30 @@ struct instance_nexus : public ScriptedInstance
|
||||
// Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs.
|
||||
case 26800:
|
||||
{
|
||||
pCreature->setFaction(16);
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
pCreature->UpdateEntry(26799, HORDE);
|
||||
break;
|
||||
}
|
||||
case 26802:
|
||||
{
|
||||
pCreature->setFaction(16);
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
pCreature->UpdateEntry(26801, HORDE);
|
||||
break;
|
||||
}
|
||||
case 26805:
|
||||
{
|
||||
pCreature->setFaction(16);
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
pCreature->UpdateEntry(26803, HORDE);
|
||||
break;
|
||||
}
|
||||
case 27949:
|
||||
{
|
||||
pCreature->setFaction(16);
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
pCreature->UpdateEntry(27947, HORDE);
|
||||
break;
|
||||
}
|
||||
case 26796:
|
||||
{
|
||||
pCreature->setFaction(16);
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
pCreature->UpdateEntry(26798, HORDE);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user