mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Scripts/Oculus: Implemented Drake GPS system
This commit is contained in:
@@ -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