aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-10-04 19:39:09 -0500
committerSubv <s.v.h21@hotmail.com>2012-10-04 19:39:09 -0500
commitf7d3600e7e7ffaba971b77e4371a705e55593cfd (patch)
tree2d4e898bb4e09ede5dba97918741597da6fd2d2e /src/server/scripts/Northrend
parentd2437407f4f7ad1af3baeb351626b41bd700065c (diff)
parent74707a08d3d63dc66e7b6943431c91f50258b0f9 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts: src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp214
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp19
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp43
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp12
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp6
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp35
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp2
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp16
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp45
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp13
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp83
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp303
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.h13
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp2
16 files changed, 580 insertions, 232 deletions
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
index 89064a5d18c..ebab2cb99a9 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
@@ -15,10 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Comment: Find correct mushrooms spell to make them visible - buffs of the mushrooms not ever applied to the users...
- */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ahnkahet.h"
@@ -34,12 +30,24 @@ enum Spells
SPELL_POISONOUS_MUSHROOM_VISUAL_AREA = 61566, // Self
SPELL_POISONOUS_MUSHROOM_VISUAL_AURA = 56741, // Self
SPELL_PUTRID_MUSHROOM = 31690, // To make the mushrooms visible
+ SPELL_POWER_MUSHROOM_VISUAL_AURA = 56740,
};
enum Creatures
{
- NPC_HEALTHY_MUSHROOM = 30391,
- NPC_POISONOUS_MUSHROOM = 30435
+ NPC_HEALTHY_MUSHROOM = 30391,
+ NPC_POISONOUS_MUSHROOM = 30435,
+ NPC_TRIGGER = 19656
+};
+
+enum event
+{
+ EVENT_SPAWN = 1,
+ EVENT_MINI,
+ EVENT_ROOT,
+ EVENT_BASH,
+ EVENT_BOLT,
+ EVENT_AURA
};
class boss_amanitar : public CreatureScript
@@ -47,110 +55,118 @@ class boss_amanitar : public CreatureScript
public:
boss_amanitar() : CreatureScript("boss_amanitar") { }
- struct boss_amanitarAI : public ScriptedAI
+ struct boss_amanitarAI : public BossAI
{
- boss_amanitarAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- bFirstTime = true;
- }
-
- InstanceScript* instance;
-
- uint32 uiRootTimer;
- uint32 uiBashTimer;
- uint32 uiBoltTimer;
- uint32 uiSpawnTimer;
-
- bool bFirstTime;
-
+ boss_amanitarAI(Creature* creature) : BossAI(creature, DATA_AMANITAR) { }
+
void Reset()
{
- uiRootTimer = urand(5*IN_MILLISECONDS, 9*IN_MILLISECONDS);
- uiBashTimer = urand(10*IN_MILLISECONDS, 14*IN_MILLISECONDS);
- uiBoltTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- uiSpawnTimer = 0;
-
+ _Reset();
+
me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
- me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+ summons.DespawnAll();
if (instance)
{
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
- if (!bFirstTime)
- instance->SetData(DATA_AMANITAR_EVENT, FAIL);
- else
- bFirstTime = false;
+ instance->SetData(DATA_AMANITAR_EVENT, NOT_STARTED);
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*Killer*/)
{
if (instance)
{
+ _JustDied();
instance->SetData(DATA_AMANITAR_EVENT, DONE);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
+ summons.DespawnAll();
}
}
void EnterCombat(Unit* /*who*/)
{
+ _EnterCombat();
+
+ events.ScheduleEvent(EVENT_ROOT, urand(5,9)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_BASH, urand(10,14)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_BOLT, urand(15,20)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MINI, urand(12,18)*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SPAWN, 5 *IN_MILLISECONDS);
+
+ me->SetInCombatWithZone();
if (instance)
instance->SetData(DATA_AMANITAR_EVENT, IN_PROGRESS);
-
- DoCast(me, SPELL_MINI, false);
}
void SpawnAdds()
{
+ uint8 u = 0;
+
for (uint8 i = 0; i < 30; ++i)
{
- Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ Position pos;
+ me->GetPosition(&pos);
+ me->GetRandomNearPosition(pos, 30.0f);
+ pos.m_positionZ = me->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), MAX_HEIGHT) + 2.0f;
- if (victim)
+ if (Creature* trigger = me->SummonCreature(NPC_TRIGGER, pos))
{
- Position pos;
- victim->GetPosition(&pos);
- me->GetRandomNearPosition(pos, float(urand(5, 80)));
- me->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILLISECONDS);
- me->GetRandomNearPosition(pos, float(urand(5, 80)));
- me->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILLISECONDS);
+ Creature* temp1 = trigger->FindNearestCreature(NPC_HEALTHY_MUSHROOM, 4.0f, true);
+ Creature* temp2 = trigger->FindNearestCreature(NPC_POISONOUS_MUSHROOM, 4.0f, true);
+ if (temp1 || temp2)
+ {
+ trigger->DisappearAndDie();
+ }
+ else
+ {
+ u = 1 - u;
+ trigger->DisappearAndDie();
+ me->SummonCreature(u > 0 ? NPC_POISONOUS_MUSHROOM : NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60*IN_MILLISECONDS);
+ }
}
}
}
void UpdateAI(const uint32 diff)
{
- //Return since we have no target
if (!UpdateVictim())
return;
- if (uiSpawnTimer <= diff)
- {
- SpawnAdds();
- uiSpawnTimer = urand(35*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else uiSpawnTimer -= diff;
-
- if (uiRootTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- DoCast(target, SPELL_ENTANGLING_ROOTS);
- uiRootTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else uiRootTimer -= diff;
+ events.Update(diff);
- if (uiBashTimer <= diff)
- {
- DoCastVictim(SPELL_BASH);
- uiBashTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else uiBashTimer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (uiBoltTimer <= diff)
+ while (uint32 eventId = events.ExecuteEvent())
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- DoCast(target, SPELL_VENOM_BOLT_VOLLEY);
- uiBoltTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else uiBoltTimer -= diff;
-
+ switch (eventId)
+ {
+ case EVENT_SPAWN:
+ SpawnAdds();
+ events.ScheduleEvent(EVENT_SPAWN, 20*IN_MILLISECONDS);
+ break;
+ case EVENT_MINI:
+ DoCast(SPELL_MINI);
+ events.ScheduleEvent(EVENT_MINI, urand(25,30)*IN_MILLISECONDS);
+ break;
+ case EVENT_ROOT:
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_ENTANGLING_ROOTS,true);
+ events.ScheduleEvent(EVENT_ROOT, urand(10,15)*IN_MILLISECONDS);
+ break;
+ case EVENT_BASH:
+ DoCastVictim(SPELL_BASH);
+ events.ScheduleEvent(EVENT_BASH, urand(7,12)*IN_MILLISECONDS);
+ break;
+ case EVENT_BOLT:
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_VENOM_BOLT_VOLLEY,true);
+ events.ScheduleEvent(EVENT_BOLT, urand(18,22)*IN_MILLISECONDS);
+ break;
+ default:
+ break;
+ }
+ }
DoMeleeAttackIfReady();
}
};
@@ -170,30 +186,26 @@ public:
{
mob_amanitar_mushroomsAI(Creature* creature) : Scripted_NoMovementAI(creature) {}
- uint32 uiAuraTimer;
- uint32 uiDeathTimer;
+ EventMap events;
void Reset()
{
- DoCast(me, SPELL_PUTRID_MUSHROOM, true); // Hack, to make the mushrooms visible, can't find orig. spell...
+ events.Reset();
+ events.ScheduleEvent(EVENT_AURA, 1*IN_MILLISECONDS);
+
+ me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
+ DoCast(SPELL_PUTRID_MUSHROOM);
if (me->GetEntry() == NPC_POISONOUS_MUSHROOM)
- DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AURA, true);
-
- uiAuraTimer = 0;
- uiDeathTimer = 30*IN_MILLISECONDS;
+ DoCast(SPELL_POISONOUS_MUSHROOM_VISUAL_AURA);
+ else
+ DoCast(SPELL_POWER_MUSHROOM_VISUAL_AURA);
}
- void JustDied(Unit* killer)
+ void DamageTaken(Unit* /*attacker*/, uint32 &damage)
{
- if (!killer)
- return;
-
- if (me->GetEntry() == NPC_HEALTHY_MUSHROOM && killer->GetTypeId() == TYPEID_PLAYER)
- {
- me->InterruptNonMeleeSpells(false);
- DoCast(killer, SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS, false);
- }
+ if (damage >= me->GetHealth() && me->GetEntry() == NPC_HEALTHY_MUSHROOM)
+ DoCast(me, SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS, true);
}
void EnterCombat(Unit* /*who*/) {}
@@ -201,18 +213,30 @@ public:
void UpdateAI(const uint32 diff)
{
- if (me->GetEntry() == NPC_POISONOUS_MUSHROOM)
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- if (uiAuraTimer <= diff)
+ switch (eventId)
{
- DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true);
- DoCast(me, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD, false);
- uiAuraTimer = 7*IN_MILLISECONDS;
- } else uiAuraTimer -= diff;
+ case EVENT_AURA:
+ if (me->GetEntry() == NPC_POISONOUS_MUSHROOM)
+ {
+ DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true);
+ DoCast(me, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD);
+ }
+ events.ScheduleEvent(EVENT_AURA, 7*IN_MILLISECONDS);
+ break;
+ default:
+ break;
+ }
}
- if (uiDeathTimer <= diff)
- me->DisappearAndDie();
- else uiDeathTimer -= diff;
}
};
@@ -224,6 +248,6 @@ public:
void AddSC_boss_amanitar()
{
- new boss_amanitar;
- new mob_amanitar_mushrooms;
-}
+ new boss_amanitar();
+ new mob_amanitar_mushrooms();
+} \ No newline at end of file
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
index e81d58b4ef3..3a937942118 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
@@ -44,16 +44,13 @@ enum Creatures
MOB_TWISTED_VISAGE = 30625
};
-//not in db
+
enum Yells
{
- SAY_AGGRO = -1619030,
- SAY_SLAY_1 = -1619031,
- SAY_SLAY_2 = -1619032,
- SAY_SLAY_3 = -1619033,
- SAY_DEATH_1 = -1619034,
- SAY_DEATH_2 = -1619035,
- SAY_PHASE = -1619036
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2,
+ SAY_PHASE = 3
};
enum Achievements
@@ -177,7 +174,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
if (instance)
{
@@ -300,7 +297,7 @@ public:
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH_1, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_HERALD_VOLAZJ, DONE);
@@ -311,7 +308,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);
+ Talk(SAY_SLAY);
}
};
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
index 7c167fb9c27..02dcc04abd6 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -23,22 +23,15 @@
#include "ScriptedCreature.h"
#include "ahnkahet.h"
+
enum Yells
{
- TEXT_AGGRO = -1619000,
- TEXT_SACRIFICE_1_1 = -1619001,
- TEXT_SACRIFICE_1_2 = -1619002,
- TEXT_SACRIFICE_2_1 = -1619003,
- TEXT_SACRIFICE_2_2 = -1619004,
- TEXT_SLAY_1 = -1619005,
- TEXT_SLAY_2 = -1619006,
- TEXT_SLAY_3 = -1619007,
- TEXT_DEATH = -1619008,
- TEXT_PREACHING_1 = -1619009,
- TEXT_PREACHING_2 = -1619010,
- TEXT_PREACHING_3 = -1619011,
- TEXT_PREACHING_4 = -1619012,
- TEXT_PREACHING_5 = -1619013
+ TEXT_AGGRO = 0,
+ TEXT_SACRIFICE_1 = 1,
+ TEXT_SACRIFICE_2 = 2,
+ TEXT_SLAY = 3,
+ TEXT_DEATH = 4,
+ TEXT_PREACHING = 5
};
enum Spells
@@ -129,7 +122,7 @@ public:
if (!instance || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_JEDOGA_CONTROLLER))
return;
- DoScriptText(TEXT_AGGRO, me);
+ Talk(TEXT_AGGRO);
me->SetInCombatWithZone();
instance->SetData(DATA_JEDOGA_SHADOWSEEKER_EVENT, IN_PROGRESS);
}
@@ -147,12 +140,12 @@ public:
if (!Victim || Victim->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(RAND(TEXT_SLAY_1, TEXT_SLAY_2, TEXT_SLAY_3), me);
+ Talk(TEXT_SLAY);
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(TEXT_DEATH, me);
+ Talk(TEXT_DEATH);
if (instance)
instance->SetData(DATA_JEDOGA_SHADOWSEEKER_EVENT, DONE);
}
@@ -178,7 +171,7 @@ public:
if (!bPreDone && who->GetTypeId() == TYPEID_PLAYER && me->GetDistance(who) < 100.0f)
{
- DoScriptText(RAND(TEXT_PREACHING_1, TEXT_PREACHING_2, TEXT_PREACHING_3, TEXT_PREACHING_4, TEXT_PREACHING_5), me);
+ Talk(TEXT_PREACHING);
bPreDone = true;
}
@@ -270,7 +263,7 @@ public:
if (opfer)
{
- DoScriptText(RAND(TEXT_SACRIFICE_1_1, TEXT_SACRIFICE_1_2), me);
+ Talk(TEXT_SACRIFICE_1);
instance->SetData64(DATA_ADD_JEDOGA_OPFER, opfer);
} else
bCanDown = true;
@@ -278,7 +271,7 @@ public:
void Opfern()
{
- DoScriptText(RAND(TEXT_SACRIFICE_2_1, TEXT_SACRIFICE_2_2), me);
+ Talk(TEXT_SACRIFICE_2);
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_GIFT_OF_THE_HERALD, false);
@@ -534,11 +527,11 @@ public:
{
npc_jedogas_aufseher_triggerAI(Creature* creature) : Scripted_NoMovementAI(creature)
{
- instance = creature->GetInstanceScript();
- bRemoved = false;
- bRemoved2 = false;
- bCasted = false;
- bCasted2 = false;
+ instance = creature->GetInstanceScript();
+ bRemoved = false;
+ bRemoved2 = false;
+ bCasted = false;
+ bCasted2 = false;
}
InstanceScript* instance;
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index f8e2fc0f99f..4729f68680e 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -140,8 +140,8 @@ public:
{
float angle, x, y;
angle = pSpheres[0]->GetAngle(pSphereTarget);
- x = pSpheres[0]->GetPositionX() + DATA_SPHERE_DISTANCE * cos(angle);
- y = pSpheres[0]->GetPositionY() + DATA_SPHERE_DISTANCE * sin(angle);
+ x = pSpheres[0]->GetPositionX() + DATA_SPHERE_DISTANCE * std::cos(angle);
+ y = pSpheres[0]->GetPositionY() + DATA_SPHERE_DISTANCE * std::sin(angle);
pSpheres[0]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[0]->GetPositionZ());
}
if (IsHeroic())
@@ -154,12 +154,12 @@ public:
{
float angle, x, y;
angle = pSpheres[1]->GetAngle(pSphereTarget) + DATA_SPHERE_ANGLE_OFFSET;
- x = pSpheres[1]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * cos(angle);
- y = pSpheres[1]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * sin(angle);
+ x = pSpheres[1]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle);
+ y = pSpheres[1]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle);
pSpheres[1]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[1]->GetPositionZ());
angle = pSpheres[2]->GetAngle(pSphereTarget) - DATA_SPHERE_ANGLE_OFFSET;
- x = pSpheres[2]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * cos(angle);
- y = pSpheres[2]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * sin(angle);
+ x = pSpheres[2]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle);
+ y = pSpheres[2]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle);
pSpheres[2]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[2]->GetPositionZ());
}
}
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index dcf1338bc74..3bc91855d36 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -25,10 +25,8 @@ enum Spells
SPELL_SUMMON_CARRION_BEETLES = 53521,
SPELL_LEECHING_SWARM = 53467,
SPELL_POUND = 53472,
- SPELL_POUND_H = 59433,
SPELL_SUBMERGE = 53421,
SPELL_IMPALE_DMG = 53454,
- SPELL_IMPALE_DMG_H = 59446,
SPELL_IMPALE_SHAKEGROUND = 53455,
SPELL_IMPALE_SPIKE = 53539, //this is not the correct visual effect
//SPELL_IMPALE_TARGET = 53458,
@@ -211,7 +209,7 @@ public:
break;
case IMPALE_PHASE_DMG:
if (Creature* impaleTarget = Unit::GetCreature(*me, ImpaleTarget))
- me->CastSpell(impaleTarget, DUNGEON_MODE(SPELL_IMPALE_DMG, SPELL_IMPALE_DMG_H), true);
+ me->CastSpell(impaleTarget, SPELL_IMPALE_DMG, true);
ImpalePhase = IMPALE_PHASE_TARGET;
ImpaleTimer = 9*IN_MILLISECONDS;
break;
@@ -328,7 +326,7 @@ public:
if (Unit* target = me->getVictim())
{
if (Creature* pImpaleTarget = DoSummonImpaleTarget(target))
- me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false);
+ me->CastSpell(pImpaleTarget, SPELL_POUND, false);
}
PoundTimer = 16500;
} else PoundTimer -= diff;
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
index c4008564029..61d693104fa 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_saviana_ragefire.cpp
@@ -42,6 +42,8 @@ enum Events
EVENT_FLIGHT = 2,
EVENT_FLAME_BREATH = 3,
EVENT_CONFLAGRATION = 4,
+ EVENT_LAND_GROUND = 5,
+ EVENT_AIR_MOVEMENT = 6,
// Event group
EVENT_GROUP_LAND_PHASE = 1,
@@ -51,6 +53,8 @@ enum MovementPoints
{
POINT_FLIGHT = 1,
POINT_LAND = 2,
+ POINT_TAKEOFF = 3,
+ POINT_LAND_GROUND = 4
};
enum Misc
@@ -58,8 +62,9 @@ enum Misc
SOUND_ID_DEATH = 17531,
};
-Position const SavianaRagefireFlyPos = {3155.51f, 683.844f, 95.20f, 4.69f};
-Position const SavianaRagefireLandPos = {3151.07f, 636.443f, 79.54f, 4.69f};
+Position const SavianaRagefireFlyOutPos = {3155.51f, 683.844f, 95.0f, 4.69f};
+Position const SavianaRagefireFlyInPos = {3151.07f, 636.443f, 79.540f, 4.69f};
+Position const SavianaRagefireLandPos = {3151.07f, 636.443f, 78.649f, 4.69f};
class boss_saviana_ragefire : public CreatureScript
{
@@ -96,7 +101,7 @@ class boss_saviana_ragefire : public CreatureScript
void MovementInform(uint32 type, uint32 point)
{
- if (type != POINT_MOTION_TYPE)
+ if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
return;
switch (point)
@@ -106,13 +111,18 @@ class boss_saviana_ragefire : public CreatureScript
Talk(SAY_CONFLAGRATION);
break;
case POINT_LAND:
+ events.ScheduleEvent(EVENT_LAND_GROUND, 1);
+ break;
+ case POINT_LAND_GROUND:
me->SetCanFly(false);
me->SetDisableGravity(false);
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_AGGRESSIVE);
- if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
- me->GetMotionMaster()->MovementExpired();
DoStartMovement(me->getVictim());
break;
+ case POINT_TAKEOFF:
+ events.ScheduleEvent(EVENT_AIR_MOVEMENT, 1);
+ break;
default:
break;
}
@@ -149,8 +159,13 @@ class boss_saviana_ragefire : public CreatureScript
{
me->SetCanFly(true);
me->SetDisableGravity(true);
+ me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_PASSIVE);
- me->GetMotionMaster()->MovePoint(POINT_FLIGHT, SavianaRagefireFlyPos);
+ me->AttackStop();
+ Position pos;
+ pos.Relocate(me);
+ pos.m_positionZ += 10.0f;
+ me->GetMotionMaster()->MoveTakeoff(POINT_TAKEOFF, pos);
events.ScheduleEvent(EVENT_FLIGHT, 50000);
events.DelayEvents(12500, EVENT_GROUP_LAND_PHASE);
break;
@@ -167,6 +182,12 @@ class boss_saviana_ragefire : public CreatureScript
DoCastVictim(SPELL_FLAME_BREATH);
events.ScheduleEvent(EVENT_FLAME_BREATH, urand(20000, 30000), EVENT_GROUP_LAND_PHASE);
break;
+ case EVENT_AIR_MOVEMENT:
+ me->GetMotionMaster()->MovePoint(POINT_FLIGHT, SavianaRagefireFlyOutPos);
+ break;
+ case EVENT_LAND_GROUND:
+ me->GetMotionMaster()->MoveLand(POINT_LAND_GROUND, SavianaRagefireLandPos);
+ break;
default:
break;
}
@@ -243,7 +264,7 @@ class spell_saviana_conflagration_throwback : public SpellScriptLoader
{
PreventHitDefaultEffect(effIndex);
GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
- GetHitUnit()->GetMotionMaster()->MovePoint(POINT_LAND, SavianaRagefireLandPos);
+ GetHitUnit()->GetMotionMaster()->MovePoint(POINT_LAND, SavianaRagefireFlyInPos);
}
void Register()
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 6e7e3c49ef8..1b12f17ce64 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -1585,7 +1585,7 @@ class spell_valanar_kinetic_bomb_absorb : public SpellScriptLoader
void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
{
- absorbAmount = CalculatePctN(dmgInfo.GetDamage(), aurEff->GetAmount());
+ absorbAmount = CalculatePct(dmgInfo.GetDamage(), aurEff->GetAmount());
RoundToInterval<uint32>(absorbAmount, 0, dmgInfo.GetDamage());
dmgInfo.AbsorbDamage(absorbAmount);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 7f6448382ba..64f49c6e0e7 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -722,7 +722,7 @@ class npc_putricide_oozeAI : public ScriptedAI
{
public:
npc_putricide_oozeAI(Creature* creature, uint32 hitTargetSpellId) : ScriptedAI(creature),
- _newTargetSelectTimer(0), _hitTargetSpellId(hitTargetSpellId)
+ _hitTargetSpellId(hitTargetSpellId), _newTargetSelectTimer(0)
{
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index 5e6dcbcd66e..af0ca6b3a3f 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -207,9 +207,7 @@ class mob_chaotic_rift : public CreatureScript
{
uiChaoticEnergyBurstTimer = 1000;
uiSummonCrazedManaWraithTimer = 5000;
- //me->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
+ me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
DoCast(me, SPELL_ARCANEFORM, false);
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index 9f9223f0161..eb0b3692f01 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -129,14 +129,14 @@ public:
{
if (uiCrystalSpikesTimer2 <= diff)
{
- 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)));
+ fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO));
+ fSpikeXY[0][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO));
+ fSpikeXY[1][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO));
+ fSpikeXY[1][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO));
+ fSpikeXY[2][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO-(M_PI/2)));
+ fSpikeXY[2][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO-(M_PI/2)));
+ fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO-(M_PI/2)));
+ fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO-(M_PI/2)));
for (uint8 i = 0; i < 4; ++i)
me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILLISECONDS);
if (++uiCrystalSpikesCount >= 13)
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index 270e31f4350..c691db4230c 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -68,51 +68,6 @@ enum Actions
ACTION_SET_NORMAL_EVENTS = 1
};
-/*Ruby Drake,
-(npc 27756) (item 37860)
-(summoned by spell Ruby Essence = 37860 ---> Call Amber Drake == 49462 ---> Summon 27756)
-*/
-enum RubyDrake
-{
- NPC_RUBY_DRAKE_VEHICLE = 27756,
- SPELL_RIDE_RUBY_DRAKE_QUE = 49463, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49464
- SPELL_RUBY_DRAKE_SADDLE = 49464, //Allows you to ride on the back of an Amber Drake. ---> Dummy
- SPELL_RUBY_SEARING_WRATH = 50232, //(60 yds) - Instant - Breathes a stream of fire at an enemy dragon, dealing 6800 to 9200 Fire damage and then jumping to additional dragons within 30 yards. Each jump increases the damage by 50%. Affects up to 5 total targets
- SPELL_RUBY_EVASIVE_AURA = 50248, //Instant - Allows the Ruby Drake to generate Evasive Charges when hit by hostile attacks and spells.
- SPELL_RUBY_EVASIVE_MANEUVERS = 50240, //Instant - 5 sec. cooldown - Allows your drake to dodge all incoming attacks and spells. Requires Evasive Charges to use. Each attack or spell dodged while this ability is active burns one Evasive Charge. Lasts 30 sec. or until all charges are exhausted.
- //you do not have acces to until you kill Mage-Lord Urom
- SPELL_RUBY_MARTYR = 50253 //Instant - 10 sec. cooldown - Redirect all harmful spells cast at friendly drakes to yourself for 10 sec.
-};
-/*Amber Drake,
-(npc 27755) (item 37859)
-(summoned by spell Amber Essence = 37859 ---> Call Amber Drake == 49461 ---> Summon 27755)
-*/
-enum AmberDrake
-{
- NPC_AMBER_DRAKE_VEHICLE = 27755,
- SPELL_RIDE_AMBER_DRAKE_QUE = 49459, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49460
- SPELL_AMBER_DRAKE_SADDLE = 49460, //Allows you to ride on the back of an Amber Drake. ---> Dummy
- SPELL_AMBER_SHOCK_LANCE = 49840, //(60 yds) - Instant - Deals 4822 to 5602 Arcane damage and detonates all Shock Charges on an enemy dragon. Damage is increased by 6525 for each detonated.
-// SPELL_AMBER_STOP_TIME //Instant - 1 min cooldown - Halts the passage of time, freezing all enemy dragons in place for 10 sec. This attack applies 5 Shock Charges to each affected target.
- //you do not have access to until you kill the Mage-Lord Urom.
- SPELL_AMBER_TEMPORAL_RIFT = 49592 //(60 yds) - Channeled - Channels a temporal rift on an enemy dragon for 10 sec. While trapped in the rift, all damage done to the target is increased by 100%. In addition, for every 15, 000 damage done to a target affected by Temporal Rift, 1 Shock Charge is generated.
-};
-
-/*Emerald Drake,
-(npc 27692) (item 37815),
- (summoned by spell Emerald Essence = 37815 ---> Call Emerald Drake == 49345 ---> Summon 27692)
-*/
-enum EmeraldDrake
-{
- NPC_EMERALD_DRAKE_VEHICLE = 27692,
- SPELL_RIDE_EMERALD_DRAKE_QUE = 49427, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49346
- SPELL_EMERALD_DRAKE_SADDLE = 49346, //Allows you to ride on the back of an Amber Drake. ---> Dummy
- SPELL_EMERALD_LEECHING_POISON = 50328, //(60 yds) - Instant - Poisons the enemy dragon, leeching 1300 to the caster every 2 sec. for 12 sec. Stacks up to 3 times.
- SPELL_EMERALD_TOUCH_THE_NIGHTMARE = 50341, //(60 yds) - Instant - Consumes 30% of the caster's max health to inflict 25, 000 nature damage to an enemy dragon and reduce the damage it deals by 25% for 30 sec.
- // you do not have access to until you kill the Mage-Lord Urom
- SPELL_EMERALD_DREAM_FUNNEL = 50344 //(60 yds) - Channeled - Transfers 5% of the caster's max health to a friendly drake every second for 10 seconds as long as the caster channels.
-};
-
enum EregosData
{
DATA_RUBY_VOID = 0, // http://www.wowhead.com/achievement=2044
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index 791bc0180e5..8e7863259ad 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -38,7 +38,8 @@ enum Spells
SPELL_SUMMON_MENAGERIE_3 = 50496,
SPELL_TELEPORT = 51112, //Teleports to the center of Oculus
SPELL_TIME_BOMB = 51121, //Deals arcane damage to a random player, and after 6 seconds, deals zone damage to nearby equal to the health missing of the target afflicted by the debuff.
- SPELL_TIME_BOMB_2 = 59376
+ SPELL_TIME_BOMB_2 = 59376,
+ SPELL_EVOCATE = 51602 // He always cast it on reset or after teleportation
};
enum Yells
@@ -103,10 +104,9 @@ public:
void Reset()
{
- if (instance->GetBossState(DATA_VAROS_EVENT) != DONE)
- DoCast(SPELL_ARCANE_SHIELD);
-
- _Reset();
+ me->CastSpell(me, SPELL_EVOCATE);
+
+ _Reset();
if (instance->GetData(DATA_UROM_PLATAFORM) == 0)
{
@@ -307,14 +307,17 @@ public:
case SPELL_SUMMON_MENAGERIE:
me->SetHomePosition(968.66f, 1042.53f, 527.32f, 0.077f);
LeaveCombat();
+ me->CastSpell(me, SPELL_EVOCATE);
break;
case SPELL_SUMMON_MENAGERIE_2:
me->SetHomePosition(1164.02f, 1170.85f, 527.321f, 3.66f);
LeaveCombat();
+ me->CastSpell(me, SPELL_EVOCATE);
break;
case SPELL_SUMMON_MENAGERIE_3:
me->SetHomePosition(1118.31f, 1080.377f, 508.361f, 4.25f);
LeaveCombat();
+ me->CastSpell(me, SPELL_EVOCATE);
break;
case SPELL_TELEPORT:
//! Unconfirmed, previous below
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
index ca4ae883747..1f4a3d1b229 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
@@ -56,9 +56,13 @@ public:
eregosCacheGUID = 0;
- azureDragonsList.clear();
+ gwhelpList.clear();
gameObjectList.clear();
- }
+
+ belgaristraszGUID = 0;
+ eternosGUID = 0;
+ verdisaGUID = 0;
+}
void OnUnitDeath(Unit* unit)
{
@@ -112,17 +116,49 @@ public:
break;
case NPC_VAROS:
varosGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
+ creature->SetPhaseMask(1, true);
break;
case NPC_UROM:
uromGUID = creature->GetGUID();
+ if (GetBossState(DATA_VAROS_EVENT) == DONE)
+ creature->SetPhaseMask(1, true);
break;
case NPC_EREGOS:
eregosGUID = creature->GetGUID();
+ if (GetBossState(DATA_UROM_EVENT) == DONE)
+ creature->SetPhaseMask(1, true);
break;
case NPC_CENTRIFUGE_CONSTRUCT:
if (creature->isAlive())
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, ++centrifugueConstructCounter);
break;
+ case NPC_BELGARISTRASZ:
+ belgaristraszGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
+ creature->SetWalk(true),
+ creature->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f),
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ break;
+ case NPC_ETERNOS:
+ eternosGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
+ creature->SetWalk(true),
+ creature->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f),
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ break;
+ case NPC_VERDISA:
+ verdisaGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
+ creature->SetWalk(true),
+ creature->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f),
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ break;
+ case NPC_GREATER_WHELP:
+ if (GetBossState(DATA_UROM_EVENT) == DONE)
+ creature->SetPhaseMask(1, true);
+ gwhelpList.push_back(creature->GetGUID());
+ break;
}
}
@@ -159,11 +195,22 @@ public:
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, centrifugueConstructCounter);
OpenCageDoors();
+ FreeDragons();
+ if (Creature* varos = instance->GetCreature(varosGUID))
+ varos->SetPhaseMask(1, true);
}
break;
case DATA_VAROS_EVENT:
if (state == DONE)
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
+ if (Creature* urom = instance->GetCreature(uromGUID))
+ urom->SetPhaseMask(1, true);
+ break;
+ case DATA_UROM_EVENT:
+ if (state == DONE)
+ if (Creature* eregos = instance->GetCreature(eregosGUID))
+ eregos->SetPhaseMask(1, true);
+ GreaterWhelps();
break;
case DATA_EREGOS_EVENT:
if (state == DONE)
@@ -221,6 +268,31 @@ public:
}
}
+ void FreeDragons()
+ {
+ if (Creature* belgaristrasz = instance->GetCreature(belgaristraszGUID))
+ belgaristrasz->SetWalk(true),
+ belgaristrasz->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f);
+ if (Creature* eternos = instance->GetCreature(eternosGUID))
+ eternos->SetWalk(true),
+ eternos->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f);
+ if (Creature* verdisa = instance->GetCreature(verdisaGUID))
+ verdisa->SetWalk(true),
+ verdisa->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f);
+ }
+
+ void GreaterWhelps()
+ {
+ if (gwhelpList.empty())
+ return;
+
+ for (std::list<uint64>::const_iterator itr = gwhelpList.begin(); itr != gwhelpList.end(); ++itr)
+ {
+ if (Creature* gwhelp = instance->GetCreature(*itr))
+ gwhelp->SetPhaseMask(1, true);
+ }
+ }
+
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
@@ -269,6 +341,10 @@ public:
uint64 uromGUID;
uint64 eregosGUID;
+ uint64 belgaristraszGUID;
+ uint64 eternosGUID;
+ uint64 verdisaGUID;
+
uint8 platformUrom;
uint8 centrifugueConstructCounter;
@@ -277,9 +353,8 @@ public:
std::string str_data;
std::list<uint64> gameObjectList;
- std::list<uint64> azureDragonsList;
+ std::list<uint64> gwhelpList;
};
-
};
void AddSC_instance_oculus()
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index 1d8b5b986f6..f2fa3158603 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -20,6 +20,8 @@
#include "ScriptedGossip.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
+#include "Vehicle.h"
+#include "CombatAI.h"
#include "oculus.h"
#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
@@ -32,7 +34,7 @@
#define HAS_ESSENCE(a) ((a)->HasItemCount(ITEM_EMERALD_ESSENCE, 1) || (a)->HasItemCount(ITEM_AMBER_ESSENCE, 1) || (a)->HasItemCount(ITEM_RUBY_ESSENCE, 1))
-enum Drakes
+enum GossipNPCs
{
GOSSIP_TEXTID_DRAKES = 13267,
GOSSIP_TEXTID_BELGARISTRASZ1 = 12916,
@@ -49,25 +51,67 @@ enum Drakes
ITEM_AMBER_ESSENCE = 37859,
ITEM_RUBY_ESSENCE = 37860,
- NPC_VERDISA = 27657,
- NPC_BELGARISTRASZ = 27658,
- NPC_ETERNOS = 27659,
+ SPELL_SHOCK_CHARGE = 49836
+};
+
+enum Drakes
+{
+/*Ruby Drake,
+(npc 27756) (item 37860)
+(summoned by spell Ruby Essence = 37860 ---> Call Amber Drake == 49462 ---> Summon 27756)
+*/
+ SPELL_RIDE_RUBY_DRAKE_QUE = 49463, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49464
+ SPELL_RUBY_DRAKE_SADDLE = 49464, //Allows you to ride on the back of an Amber Drake. ---> Dummy
+ SPELL_RUBY_SEARING_WRATH = 50232, //(60 yds) - Instant - Breathes a stream of fire at an enemy dragon, dealing 6800 to 9200 Fire damage and then jumping to additional dragons within 30 yards. Each jump increases the damage by 50%. Affects up to 5 total targets
+ SPELL_RUBY_EVASIVE_AURA = 50248, //Instant - Allows the Ruby Drake to generate Evasive Charges when hit by hostile attacks and spells.
+ SPELL_RUBY_EVASIVE_MANEUVERS = 50240, //Instant - 5 sec. cooldown - Allows your drake to dodge all incoming attacks and spells. Requires Evasive Charges to use. Each attack or spell dodged while this ability is active burns one Evasive Charge. Lasts 30 sec. or until all charges are exhausted.
+ //you do not have acces to until you kill Mage-Lord Urom
+ SPELL_RUBY_MARTYR = 50253, //Instant - 10 sec. cooldown - Redirect all harmful spells cast at friendly drakes to yourself for 10 sec.
+
+/*Amber Drake,
+(npc 27755) (item 37859)
+(summoned by spell Amber Essence = 37859 ---> Call Amber Drake == 49461 ---> Summon 27755)
+*/
- SPELL_SHOCK_CHARGE = 49836,
+ SPELL_RIDE_AMBER_DRAKE_QUE = 49459, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49460
+ SPELL_AMBER_DRAKE_SADDLE = 49460, //Allows you to ride on the back of an Amber Drake. ---> Dummy
+ SPELL_AMBER_SHOCK_LANCE = 49840, //(60 yds) - Instant - Deals 4822 to 5602 Arcane damage and detonates all Shock Charges on an enemy dragon. Damage is increased by 6525 for each detonated.
+ // SPELL_AMBER_STOP_TIME //Instant - 1 min cooldown - Halts the passage of time, freezing all enemy dragons in place for 10 sec. This attack applies 5 Shock Charges to each affected target.
+ //you do not have access to until you kill the Mage-Lord Urom.
+ SPELL_AMBER_TEMPORAL_RIFT = 49592, //(60 yds) - Channeled - Channels a temporal rift on an enemy dragon for 10 sec. While trapped in the rift, all damage done to the target is increased by 100%. In addition, for every 15, 000 damage done to a target affected by Temporal Rift, 1 Shock Charge is generated.
+
+/*Emerald Drake,
+(npc 27692) (item 37815),
+ (summoned by spell Emerald Essence = 37815 ---> Call Emerald Drake == 49345 ---> Summon 27692)
+*/
+ SPELL_RIDE_EMERALD_DRAKE_QUE = 49427, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49346
+ SPELL_EMERALD_DRAKE_SADDLE = 49346, //Allows you to ride on the back of an Amber Drake. ---> Dummy
+ SPELL_EMERALD_LEECHING_POISON = 50328, //(60 yds) - Instant - Poisons the enemy dragon, leeching 1300 to the caster every 2 sec. for 12 sec. Stacks up to 3 times.
+ SPELL_EMERALD_TOUCH_THE_NIGHTMARE = 50341, //(60 yds) - Instant - Consumes 30% of the caster's max health to inflict 25, 000 nature damage to an enemy dragon and reduce the damage it deals by 25% for 30 sec.
+ // you do not have access to until you kill the Mage-Lord Urom
+ SPELL_EMERALD_DREAM_FUNNEL = 50344, //(60 yds) - Channeled - Transfers 5% of the caster's max health to a friendly drake every second for 10 seconds as long as the caster channels.
};
enum Says
{
- SAY_VAROS = 0,
- SAY_UROM = 1
+ SAY_VAROS = 0,
+ SAY_UROM = 1,
+ SAY_BELGARISTRASZ = 0,
+ SAY_DRAKES_TAKEOFF = 0,
+ WHISPER_DRAKES_WELCOME = 1,
+ WHISPER_DRAKES_ABILITIES = 2,
+ WHISPER_DRAKES_SPECIAL = 3,
+ WHISPER_DRAKES_LOWHEALTH = 4
};
-class npc_oculus_drake : public CreatureScript
+class npc_verdisa_beglaristrasz_eternos : public CreatureScript
{
public:
- npc_oculus_drake() : CreatureScript("npc_oculus_drake") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ npc_verdisa_beglaristrasz_eternos() : CreatureScript("npc_verdisa_beglaristrasz_eternos") { }
+
+ InstanceScript* instance;
+
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
switch (creature->GetEntry())
@@ -184,6 +228,28 @@ public:
return true;
}
+ struct npc_verdisa_beglaristrasz_eternosAI : public ScriptedAI
+ {
+ npc_verdisa_beglaristrasz_eternosAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void MovementInform(uint32 type, uint32 id)
+ {
+ // When Belgaristraz finish his moving say grateful text
+ if (me->GetEntry() == NPC_BELGARISTRASZ)
+ if (id == 0)
+ {
+ Talk(SAY_BELGARISTRASZ);
+ }
+ // The gossip flag should activate when Drakos die and not from DB
+ if (id == 0)
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_verdisa_beglaristrasz_eternosAI(creature);
+ }
};
class npc_image_belgaristrasz : public CreatureScript
@@ -193,7 +259,7 @@ public:
struct npc_image_belgaristraszAI : public ScriptedAI
{
- npc_image_belgaristraszAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_image_belgaristraszAI(Creature* creature) : ScriptedAI(creature) { }
void IsSummonedBy(Unit* summoner)
{
@@ -216,6 +282,176 @@ public:
}
};
+class npc_ruby_emerald_amber_drake : public CreatureScript
+{
+public:
+ npc_ruby_emerald_amber_drake() : CreatureScript("npc_ruby_emerald_amber_drake") { }
+
+ struct npc_ruby_emerald_amber_drakeAI : public VehicleAI
+ {
+ npc_ruby_emerald_amber_drakeAI(Creature* creature) : VehicleAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ InstanceScript* instance;
+
+ uint64 summonerGUID;
+ uint32 WelcomeTimer;
+ uint32 WelcomeSequelTimer;
+ uint32 SpecialTimer;
+ uint32 WarningTimer;
+ uint32 TakeOffTimer;
+
+ bool WelcomeOff;
+ bool WelcomeSequelOff;
+ bool SpecialOff;
+ bool HealthWarningOff;
+ bool DisableTakeOff;
+
+ void Reset()
+ {
+ summonerGUID = 0;
+ WelcomeTimer = 4500;
+ WelcomeSequelTimer = 4500;
+ SpecialTimer = 10000;
+ WarningTimer = 25000;
+ TakeOffTimer = 3500;
+
+ WelcomeOff = false;
+ WelcomeSequelOff = false;
+ SpecialOff = false;
+ HealthWarningOff = false;
+ DisableTakeOff = false;
+ }
+
+ void IsSummonedBy(Unit* summoner)
+ {
+ if (instance->GetBossState(DATA_EREGOS_EVENT) == IN_PROGRESS)
+ if (Creature* eregos = me->FindNearestCreature(NPC_EREGOS, 450.0f, true))
+ {
+ eregos->DespawnOrUnsummon(); // On retail this kills abusive call of drake during engaged Eregos
+ }
+ summonerGUID = summoner->GetGUID();
+ me->SetFacingToObject(summoner);
+ // TO DO: Drake Ques should be casted from vehicle to player, however the way core handle triggered spells from auras break it no matter the conditions. So this change the caster and give the same result until someone fix triggered spells from auras that involve implicit targets or make exception for this case.
+ if (me->GetEntry() == NPC_RUBY_DRAKE_VEHICLE)
+ summoner->CastSpell(summoner, SPELL_RIDE_RUBY_DRAKE_QUE);
+ if (me->GetEntry() == NPC_EMERALD_DRAKE_VEHICLE)
+ summoner->CastSpell(summoner, SPELL_RIDE_EMERALD_DRAKE_QUE);
+ if (me->GetEntry() == NPC_AMBER_DRAKE_VEHICLE)
+ summoner->CastSpell(summoner, SPELL_RIDE_AMBER_DRAKE_QUE);
+ Position pos;
+ summoner->GetPosition(&pos);
+ me->GetMotionMaster()->MovePoint(0, pos);
+ }
+
+ void MovementInform(uint32 type, uint32 id)
+ {
+ if (type == POINT_MOTION_TYPE && id == 0)
+ {
+ me->SetDisableGravity(false); // Needed this for proper animation after spawn, the summon in air fall to ground bug leave no other option for now, if this isn't used the drake will only walk on move.
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!(instance->GetBossState(DATA_VAROS_EVENT) == DONE))
+ {
+ if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
+ {
+ if (!(WelcomeOff))
+ {
+ if (WelcomeTimer <= diff)
+ {
+ Talk(WHISPER_DRAKES_WELCOME, me->GetCreatorGUID());
+ WelcomeOff = true;
+ WelcomeSequelOff = true;
+ }
+ else WelcomeTimer -= diff;
+ }
+ }
+ }
+ if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
+ {
+ if (WelcomeSequelOff)
+ {
+ if (WelcomeSequelTimer <= diff)
+ {
+ Talk(WHISPER_DRAKES_ABILITIES, me->GetCreatorGUID());
+ WelcomeSequelOff = false;
+ }
+ else WelcomeSequelTimer -= diff;
+ }
+ }
+ if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
+ {
+ if (instance->GetBossState(DATA_UROM_EVENT) == DONE)
+ {
+ if (!(SpecialOff))
+ {
+ if (SpecialTimer <= diff)
+ {
+ Talk(WHISPER_DRAKES_SPECIAL, me->GetCreatorGUID());
+ SpecialOff = true;
+ }
+ else SpecialTimer -= diff;
+ }
+ }
+ }
+ if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
+ {
+ if (!(HealthWarningOff))
+ {
+ if (me->GetHealthPct() <= 40.0f)
+ {
+ Talk(WHISPER_DRAKES_LOWHEALTH, me->GetCreatorGUID());
+ HealthWarningOff = true;
+ }
+ }
+ }
+ if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
+ {
+ if (HealthWarningOff)
+ {
+ if (WarningTimer <= diff)
+ {
+ HealthWarningOff = false;
+ WarningTimer = 25000;
+ }
+ else WarningTimer -= diff;
+ }
+ }
+ if (!(me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE)))
+ {
+ if (!(DisableTakeOff))
+ {
+ if (TakeOffTimer <= diff)
+ {
+ me->DespawnOrUnsummon(2050);
+ me->SetOrientation(2.5f);
+ me->SetSpeed(MOVE_FLIGHT, 1.0f, true);
+ Talk(SAY_DRAKES_TAKEOFF);
+ Position pos;
+ me->GetPosition(&pos);
+ pos.m_positionX += 10.0f;
+ pos.m_positionY += 10.0f;
+ pos.m_positionZ += 12.0f;
+ me->GetMotionMaster()->MovePoint(1, pos);
+ DisableTakeOff = true;
+ }
+ else TakeOffTimer -= diff;
+ }
+ }
+ };
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_ruby_emerald_amber_drakeAI(creature);
+ }
+};
+
class spell_gen_stop_time : public SpellScriptLoader
{
public:
@@ -247,9 +483,50 @@ public:
}
};
+class spell_call_ruby_emerald_amber_drake : public SpellScriptLoader
+{
+public:
+ spell_call_ruby_emerald_amber_drake() : SpellScriptLoader("spell_call_ruby_emerald_amber_drake") { }
+
+ class spell_call_ruby_emerald_amber_drake_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_call_ruby_emerald_amber_drake_SpellScript);
+
+ void ChangeSummonPos(SpellEffIndex /*effIndex*/)
+ {
+ // Adjust effect summon position
+ WorldLocation summonPos = *GetExplTargetDest();
+ Position offset = {0.0f, 0.0f, 12.0f, 0.0f};
+ summonPos.RelocateOffset(offset);
+ SetExplTargetDest(summonPos);
+ GetHitDest()->RelocateOffset(offset);
+ }
+
+ void ModDestHeight(SpellEffIndex /*effIndex*/)
+ {
+ // Used to cast visual effect at proper position
+ Position offset = {0.0f, 0.0f, 12.0f, 0.0f};
+ const_cast<WorldLocation*>(GetExplTargetDest())->RelocateOffset(offset);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_call_ruby_emerald_amber_drake_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
+ OnEffectLaunch += SpellEffectFn(spell_call_ruby_emerald_amber_drake_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_call_ruby_emerald_amber_drake_SpellScript();
+ }
+};
+
void AddSC_oculus()
{
- new npc_oculus_drake();
+ new npc_verdisa_beglaristrasz_eternos();
new npc_image_belgaristrasz();
+ new npc_ruby_emerald_amber_drake();
new spell_gen_stop_time();
+ new spell_call_ruby_emerald_amber_drake();
}
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
index 81d1e9f9ea8..c536b43f905 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
@@ -35,15 +35,22 @@ enum Data64
DATA_EREGOS
};
-enum Bosses
+enum Bosses_NPCs
{
NPC_DRAKOS = 27654,
NPC_VAROS = 27447,
NPC_UROM = 27655,
NPC_EREGOS = 27656,
- NPC_AZURE_RING_GUARDIAN = 28236,
- NPC_CENTRIFUGE_CONSTRUCT = 27641,
+ NPC_AZURE_RING_GUARDIAN = 28236,
+ NPC_CENTRIFUGE_CONSTRUCT = 27641,
+ NPC_RUBY_DRAKE_VEHICLE = 27756,
+ NPC_EMERALD_DRAKE_VEHICLE = 27692,
+ NPC_AMBER_DRAKE_VEHICLE = 27755,
+ NPC_VERDISA = 27657,
+ NPC_BELGARISTRASZ = 27658,
+ NPC_ETERNOS = 27659,
+ NPC_GREATER_WHELP = 28276
};
enum GameObjects
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index a45526ce42a..a0c00f73bff 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -521,7 +521,7 @@ class boss_algalon_the_observer : public CreatureScript
if (Creature* wormHole = DoSummon(NPC_WORM_HOLE, CollapsingStarPos[i], TEMPSUMMON_MANUAL_DESPAWN))
wormHole->m_Events.AddEvent(new SummonUnleashedDarkMatter(wormHole), wormHole->m_Events.CalculateTime(i >= 2 ? 8000 : 6000));
}
- else if ((int32(me->GetHealth()) - int32(damage)) < CalculatePctF<int32>(int32(me->GetMaxHealth()), 2.5f) && !_fightWon)
+ else if ((int32(me->GetHealth()) - int32(damage)) < CalculatePct<int32>(int32(me->GetMaxHealth()), 2.5f) && !_fightWon)
{
_fightWon = true;
damage = 0;