Vaelstraz intro - done

This commit is contained in:
FALL1N1
2020-11-11 02:00:12 +02:00
parent ac77990661
commit c29458b493
3 changed files with 71 additions and 20 deletions

View File

@@ -292,3 +292,12 @@ INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (@SHADOWFLAME
UPDATE `gameobject_template` SET `ScriptName`='go_chromaggus_lever' WHERE `entry`=179148;
DELETE FROM `gameobject` WHERE `guid` IN(75160,75163,7228,7227,);
DELETE FROM `conditions` WHERE `SourceEntry` IN(23642,14984) AND `ConditionValue2` = 13020;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 23642, 0, 0, 31, 0, 3, 13020, 0, 0, 0, 0, '', 'Spell \'Nefarius Corruption\' targets Vaelstrasz'),
(13, 1, 19484, 0, 0, 31, 0, 3, 13020, 0, 0, 0, 0, '', 'Spell \'Red Lightning\' targets Vaelstrasz');
DELETE FROM `broadcast_text` WHERE `ID` = 100003;
INSERT INTO `broadcast_text` (`ID`, `Language`, `MaleText`, `FemaleText`, `EmoteID0`, `EmoteID1`, `EmoteID2`, `EmoteDelay0`, `EmoteDelay1`, `EmoteDelay2`, `SoundId`, `Unk1`, `Unk2`, `VerifiedBuild`) VALUES
(100003, 0, 'Ah...the heroes. You are persistent, aren\\\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you. Get up little Red Wyrm, and destroy them!', 'Ah...the heroes. You are persistent, aren\\\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you. Get up little Red Wyrm, and destroy them!', 0, 0, 0, 0, 0, 0, 8279, 0, 0, 0);

View File

@@ -76,6 +76,8 @@ enum BWLMisc
ACTION_PHASE_TWO = 1,
DATA_EGG_EVENT = 2,
TALK_EGG_BROKEN_RAND = 3,
SAY_NEFARIAN_VAEL_INTRO = 100003, // latest id in broadcast_text atm
};
#endif

View File

