mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Oculus: Implemented Drake GPS system
This commit is contained in:
24
sql/updates/world/2015_06_26_02_world.sql
Normal file
24
sql/updates/world/2015_06_26_02_world.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- Oculus GPS System Whispers
|
||||
DELETE FROM `creature_text` where `entry` IN (27755,27756,27692) AND `groupid` IN (5,6,7,8,9,10);
|
||||
INSERT INTO `creature_text` (`entry`, `groupid`, `text`, `type`, `probability`, `comment`, `BroadcastTextID`) VALUES
|
||||
-- Amber Drake
|
||||
(27755, 5, '$3486W Centrifuge Constructs remain. We must find and destroy them to disable Varos Cloudstrider\'s protective shield. The constructs should be about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Amber - Say gps 10 constructs', 29518),
|
||||
(27755, 6, 'One Centrifuge Construct remains. We must find and destroy it to disable Varos Cloudstrider\'s protective shield. The construct should be about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Amber - Say gps 1 construct', 29519),
|
||||
(27755, 7, 'The shield is down; Varos is vulnerable! Defeating him should disperse the Azure Ring Guardians and allow us access to the upper bands. Varos is on a floating platform about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Amber - Say gps Varos', 29520),
|
||||
(27755, 8, 'Mage-Lord Urom is our next target. He should be hiding on one of the floating platforms on the Band of Transmutation, near the top of The Oculus. Be warned, Urom is a powerful conjurer; he may not be alone.', 15, 100, 'Amber - Say gps Lord Urom', 29521),
|
||||
(27755, 9, 'Ley-Guardian Eregos is all that now stands between us and control of The Oculus. He\'s flying above the Band of Alignment, at the very top of The Oculus. Eregos is incredibly powerful; stay on my back when we engage him and leave the fighting to me.', 15, 100, 'Amber - Say gps Eregos', 29522),
|
||||
(27755, 10, 'We\'ve wrested control of The Oculus from the forces of Malygos. You\'re not getting any lighter, little one. My wings itch for the open sky.', 15, 100, 'Amber - Say gps End', 0),
|
||||
-- Ruby Drake
|
||||
(27756, 5, '$3486W Centrifuge Constructs remain. We must find and destroy them to disable Varos Cloudstrider\'s protective shield. The constructs should be about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Ruby - Say gps 10 constructs', 29518),
|
||||
(27756, 6, 'One Centrifuge Construct remains. We must find and destroy it to disable Varos Cloudstrider\'s protective shield. The construct should be about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Ruby - Say gps 1 construct', 29519),
|
||||
(27756, 7, 'The shield is down; Varos is vulnerable! Defeating him should disperse the Azure Ring Guardians and allow us access to the upper bands. Varos is on a floating platform about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Ruby - Say gps Varos', 29520),
|
||||
(27756, 8, 'Mage-Lord Urom is our next target. He should be hiding on one of the floating platforms on the Band of Transmutation, near the top of The Oculus. Be warned, Urom is a powerful conjurer; he may not be alone.', 15, 100, 'Ruby - Say gps Lord Urom', 29521),
|
||||
(27756, 9, 'Ley-Guardian Eregos is all that now stands between us and control of The Oculus. He\'s flying above the Band of Alignment, at the very top of The Oculus. Eregos is incredibly powerful; stay on my back when we engage him and leave the fighting to me.', 15, 100, 'Ruby - Say gps Eregos', 29522),
|
||||
(27756, 10, 'We\'ve wrested control of The Oculus from the forces of Malygos. You\'re not getting any lighter, little one. My wings itch for the open sky.', 15, 100, 'Ruby - Say gps End', 0),
|
||||
-- Emerald Drake
|
||||
(27692, 5, '$3486W Centrifuge Constructs remain. We must find and destroy them to disable Varos Cloudstrider\'s protective shield. The constructs should be about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Emerald - Say gps 10 constructs', 29518),
|
||||
(27692, 6, 'One Centrifuge Construct remains. We must find and destroy it to disable Varos Cloudstrider\'s protective shield. The construct should be about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Emerald - Say gps 1 construct', 29519),
|
||||
(27692, 7, 'The shield is down; Varos is vulnerable! Defeating him should disperse the Azure Ring Guardians and allow us access to the upper bands. Varos is on a floating platform about halfway up The Oculus, on the Band of Acceleration.', 15, 100, 'Emerald - Say gps Varos', 29520),
|
||||
(27692, 8, 'Mage-Lord Urom is our next target. He should be hiding on one of the floating platforms on the Band of Transmutation, near the top of The Oculus. Be warned, Urom is a powerful conjurer; he may not be alone.', 15, 100, 'Emerald - Say gps Lord Urom', 29521),
|
||||
(27692, 9, 'Ley-Guardian Eregos is all that now stands between us and control of The Oculus. He\'s flying above the Band of Alignment, at the very top of The Oculus. Eregos is incredibly powerful; stay on my back when we engage him and leave the fighting to me.', 15, 100, 'Emerald - Say gps Eregos', 29522),
|
||||
(27692, 10, 'We\'ve wrested control of The Oculus from the forces of Malygos. You\'re not getting any lighter, little one. My wings itch for the open sky.', 15, 100, 'Emerald - Say gps End', 0);
|
||||
@@ -229,6 +229,21 @@ class instance_oculus : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
{
|
||||
if (type == DATA_CONSTRUCTS)
|
||||
{
|
||||
if (CentrifugueConstructCounter == 0)
|
||||
return KILL_NO_CONSTRUCT;
|
||||
else if (CentrifugueConstructCounter == 1)
|
||||
return KILL_ONE_CONSTRUCT;
|
||||
else if (CentrifugueConstructCounter > 1)
|
||||
return KILL_MORE_CONSTRUCT;
|
||||
}
|
||||
|
||||
return KILL_NO_CONSTRUCT;
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "CombatAI.h"
|
||||
#include "Player.h"
|
||||
#include "Vehicle.h"
|
||||
@@ -76,6 +77,11 @@ enum Drakes
|
||||
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.
|
||||
/*
|
||||
* All Drakes
|
||||
* GPS System
|
||||
*/
|
||||
SPELL_GPS = 53389,
|
||||
|
||||
// Misc
|
||||
POINT_LAND = 2,
|
||||
@@ -101,7 +107,13 @@ enum Says
|
||||
WHISPER_DRAKES_WELCOME = 1,
|
||||
WHISPER_DRAKES_ABILITIES = 2,
|
||||
WHISPER_DRAKES_SPECIAL = 3,
|
||||
WHISPER_DRAKES_LOWHEALTH = 4
|
||||
WHISPER_DRAKES_LOWHEALTH = 4,
|
||||
WHISPER_GPS_10_CONSTRUCTS = 5,
|
||||
WHISPER_GPS_1_CONSTRUCT = 6,
|
||||
WHISPER_GPS_VAROS = 7,
|
||||
WHISPER_GPS_UROM = 8,
|
||||
WHISPER_GPS_EREGOS = 9,
|
||||
WHISPER_GPS_END = 10
|
||||
};
|
||||
|
||||
class npc_verdisa_beglaristrasz_eternos : public CreatureScript
|
||||
@@ -250,6 +262,26 @@ class npc_ruby_emerald_amber_drake : public CreatureScript
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
{
|
||||
if (Unit* creator = ObjectAccessor::GetUnit(*me, me->GetCreatorGUID()))
|
||||
if (spell->Id == SPELL_GPS)
|
||||
{
|
||||
if (_instance->GetBossState(DATA_EREGOS) == DONE)
|
||||
Talk(WHISPER_GPS_END, creator);
|
||||
else if (_instance->GetBossState(DATA_UROM) == DONE)
|
||||
Talk(WHISPER_GPS_EREGOS, creator);
|
||||
else if (_instance->GetBossState(DATA_VAROS) == DONE)
|
||||
Talk(WHISPER_GPS_UROM, creator);
|
||||
else if (_instance->GetData(DATA_CONSTRUCTS) == KILL_NO_CONSTRUCT)
|
||||
Talk(WHISPER_GPS_VAROS, creator);
|
||||
else if (_instance->GetData(DATA_CONSTRUCTS) == KILL_ONE_CONSTRUCT)
|
||||
Talk(WHISPER_GPS_1_CONSTRUCT, creator);
|
||||
else if (_instance->GetData(DATA_CONSTRUCTS) == KILL_MORE_CONSTRUCT)
|
||||
Talk(WHISPER_GPS_10_CONSTRUCTS, creator);
|
||||
}
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
{
|
||||
if (_instance->GetBossState(DATA_EREGOS) == IN_PROGRESS)
|
||||
|
||||
@@ -29,7 +29,9 @@ enum DataTypes
|
||||
DATA_DRAKOS = 0,
|
||||
DATA_VAROS = 1,
|
||||
DATA_UROM = 2,
|
||||
DATA_EREGOS = 3
|
||||
DATA_EREGOS = 3,
|
||||
// GPS System
|
||||
DATA_CONSTRUCTS = 4
|
||||
};
|
||||
|
||||
enum CreatureIds
|
||||
@@ -91,6 +93,13 @@ enum InstanceEvents
|
||||
EVENT_EREGOS_INTRO
|
||||
};
|
||||
|
||||
enum ConstructKillState
|
||||
{
|
||||
KILL_NO_CONSTRUCT = 0,
|
||||
KILL_ONE_CONSTRUCT = 1,
|
||||
KILL_MORE_CONSTRUCT = 2
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
POINT_MOVE_OUT = 1
|
||||
|
||||
Reference in New Issue
Block a user