aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/boss_drakos.cpp58
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/boss_eregos.cpp111
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/boss_urom.cpp70
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp65
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/def_oculus.h24
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/instance_oculus.cpp128
6 files changed, 344 insertions, 112 deletions
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_drakos.cpp b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_drakos.cpp
index 3ef2fa93fa3..587c39c57f1 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_drakos.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_drakos.cpp
@@ -10,35 +10,52 @@ Script Data End */
update creature_template set scriptname = '' where entry = '';
*** SQL END ***/
#include "precompiled.h"
+#include "def_oculus.h"
-//Spells
-#define SPELL_MAGIC_PULL 51336
-#define SPELL_THUNDERING_STOMP 50774
-#define SPELL_THUNDERING_STOMP_2 59370
+enum Spells
+{
+ SPELL_MAGIC_PULL = 51336,
+ SPELL_THUNDERING_STOMP = 50774,
+ SPELL_THUNDERING_STOMP_2 = 59370
+};
//not in db
-//Yell
-#define SAY_AGGRO -1578000
-#define SAY_KILL_1 -1578001
-#define SAY_KILL_2 -1578002
-#define SAY_KILL_3 -1578003
-#define SAY_DEATH -1578004
-#define SAY_PULL_1 -1578005
-#define SAY_PULL_2 -1578006
-#define SAY_PULL_3 -1578007
-#define SAY_PULL_4 -1578008
-#define SAY_STOMP_1 -1578009
-#define SAY_STOMP_2 -1578010
-#define SAY_STOMP_3 -1578011
+enum Yells
+{
+ SAY_AGGRO = -1578000,
+ SAY_KILL_1 = -1578001,
+ SAY_KILL_2 = -1578002,
+ SAY_KILL_3 = -1578003,
+ SAY_DEATH = -1578004,
+ SAY_PULL_1 = -1578005,
+ SAY_PULL_2 = -1578006,
+ SAY_PULL_3 = -1578007,
+ SAY_PULL_4 = -1578008,
+ SAY_STOMP_1 = -1578009,
+ SAY_STOMP_2 = -1578010,
+ SAY_STOMP_3 = -1578011
+};
struct TRINITY_DLL_DECL boss_drakosAI : public ScriptedAI
{
- boss_drakosAI(Creature *c) : ScriptedAI(c) {}
+ boss_drakosAI(Creature *c) : ScriptedAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ ScriptedInstance* pInstance;
- void Reset() {}
+ void Reset()
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_DRAKOS_EVENT, NOT_STARTED);
+ }
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_DRAKOS_EVENT, IN_PROGRESS);
}
void AttackStart(Unit* who) {}
void MoveInLineOfSight(Unit* who) {}
@@ -53,6 +70,9 @@ struct TRINITY_DLL_DECL boss_drakosAI : public ScriptedAI
void JustDied(Unit* killer)
{
DoScriptText(SAY_DEATH, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_DRAKOS_EVENT, DONE);
}
void KilledUnit(Unit *victim)
{
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_eregos.cpp b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_eregos.cpp
index a0837ac0634..8fcc8d84d34 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_eregos.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_eregos.cpp
@@ -10,69 +10,87 @@ Script Data End */
update creature_template set scriptname = '' where entry = '';
*** SQL END ***/
#include "precompiled.h"
+#include "def_oculus.h"
//Types of drake mounts: Ruby(Tank), Amber(DPS), Emerald(Healer)
//Two Repeating phases
-//Spells
-#define SPELL_ARCANE_BARRAGE 50804
-#define SPELL_ARCANE_VOLLEY 51153
-#define SPELL_ENRAGED_ASSAULT 51170
-#define SPELL_PLANAR_ANOMALIES 57959
-#define SPELL_PLANAR_SHIFT 51162
-
-//Heroic
-#define SPELL_ARCANE_BARRAGE_H 59381
-#define SPELL_ARCANE_VOLLEY_H 59382
-
+enum Spells
+{
+ SPELL_ARCANE_BARRAGE = 50804,
+ SPELL_ARCANE_VOLLEY = 51153,
+ SPELL_ENRAGED_ASSAULT = 51170,
+ SPELL_PLANAR_ANOMALIES = 57959,
+ SPELL_PLANAR_SHIFT = 51162,
+ //Heroic
+ H_SPELL_ARCANE_BARRAGE = 59381,
+ H_SPELL_ARCANE_VOLLEY = 59382
+};
/*Ruby Drake ,
(npc 27756) (item 37860)
(summoned by spell Ruby Essence = 37860 ---> Call Amber Drake == 49462 ---> Summon 27756)
*/
-#define NPC_RUBY_DRAKE_VEHICLE 27756
-#define SPELL_RIDE_RUBY_DRAKE_QUE 49463 //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49464
-#define SPELL_RUBY_DRAKE_SADDLE 49464 //Allows you to ride on the back of an Amber Drake. ---> Dummy
-
-#define 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
-#define SPELL_RUBY_EVASIVE_AURA 50248 //Instant - Allows the Ruby Drake to generate Evasive Charges when hit by hostile attacks and spells.
-#define 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
-#define SPELL_RUBY_MARTYR 50253 //Instant - 10 sec. cooldown - Redirect all harmful spells cast at friendly drakes to yourself for 10 sec.
-
+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)
*/
-#define NPC_AMBER_DRAKE_VEHICLE 27755
-#define SPELL_RIDE_AMBER_DRAKE_QUE 49459 //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49460
-#define SPELL_AMBER_DRAKE_SADDLE 49460 //Allows you to ride on the back of an Amber Drake. ---> Dummy
-
-#define 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.
-#define 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.
-#define 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.
-
+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)
*/
-#define NPC_EMERALD_DRAKE_VEHICLE 27692
-#define SPELL_RIDE_EMERALD_DRAKE_QUE 49427 //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49346
-#define SPELL_EMERALD_DRAKE_SADDLE 49346 //Allows you to ride on the back of an Amber Drake. ---> Dummy
-
-#define 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.
-#define 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
-#define 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 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.
+};
struct TRINITY_DLL_DECL boss_eregosAI : public ScriptedAI
{
- boss_eregosAI(Creature *c) : ScriptedAI(c) {}
+ boss_eregosAI(Creature *c) : ScriptedAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
- uint32 phase;
+ ScriptedInstance* pInstance;
- void Reset() {}
- void EnterCombat(Unit* who) {}
+ void Reset()
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_EREGOS_EVENT, NOT_STARTED);
+ }
+
+ void EnterCombat(Unit* who)
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_EREGOS_EVENT, IN_PROGRESS);
+ }
+
void AttackStart(Unit* who) {}
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
@@ -81,11 +99,14 @@ struct TRINITY_DLL_DECL boss_eregosAI : public ScriptedAI
if (!UpdateVictim())
return;
- phase =1;
-
DoMeleeAttackIfReady();
}
- void JustDied(Unit* killer) {}
+
+ void JustDied(Unit* killer)
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_EREGOS_EVENT, DONE);
+ }
};
CreatureAI* GetAI_boss_eregos(Creature* pCreature)
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_urom.cpp b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_urom.cpp
index 0693b74b9f1..ab96dffc324 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_urom.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_urom.cpp
@@ -10,41 +10,58 @@ Script Data End */
update creature_template set scriptname = '' where entry = '';
*** SQL END ***/
#include "precompiled.h"
+#include "def_oculus.h"
-//Spells
-#define SPELL_ARCANE_SHIELD 53813 //Dummy --> Channeled, shields the caster from damage.
-#define SPELL_EMPOWERED_ARCANE_EXPLOSION 51110
-#define SPELL_EMPOWERED_ARCANE_EXPLOSION_2 59377
-#define SPELL_FROSTBOMB 51103 //Urom throws a bomb, hitting its target with the highest aggro which inflict directly 650 frost damage and drops a frost zone on the ground. This zone deals 650 frost damage per second and reduce the movement speed by 35%. Lasts 1 minute.
-#define SPELL_SUMMON_MENAGERIE 50476 //Summons an assortment of creatures and teleports the caster to safety.
-#define SPELL_SUMMON_MENAGERIE_2 50495
-#define SPELL_SUMMON_MENAGERIE_3 50496
-#define SPELL_TELEPORT 51112 //Teleports to the center of Oculus
-#define 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.
-#define SPELL_TIME_BOMB_2 59376
-
+enum Spells
+{
+ SPELL_ARCANE_SHIELD = 53813, //Dummy --> Channeled, shields the caster from damage.
+ SPELL_EMPOWERED_ARCANE_EXPLOSION = 51110,
+ SPELL_EMPOWERED_ARCANE_EXPLOSION_2 = 59377,
+ SPELL_FROSTBOMB = 51103, //Urom throws a bomb, hitting its target with the highest aggro which inflict directly 650 frost damage and drops a frost zone on the ground. This zone deals 650 frost damage per second and reduce the movement speed by 35%. Lasts 1 minute.
+ SPELL_SUMMON_MENAGERIE = 50476, //Summons an assortment of creatures and teleports the caster to safety.
+ SPELL_SUMMON_MENAGERIE_2 = 50495,
+ 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
+};
//not in db
-//Yell
-#define SAY_AGGRO -1578012
-#define SAY_KILL_1 -1578013
-#define SAY_KILL_2 -1578014
-#define SAY_KILL_3 -1578015
-#define SAY_DEATH -1578016
-#define SAY_EXPLOSION_1 -1578017
-#define SAY_EXPLOSION_2 -1578018
-#define SAY_SUMMON_1 -1578019
-#define SAY_SUMMON_2 -1578020
-#define SAY_SUMMON_3 -1578021
+enum Yells
+{
+ SAY_AGGRO = -1578012,
+ SAY_KILL_1 = -1578013,
+ SAY_KILL_2 = -1578014,
+ SAY_KILL_3 = -1578015,
+ SAY_DEATH = -1578016,
+ SAY_EXPLOSION_1 = -1578017,
+ SAY_EXPLOSION_2 = -1578018,
+ SAY_SUMMON_1 = -1578019,
+ SAY_SUMMON_2 = -1578020,
+ SAY_SUMMON_3 = -1578021
+};
struct TRINITY_DLL_DECL boss_uromAI : public ScriptedAI
{
- boss_uromAI(Creature *c) : ScriptedAI(c) {}
+ boss_uromAI(Creature *c) : ScriptedAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ ScriptedInstance* pInstance;
- void Reset() {}
+ void Reset()
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_UROM_EVENT, NOT_STARTED);
+ }
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_UROM_EVENT, IN_PROGRESS);
}
+
void AttackStart(Unit* who) {}
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
@@ -58,6 +75,9 @@ struct TRINITY_DLL_DECL boss_uromAI : public ScriptedAI
void JustDied(Unit* killer)
{
DoScriptText(SAY_DEATH, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_UROM_EVENT, DONE);
}
void KilledUnit(Unit *victim)
{
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp
index cfd419a01f8..4a1975e6c4b 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp
@@ -10,38 +10,54 @@ Script Data End */
update creature_template set scriptname = '' where entry = '';
*** SQL END ***/
#include "precompiled.h"
+#include "def_oculus.h"
-//Spells
-#define SPELL_ENERGIZE_CORES 50785 //Damage 5938 to 6562, effec2 Triggers 54069, effect3 Triggers 56251
-#define SPELL_ENERGIZE_CORES_TRIGGER_1 54069
-#define SPELL_ENERGIZE_CORES_TRIGGER_2 56251
-#define SPELL_ENERGIZE_CORES_2 59372 //Damage 9025 to 9975, effect2 Triggers 54069, effect 56251
-#define SPELL_CALL_AZURE_RING_CAPTAIN 51002 //Effect Send Event (12229)
-#define SPELL_CALL_AZURE_RING_CAPTAIN_2 51006 //Effect Send Event (10665)
-#define SPELL_CALL_AZURE_RING_CAPTAIN_3 51007 //Effect Send Event (18454)
-#define SPELL_CALL_AZURE_RING_CAPTAIN_4 51008 //Effect Send Event (18455)
-#define SPELL_CALL_AMPLIFY_MAGIC 51054
-#define SPELL_CALL_AMPLIFY_MAGIC_2 59371
-
+enum Spells
+{
+ SPELL_ENERGIZE_CORES = 50785, //Damage 5938 to 6562, effec2 Triggers 54069, effect3 Triggers 56251
+ SPELL_ENERGIZE_CORES_TRIGGER_1 = 54069,
+ SPELL_ENERGIZE_CORES_TRIGGER_2 = 56251,
+ SPELL_ENERGIZE_CORES_2 = 59372, //Damage 9025 to 9975, effect2 Triggers 54069, effect 56251
+ SPELL_CALL_AZURE_RING_CAPTAIN = 51002, //Effect Send Event (12229)
+ SPELL_CALL_AZURE_RING_CAPTAIN_2 = 51006, //Effect Send Event (10665)
+ SPELL_CALL_AZURE_RING_CAPTAIN_3 = 51007, //Effect Send Event (18454)
+ SPELL_CALL_AZURE_RING_CAPTAIN_4 = 51008, //Effect Send Event (18455)
+ SPELL_CALL_AMPLIFY_MAGIC = 51054,
+ SPELL_CALL_AMPLIFY_MAGIC_2 = 59371
+};
//not in db
-//Yell
-#define SAY_AGGRO -1578022
-#define SAY_KILL_1 -1578023
-#define SAY_KILL_2 -1578024
-#define SAY_DEATH -1578025
-#define SAY_STRIKE_1 -1578026
-#define SAY_STRIKE_2 -1578027
-#define SAY_STRIKE_3 -1578028
-#define SAY_SPAWN -1578029
+enum Yells
+{
+ SAY_AGGRO = -1578022,
+ SAY_KILL_1 = -1578023,
+ SAY_KILL_2 = -1578024,
+ SAY_DEATH = -1578025,
+ SAY_STRIKE_1 = -1578026,
+ SAY_STRIKE_2 = -1578027,
+ SAY_STRIKE_3 = -1578028,
+ SAY_SPAWN = -1578029
+};
struct TRINITY_DLL_DECL boss_varosAI : public ScriptedAI
{
- boss_varosAI(Creature *c) : ScriptedAI(c) {}
+ boss_varosAI(Creature *c) : ScriptedAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ ScriptedInstance* pInstance;
- void Reset() {}
+ void Reset()
+ {
+ if (pInstance)
+ pInstance->SetData(DATA_VAROS_EVENT, NOT_STARTED);
+ }
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_VAROS_EVENT, IN_PROGRESS);
}
void AttackStart(Unit* who) {}
void MoveInLineOfSight(Unit* who) {}
@@ -56,6 +72,9 @@ struct TRINITY_DLL_DECL boss_varosAI : public ScriptedAI
void JustDied(Unit* killer)
{
DoScriptText(SAY_DEATH, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_VAROS_EVENT, DONE);
}
void KilledUnit(Unit *victim)
{
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/def_oculus.h b/src/bindings/scripts/scripts/northrend/nexus/oculus/def_oculus.h
index 0b63a52d866..6680e7cf0ba 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/def_oculus.h
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/def_oculus.h
@@ -1,4 +1,28 @@
#ifndef DEF_OCULUS_H
#define DEF_OCULUS_H
+enum Data
+{
+ DATA_DRAKOS_EVENT,
+ DATA_VAROS_EVENT,
+ DATA_UROM_EVENT,
+ DATA_EREGOS_EVENT
+};
+
+enum Data64
+{
+ DATA_DRAKOS,
+ DATA_VAROS,
+ DATA_UROM,
+ DATA_EREGOS
+};
+
+enum Bosses
+{
+ CREATURE_DRAKOS = 27654,
+ CREATURE_VAROS = 27447,
+ CREATURE_UROM = 27655,
+ CREATURE_EREGOS = 27656
+};
+
#endif
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/instance_oculus.cpp b/src/bindings/scripts/scripts/northrend/nexus/oculus/instance_oculus.cpp
index b5ceee9e5ed..324a643c74c 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/instance_oculus.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/instance_oculus.cpp
@@ -1,9 +1,137 @@
#include "precompiled.h"
#include "def_oculus.h"
+#define MAX_ENCOUNTER 4
+
+/* The Occulus encounters:
+0 - Drakos the Interrogator
+1 - Varos Cloudstrider
+2 - Mage-Lord Urom
+3 - Ley-Guardian Eregos */
struct TRINITY_DLL_DECL instance_oculus : public ScriptedInstance
{
instance_oculus(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
+
+ uint64 uiDrakos;
+ uint64 uiVaros;
+ uint64 uiUrom;
+ uint64 uiEregos;
+
+ uint8 m_auiEncounter[MAX_ENCOUNTER];
+ std::string str_data;
+
+ void OnCreatureCreate(Creature* pCreature, bool add)
+ {
+ switch(pCreature->GetEntry())
+ {
+ case CREATURE_DRAKOS:
+ uiDrakos = pCreature->GetGUID();
+ break;
+ case CREATURE_VAROS:
+ uiVaros = pCreature->GetGUID();
+ break;
+ case CREATURE_UROM:
+ uiUrom = pCreature->GetGUID();
+ break;
+ case CREATURE_EREGOS:
+ uiEregos = pCreature->GetGUID();
+ break;
+ }
+ }
+
+ void SetData(uint32 type, uint32 data)
+ {
+ switch(type)
+ {
+ case DATA_DRAKOS_EVENT:
+ m_auiEncounter[0] = data;
+ break;
+ case DATA_VAROS_EVENT:
+ m_auiEncounter[1] = data;
+ break;
+ case DATA_UROM_EVENT:
+ m_auiEncounter[2] = data;
+ break;
+ case DATA_EREGOS_EVENT:
+ m_auiEncounter[3] = data;
+ break;
+ }
+
+ if (data == DONE)
+ SaveToDB();
+ }
+
+ uint32 GetData(uint32 type)
+ {
+ switch(type)
+ {
+ case DATA_DRAKOS_EVENT: return m_auiEncounter[0];
+ case DATA_VAROS_EVENT: return m_auiEncounter[1];
+ case DATA_UROM_EVENT: return m_auiEncounter[2];
+ case DATA_EREGOS_EVENT: return m_auiEncounter[3];
+ }
+
+ return 0;
+ }
+
+ uint64 GetData64(uint32 identifier)
+ {
+ switch(identifier)
+ {
+ case DATA_DRAKOS: return uiDrakos;
+ case DATA_VAROS: return uiVaros;
+ case DATA_UROM: return uiUrom;
+ case DATA_EREGOS: return uiEregos;
+ }
+
+ return 0;
+ }
+
+
+ std::string GetSaveData()
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "T O " << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3];
+
+ str_data = saveStream.str();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return str_data;
+ }
+
+ void Load(const char* in)
+ {
+ if (!in)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(in);
+
+ char dataHead1, dataHead2;
+ uint16 data0, data1, data2, data3;
+
+ std::istringstream loadStream(in);
+ loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3;
+
+ if (dataHead1 == 'T' && dataHead2 == 'O')
+ {
+ m_auiEncounter[0] = data0;
+ m_auiEncounter[1] = data1;
+ m_auiEncounter[2] = data2;
+ m_auiEncounter[3] = data3;
+
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ if (m_auiEncounter[i] == IN_PROGRESS)
+ m_auiEncounter[i] = NOT_STARTED;
+
+ } else OUT_LOAD_INST_DATA_FAIL;
+
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
};
InstanceData* GetInstanceData_instance_oculus(Map* pMap)