aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp7
-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.cpp302
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.h13
6 files changed, 393 insertions, 70 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 70ec7bd4d68..c89442855e1 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3599,6 +3599,13 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->manaCost = 0;
spellInfo->manaPerSecond = 0;
break;
+ // OCULUS SPELLS
+ // The spells below are here, because their effect 1 is giving warning, because the triggered spell is not found in dbc and is missing from encounter sniff.
+ case 49462: // Call Ruby Drake
+ case 49461: // Call Amber Drake
+ case 49345: // Call Emerald Drake
+ spellInfo->Effect[1] = 0;
+ break;
default:
break;
}
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..362f99fbfab 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -20,6 +20,7 @@
#include "ScriptedGossip.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
+#include "Vehicle.h"
#include "oculus.h"
#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
@@ -32,7 +33,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 +50,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 +227,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 +258,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 +281,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 +482,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