The Necrotic Wake
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "necrotic_wake.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_LAND_OF_THE_DEAD_CAST = 321226,
|
||||
SPELL_LAND_OF_THE_DEAD_MISSILE = 319874,
|
||||
SPELL_LAND_OF_THE_DEAD_MISSILE_SECOND = 319902,
|
||||
SPELL_LAND_OF_THE_DEAD_MISSILE_THIRD = 333627,
|
||||
SPELL_FINAL_HARVEST = 321247,
|
||||
SPELL_FINAL_HARVEST_DAMAGE = 321253,
|
||||
SPELL_NECROTIC_BOLT = 320170,
|
||||
SPELL_UNHOLY_FRENZY = 320012,
|
||||
SPELL_NECROTIC_BREATH_TRIGGER = 337074,
|
||||
EVENT_LAND_OF_THE_DEAD = 1,
|
||||
EVENT_NECROTIC_BREATH
|
||||
};
|
||||
|
||||
//163157
|
||||
struct boss_amarth : public BossAI
|
||||
{
|
||||
boss_amarth(Creature* creature) : BossAI(creature, DATA_AMARTH)
|
||||
{
|
||||
Vehicle* vehicle = me->GetVehicleKit();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
_JustEngagedWith(who);
|
||||
Talk(0);
|
||||
events.ScheduleEvent(SPELL_NECROTIC_BOLT, 3s);
|
||||
events.ScheduleEvent(EVENT_LAND_OF_THE_DEAD, 5s);
|
||||
events.ScheduleEvent(SPELL_FINAL_HARVEST, 8s);
|
||||
events.ScheduleEvent(EVENT_NECROTIC_BREATH, 10s);
|
||||
if (Creature* amarth = me->FindNearestCreature(NPC_AMARTH, 30.0f, true))
|
||||
amarth->EnterVehicle(me);
|
||||
}
|
||||
|
||||
void OnSuccessfulSpellCast(SpellInfo const* spellInfo)
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_FINAL_HARVEST:
|
||||
DoCastAOE(SPELL_FINAL_HARVEST_DAMAGE, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case SPELL_NECROTIC_BOLT:
|
||||
DoCastVictim(SPELL_NECROTIC_BOLT, false);
|
||||
events.Repeat(15s);
|
||||
break;
|
||||
|
||||
case EVENT_LAND_OF_THE_DEAD:
|
||||
me->CastSpell(nullptr, SPELL_LAND_OF_THE_DEAD_CAST, false);
|
||||
me->CastSpell(me->GetRandomNearPosition(20.0f), SPELL_LAND_OF_THE_DEAD_MISSILE, true);
|
||||
me->CastSpell(me->GetRandomNearPosition(20.0f), SPELL_LAND_OF_THE_DEAD_MISSILE_SECOND, true);
|
||||
me->CastSpell(me->GetRandomNearPosition(20.0f), SPELL_LAND_OF_THE_DEAD_MISSILE_THIRD, true);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
|
||||
case SPELL_FINAL_HARVEST:
|
||||
me->CastSpell(nullptr, SPELL_FINAL_HARVEST, false);
|
||||
events.Repeat(25s);
|
||||
break;
|
||||
|
||||
case EVENT_NECROTIC_BREATH:
|
||||
SetCombatMovement(false);
|
||||
me->AddAura(SPELL_NECROTIC_BREATH_TRIGGER, me);
|
||||
events.Repeat(30s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
_JustReachedHome();
|
||||
me->RemoveAllAreaTriggers();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(1);
|
||||
me->RemoveAllAreaTriggers();
|
||||
}
|
||||
};
|
||||
|
||||
//162692
|
||||
struct npc_amarth : public ScriptedAI
|
||||
{
|
||||
npc_amarth(Creature* c) : ScriptedAI(c) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ScriptedAI::Reset();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_amarth()
|
||||
{
|
||||
RegisterCreatureAI(boss_amarth);
|
||||
RegisterCreatureAI(npc_amarth);
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Map.h"
|
||||
#include "necrotic_wake.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CRUNCH = 320655,
|
||||
SPELL_HEAVING_RETCH = 320596,
|
||||
SPELL_HEAVING_RETCH_MISSILE = 320699,
|
||||
SPELL_FETID_GAS_CREATE_AT = 320637,
|
||||
SPELL_FETID_GAS_AURA = 320646,
|
||||
//Carrion Worm
|
||||
SPELL_BLOOD_GORGE = 320614,
|
||||
SPELL_BLOOD_GORGE_BUFF = 320630,
|
||||
SPELL_CARRION_ERUPTION = 320631,
|
||||
|
||||
};
|
||||
|
||||
enum blightboneTalks : uint8
|
||||
{
|
||||
TALK_AGGRO = 0,
|
||||
TALK_DEATH = 1,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SPELL_CAST_START = 1,
|
||||
EVENT_SPELL_PERIODIC_DAMAGE,
|
||||
EVENT_SPELL_PERIODIC_MISSED,
|
||||
EVENT_UNIT_SPELLCAST_START
|
||||
};
|
||||
|
||||
//162691
|
||||
|
||||
struct boss_blightbone : public BossAI
|
||||
{
|
||||
boss_blightbone(Creature* creature) : BossAI(creature, DATA_BLIGHTBONE)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
scheduler.ClearValidator();
|
||||
BossAI::InitializeAI();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
scheduler.CancelAll();
|
||||
summons.DespawnAll();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(TALK_AGGRO);
|
||||
DoCastVictim(SPELL_HEAVING_RETCH);
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
|
||||
if (auto* encounterDoor = me->FindNearestGameObject(GO_BLIGHTBONE_EXIT, 100.0f))
|
||||
encounterDoor->SetGoState(GO_STATE_READY);
|
||||
events.ScheduleEvent(EVENT_SPELL_CAST_START, 3s);
|
||||
events.ScheduleEvent(EVENT_SPELL_PERIODIC_DAMAGE, 5s);
|
||||
events.ScheduleEvent(EVENT_SPELL_PERIODIC_MISSED, 10s);
|
||||
events.ScheduleEvent(EVENT_UNIT_SPELLCAST_START, 15s);
|
||||
}
|
||||
|
||||
void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_HEAVING_RETCH:
|
||||
if (target->IsUnit())
|
||||
me->AddAura(SPELL_HEAVING_RETCH, target->ToUnit());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SPELL_CAST_START:
|
||||
DoCastVictim(SPELL_CRUNCH, true);
|
||||
SpellCastVisual();
|
||||
DoCastRandom(SPELL_HEAVING_RETCH, true);
|
||||
DoCastAOE(SPELL_HEAVING_RETCH);
|
||||
events.Repeat(10s);
|
||||
break;
|
||||
case EVENT_SPELL_PERIODIC_DAMAGE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_HEAVING_RETCH);
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case EVENT_SPELL_PERIODIC_MISSED:
|
||||
me->CastSpell(nullptr, SPELL_FETID_GAS_CREATE_AT, false);
|
||||
events.Repeat(18s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
_JustReachedHome();
|
||||
me->RemoveAllAreaTriggers();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(TALK_DEATH);
|
||||
me->RemoveAllAreaTriggers();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
if (auto* encounterDoor = me->FindNearestGameObject(GO_BLIGHTBONE_EXIT, 100.0f))
|
||||
encounterDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//23443
|
||||
struct at_fetid_gas : public AreaTriggerAI
|
||||
{
|
||||
at_fetid_gas(AreaTrigger* at) : AreaTriggerAI(at) { }
|
||||
|
||||
void OnUnitEnter(Unit* target) override
|
||||
{
|
||||
if (!target->IsPlayer())
|
||||
return;
|
||||
|
||||
if (!target->HasAura(SPELL_FETID_GAS_AURA))
|
||||
at->GetCaster()->AddAura(SPELL_FETID_GAS_AURA, target);
|
||||
}
|
||||
|
||||
void OnUnitExit(Unit* target, AreaTriggerExitReason /*reason*/) override
|
||||
{
|
||||
if (target->HasAura(SPELL_FETID_GAS_AURA))
|
||||
target->RemoveAura(SPELL_FETID_GAS_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
//164702
|
||||
struct npc_carrion_worm_nw : public ScriptedAI
|
||||
{
|
||||
npc_carrion_worm_nw(Creature* c) : ScriptedAI(c) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ScriptedAI::Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
_events.ScheduleEvent(SPELL_BLOOD_GORGE, 3s);
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
if (Aura const* gorge = me->GetAura(SPELL_BLOOD_GORGE_BUFF))
|
||||
if (gorge->GetStackAmount() == 3)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_BLOOD_GORGE_BUFF);
|
||||
me->CastSpell(nullptr, SPELL_CARRION_ERUPTION, false);
|
||||
}
|
||||
|
||||
switch (eventId)
|
||||
{
|
||||
case SPELL_BLOOD_GORGE:
|
||||
DoCastVictim(SPELL_BLOOD_GORGE, false);
|
||||
me->AddAura(SPELL_BLOOD_GORGE_BUFF, me);
|
||||
_events.Repeat(10s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
{
|
||||
if (IsMythic())
|
||||
me->CastSpell(nullptr, SPELL_FETID_GAS_CREATE_AT, true);
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
void AddSC_boss_blightbone()
|
||||
{
|
||||
RegisterCreatureAI(boss_blightbone);
|
||||
RegisterAreaTriggerAI(at_fetid_gas);
|
||||
RegisterCreatureAI(npc_carrion_worm_nw);
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "necrotic_wake.h"
|
||||
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_FINAL_HARVEST = 321247,
|
||||
SPELL_LAND_OF_THE_DEAD = 321226,
|
||||
SPELL_NECROTIC_BOLT = 320170,
|
||||
SPELL_UNHOLY_FRENZY = 320012,
|
||||
SPELL_FINAL_HARVEST_DAMAGE = 321253,
|
||||
SPELL_LAND_OF_THE_DEAD_CAST = 321226,
|
||||
SPELL_LAND_OF_THE_DEAD_MISSILE = 319874,
|
||||
SPELL_LAND_OF_THE_DEAD_MISSILE_SECOND = 319902,
|
||||
SPELL_LAND_OF_THE_DEAD_MISSILE_THIRD = 333627,
|
||||
SPELL_NECROTIC_BREATH_TRIGGER = 337074,
|
||||
EVENT_LAND_OF_THE_DEAD = 1,
|
||||
EVENT_NECROTIC_BREATH
|
||||
};
|
||||
|
||||
//166945
|
||||
struct boss_nalthor : public BossAI
|
||||
{
|
||||
boss_nalthor(Creature* creature) : BossAI(creature, DATA_AMARTH)
|
||||
{
|
||||
Vehicle* vehicle = me->GetVehicleKit();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
_JustEngagedWith(who);
|
||||
Talk(0);
|
||||
events.ScheduleEvent(SPELL_NECROTIC_BOLT, 3s);
|
||||
events.ScheduleEvent(EVENT_LAND_OF_THE_DEAD, 5s);
|
||||
events.ScheduleEvent(SPELL_FINAL_HARVEST, 8s);
|
||||
events.ScheduleEvent(EVENT_NECROTIC_BREATH, 10s);
|
||||
}
|
||||
|
||||
void OnSpellFinished(SpellInfo const* spellInfo)
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_FINAL_HARVEST:
|
||||
DoCastAOE(SPELL_FINAL_HARVEST_DAMAGE, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case SPELL_NECROTIC_BOLT:
|
||||
DoCastVictim(SPELL_NECROTIC_BOLT, false);
|
||||
events.Repeat(15s);
|
||||
break;
|
||||
|
||||
case EVENT_LAND_OF_THE_DEAD:
|
||||
me->CastSpell(nullptr, SPELL_LAND_OF_THE_DEAD_CAST, false);
|
||||
me->CastSpell(me->GetRandomNearPosition(20.0f), SPELL_LAND_OF_THE_DEAD_MISSILE, true);
|
||||
me->CastSpell(me->GetRandomNearPosition(20.0f), SPELL_LAND_OF_THE_DEAD_MISSILE_SECOND, true);
|
||||
me->CastSpell(me->GetRandomNearPosition(20.0f), SPELL_LAND_OF_THE_DEAD_MISSILE_THIRD, true);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
|
||||
case SPELL_FINAL_HARVEST:
|
||||
me->CastSpell(nullptr, SPELL_FINAL_HARVEST, false);
|
||||
events.Repeat(25s);
|
||||
break;
|
||||
|
||||
case EVENT_NECROTIC_BREATH:
|
||||
SetCombatMovement(false);
|
||||
me->AddAura(SPELL_NECROTIC_BREATH_TRIGGER, me);
|
||||
events.Repeat(30s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
_JustReachedHome();
|
||||
me->RemoveAllAreaTriggers();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(1);
|
||||
me->RemoveAllAreaTriggers();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void AddSC_boss_nalthor()
|
||||
{
|
||||
RegisterCreatureAI(boss_nalthor);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Map.h"
|
||||
#include "necrotic_wake.h"
|
||||
|
||||
enum SurgeonSpells
|
||||
{
|
||||
//Surgeon Stitchflesh
|
||||
SPELL_NOXIOUS_FOG = 327100,
|
||||
SPELL_EMBALMING_ICHOR = 327664,
|
||||
SPELL_STITCHNEEDLE = 320200,
|
||||
SPELL_SEVER_FLESH = 334488,
|
||||
SPELL_MORBID_FIXATION = 343555,
|
||||
SPELL_ESCAPE = 320359,
|
||||
//Stitchflesh's Creation
|
||||
SPELL_MEAT_HOOK = 320208,
|
||||
SPELL_MEAT_HOOK_2 = 322548,
|
||||
SPELL_MEAT_HOOK_3 = 322681,
|
||||
SPELL_AWAKEN_CREATION = 320358,
|
||||
SPELL_FESTERING_ROT = 348170,
|
||||
SPELL_LETHARGY = 326868,
|
||||
SPELL_MEERAHS_JUKEBOX = 288865,
|
||||
SPELL_MUTILATE = 320376,
|
||||
SPELL_SHATTERED_PSYCHE = 344663,
|
||||
SPELL_SPELL_SEVER_FLESH = 334488,
|
||||
};
|
||||
|
||||
enum SurgeonCreatures
|
||||
{
|
||||
NPC_STITCHFLESHS_CREATION = 164578,
|
||||
NPC_STITCHING_ASSISTANT = 173044,
|
||||
NPC_SEPARATION_ASSISTANT = 167731,
|
||||
NPC_GOREGRIND_BITS = 163622,
|
||||
NPC_GOREGRIND = 163621,
|
||||
NPC_ROTSPEW = 163620,
|
||||
NPC_ROTSPEW_LEFTOVERS = 163623,
|
||||
};
|
||||
|
||||
//166882
|
||||
struct boss_surgeon_stitchflesh : public BossAI
|
||||
{
|
||||
boss_surgeon_stitchflesh(Creature* creature) : BossAI(creature, DATA_SURGEON_STITCHFLESH) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
_JustEngagedWith(who);
|
||||
Talk(0);
|
||||
events.ScheduleEvent(SPELL_NOXIOUS_FOG, 3s);
|
||||
events.ScheduleEvent(SPELL_EMBALMING_ICHOR, 5s);
|
||||
events.ScheduleEvent(SPELL_STITCHNEEDLE, 10s);
|
||||
events.ScheduleEvent(SPELL_SPELL_SEVER_FLESH, 3s);
|
||||
events.ScheduleEvent(SPELL_MORBID_FIXATION, 3s);
|
||||
events.ScheduleEvent(SPELL_ESCAPE, 3s);
|
||||
}
|
||||
|
||||
void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
Unit* ptarget = me->GetVictim();
|
||||
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_NOXIOUS_FOG:
|
||||
me->AddAura(SPELL_NOXIOUS_FOG, ptarget);
|
||||
break;
|
||||
case SPELL_EMBALMING_ICHOR:
|
||||
me->AddAura(SPELL_EMBALMING_ICHOR, ptarget);
|
||||
break;
|
||||
case SPELL_STITCHNEEDLE:
|
||||
me->AddAura(SPELL_STITCHNEEDLE, ptarget);
|
||||
break;
|
||||
case SPELL_SPELL_SEVER_FLESH:
|
||||
me->AddAura(SPELL_SPELL_SEVER_FLESH, ptarget);
|
||||
break;
|
||||
case SPELL_MORBID_FIXATION:
|
||||
me->AddAura(SPELL_MORBID_FIXATION, ptarget);
|
||||
break;
|
||||
case SPELL_ESCAPE:
|
||||
me->AddAura(SPELL_ESCAPE, ptarget);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case SPELL_NOXIOUS_FOG:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_NOXIOUS_FOG), false;
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case SPELL_EMBALMING_ICHOR:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_EMBALMING_ICHOR), false;
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case SPELL_STITCHNEEDLE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_STITCHNEEDLE), false;
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case SPELL_SEVER_FLESH:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_SEVER_FLESH), false;
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case SPELL_MORBID_FIXATION:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_MORBID_FIXATION), false;
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case SPELL_ESCAPE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 100.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_ESCAPE), false;
|
||||
}
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
_JustReachedHome();
|
||||
me->RemoveAllAreaTriggers();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(1);
|
||||
me->RemoveAllAreaTriggers();
|
||||
// if (auto* encounterDoor = me->FindNearestGameObject(GO_SURGEON_STITCHFLESH_EXIT, 100.0f))
|
||||
// encounterDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
};
|
||||
};
|
||||
|
||||
//166882
|
||||
void AddSC_boss_surgeon_stitchflesh()
|
||||
{
|
||||
RegisterCreatureAI(boss_surgeon_stitchflesh);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
#include "necrotic_wake.h"
|
||||
#include "Conversation.h"
|
||||
#include "Creature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Map.h"
|
||||
#include "Transport.h"
|
||||
#include "TransportMgr.h"
|
||||
|
||||
class instance_necrotic_wake : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_necrotic_wake() : InstanceMapScript("instance_necrotic_wake", 2286) { }
|
||||
|
||||
struct instance_necrotic_wake_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_necrotic_wake_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
if (Transport* transport = sTransportMgr->CreateTransport(GO_NECROPOLIS_TRANSPORT, instance))
|
||||
{
|
||||
transport->SetDynamicFlag(GO_DYNFLAG_LO_STOPPED);
|
||||
transport->SetFlag(GameObjectFlags(GO_FLAG_MAP_OBJECT | GO_FLAG_NODESPAWN | GO_FLAG_TRANSPORT));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
{
|
||||
return new instance_necrotic_wake_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void AddSC_instance_necrotic_wake()
|
||||
{
|
||||
new instance_necrotic_wake();
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "necrotic_wake.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_ANIMA_MISSILE = 335159,
|
||||
SPELL_ANIMA_CREATE_AT = 335160,
|
||||
SPELL_ANIMA_BUFF = 335161,
|
||||
SPELL_COLLAPSED_GOLIATH = 335155,
|
||||
};
|
||||
|
||||
//171750
|
||||
struct npc_malfunctioning_goliath : public ScriptedAI
|
||||
{
|
||||
npc_malfunctioning_goliath(Creature* c) : ScriptedAI(c) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ScriptedAI::Reset();
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
}
|
||||
|
||||
void OnSpellClick(Unit* clicker, bool result) override
|
||||
{
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
me->RemoveAura(SPELL_COLLAPSED_GOLIATH);
|
||||
for (uint16 i = 0; i < 16; i++)
|
||||
{
|
||||
me->CastSpell(me->GetRandomNearPosition(15.0f), SPELL_ANIMA_MISSILE, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//25432
|
||||
struct at_anima_exhaust : public AreaTriggerAI
|
||||
{
|
||||
at_anima_exhaust(AreaTrigger* at) : AreaTriggerAI(at) { }
|
||||
|
||||
void OnUnitEnter(Unit* unit) override
|
||||
{
|
||||
if (!unit->IsPlayer())
|
||||
return;
|
||||
|
||||
if (!unit->HasAura(SPELL_ANIMA_BUFF))
|
||||
at->GetCaster()->AddAura(SPELL_ANIMA_BUFF, unit);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_necrotic_wake()
|
||||
{
|
||||
RegisterCreatureAI(npc_malfunctioning_goliath);
|
||||
RegisterAreaTriggerAI(at_anima_exhaust);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) WowCommunity Project
|
||||
*
|
||||
* This SourceCode is NOT free a software. Please hold everything Private
|
||||
* and read our Terms
|
||||
*/
|
||||
|
||||
enum Data
|
||||
{
|
||||
DATA_BLIGHTBONE = 1,
|
||||
DATA_AMARTH,
|
||||
DATA_SURGEON_STITCHFLESH,
|
||||
DATA_NALTHOR
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_BLIGHTBONE = 162691,
|
||||
NPC_AMARTH = 162692,
|
||||
NPC_AMARTH_MOUNT = 163157,
|
||||
NPC_SURGEON_STITCHFLESH = 166882,
|
||||
NPC_NALTHORN = 166945,
|
||||
};
|
||||
|
||||
enum Gameobjects
|
||||
{
|
||||
GO_NECROPOLIS_TRANSPORT = 344772,
|
||||
GO_BLIGHTBONE_EXIT = 352094,
|
||||
};
|
||||
@@ -64,6 +64,14 @@ void AddSC_boss_swampface();
|
||||
void AddSC_instance_ecodome_aldani();
|
||||
void AddSC_boss_azhiccar();
|
||||
|
||||
//The Necrotic Wake
|
||||
void AddSC_instance_necrotic_wake();
|
||||
void AddSC_boss_amarth();
|
||||
void AddSC_boss_blightbone();
|
||||
void AddSC_boss_nalthor();
|
||||
void AddSC_boss_surgeon_stitchflesh();
|
||||
void AddSC_necrotic_wake();
|
||||
|
||||
// The name of this function should match:
|
||||
// void Add${NameOfDirectory}Scripts()
|
||||
void AddWarWithinScripts()
|
||||
@@ -122,4 +130,12 @@ void AddWarWithinScripts()
|
||||
//Eco Dome Aldani
|
||||
AddSC_instance_ecodome_aldani();
|
||||
AddSC_boss_azhiccar();
|
||||
|
||||
//The Necrotic Wake
|
||||
AddSC_instance_necrotic_wake();
|
||||
AddSC_boss_amarth();
|
||||
AddSC_boss_blightbone();
|
||||
AddSC_boss_nalthor();
|
||||
AddSC_boss_surgeon_stitchflesh();
|
||||
AddSC_necrotic_wake();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user