@@ -11,7 +11,9 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScript.h"
constexpr float aNefariusSpawnLoc[4] = { -7466.16f, -1040.80f, 412.053f, 2.14675f };
enum Says
{
@@ -35,7 +37,9 @@ enum Spells
SPELL_TAILSWIPE = 15847,
SPELL_BURNINGADRENALINE = 18173, //Cast this one. It's what 3.3.5 DBM expects.
SPELL_BURNINGADRENALINE_EXPLOSION = 23478,
SPELL_CLEAVE = 19983 //Chain cleave is most likely named something different and contains a dummy effect
SPELL_CLEAVE = 19983, //Chain cleave is most likely named something different and contains a dummy effect
SPELL_NEFARIUS_CORRUPTION = 23642,
SPELL_RED_LIGHTNING = 19484,
};
enum Events
@@ -44,13 +48,16 @@ enum Events
EVENT_SPEECH_2 = 2,
EVENT_SPEECH_3 = 3,
EVENT_SPEECH_4 = 4,
EVENT_ESSENCEOFTHERED = 5,
EVENT_FLAMEBREATH = 6,
EVENT_FIRENOVA = 7,
EVENT_TAILSWIPE = 8,
EVENT_CLEAVE = 9,
EVENT_BURNINGADRENALINE_CASTER = 10,
EVENT_BURNINGADRENALINE_TANK = 11
EVENT_SPEECH_5 = 5,
EVENT_SPEECH_6 = 6,
EVENT_SPEECH_7 = 7,
EVENT_ESSENCEOFTHERED = 8,
EVENT_FLAMEBREATH = 9,
EVENT_FIRENOVA = 10,
EVENT_TAILSWIPE = 11,
EVENT_CLEAVE = 12,
EVENT_BURNINGADRENALINE_CASTER = 13,
EVENT_BURNINGADRENALINE_TANK = 14,
};
class boss_vaelastrasz : public CreatureScript
@@ -63,15 +70,16 @@ public:
boss_vaelAI(Creature* creature) : BossAI(creature, DATA_VAELASTRAZ_THE_CORRUPT)
{
Initialize();
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
creature->setFaction(35);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void Initialize()
{
PlayerGUID = 0;
HasYelled = false;
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->setFaction(35);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void Reset() override
@@ -79,6 +87,7 @@ public:
_Reset();
me->SetStandState(UNIT_STAND_STATE_DEAD);
me->SetReactState(REACT_PASSIVE);
Initialize();
}
@@ -126,23 +135,43 @@ public:
switch (eventId)
{
case EVENT_SPEECH_1:
me->SummonCreature(NPC_VICTOR_NEFARIUS, aNefariusSpawnLoc[0], aNefariusSpawnLoc[1], aNefariusSpawnLoc[2], aNefariusSpawnLoc[3], TEMPSUMMON_TIMED_DESPAWN, 35000);
events.ScheduleEvent(EVENT_SPEECH_2, 1000);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
break;
case EVENT_SPEECH_2:
if (Creature* nefarius = me->GetMap()->GetCreature(m_nefariusGuid))
{
nefarius->CastSpell(me, SPELL_NEFARIUS_CORRUPTION, TRIGGERED_CAST_DIRECTLY);
nefarius->MonsterYell(SAY_NEFARIAN_VAEL_INTRO, LANG_UNIVERSAL, 0);
nefarius->SetStandState(UNIT_STAND_STATE_STAND);
}
events.ScheduleEvent(EVENT_SPEECH_3, 18000);
break;
case EVENT_SPEECH_3:
if (Creature* nefarius = me->GetMap()->GetCreature(m_nefariusGuid))
nefarius->CastSpell(me, SPELL_RED_LIGHTNING, TRIGGERED_NONE);
events.ScheduleEvent(EVENT_SPEECH_4, 6000);
break;
case EVENT_SPEECH_4:
Talk(SAY_LINE1);
me->SetStandState(UNIT_STAND_STATE_STAND);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
events.ScheduleEvent(EVENT_SPEECH_2, 12000);
events.ScheduleEvent(EVENT_SPEECH_5, 12000);
break;
case EVENT_SPEECH_2:
case EVENT_SPEECH_5:
Talk(SAY_LINE2);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
events.ScheduleEvent(EVENT_SPEECH_3, 12000);
events.ScheduleEvent(EVENT_SPEECH_6, 12000);
break;
case EVENT_SPEECH_3:
case EVENT_SPEECH_6:
Talk(SAY_LINE3);
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
events.ScheduleEvent(EVENT_SPEECH_4, 16000);
events.ScheduleEvent(EVENT_SPEECH_7, 16000);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
break;
case EVENT_SPEECH_4:
me->setFaction(103); // Black Dragonflight
case EVENT_SPEECH_7:
me->setFaction(103);
if (PlayerGUID && ObjectAccessor::GetUnit(*me, PlayerGUID))
AttackStart(ObjectAccessor::GetUnit(*me, PlayerGUID));;
break;
@@ -211,6 +240,16 @@ public:
DoMeleeAttackIfReady();
}
void JustSummoned(Creature* summoned) override
{
if (summoned->GetEntry() == NPC_VICTOR_NEFARIUS)
{
// Set not selectable, so players won't interact with it
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_nefariusGuid = summoned->GetGUID();
}
}
void sGossipSelect(Player* player, uint32 sender, uint32 action)
{
if (sender == GOSSIP_ID && action == 0)
@@ -222,6 +261,7 @@ public:
private:
uint64 PlayerGUID;
uint64 m_nefariusGuid;
bool HasYelled;
};
@@ -231,7 +271,7 @@ public:
}
};
//Need to define an aurascript for EVENT_BURNINGADRENALINE's death effect.
// Need to define an aurascript for EVENT_BURNINGADRENALINE's death effect.
// 18173 - Burning Adrenaline
class spell_vael_burning_adrenaline : public SpellScriptLoader
{