mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/HellfireCitadel): Mass struct/model update (#16264)
* init * . * check codestyle (ubuntu-20.04) * ubuntu-20.04-clang-with-modules * clang
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (19130,30925,12739,30500,30495);
|
||||||
|
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`) VALUES
|
||||||
|
(19130, 19130, 40392),
|
||||||
|
(30925, 30925, 40059),
|
||||||
|
(12739, 12739, 15472),
|
||||||
|
(30500, 30500, 35954),
|
||||||
|
(30495, 30495, 35953);
|
||||||
|
|
||||||
@@ -21,14 +21,17 @@
|
|||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
#include "blood_furnace.h"
|
#include "blood_furnace.h"
|
||||||
|
|
||||||
enum eEnums
|
enum Say
|
||||||
{
|
{
|
||||||
SAY_AGGRO = 0,
|
SAY_AGGRO = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
SPELL_SLIME_SPRAY = 30913,
|
SPELL_SLIME_SPRAY = 30913,
|
||||||
SPELL_POISON_CLOUD = 30916,
|
SPELL_POISON_CLOUD = 30916,
|
||||||
SPELL_POISON_BOLT = 30917,
|
SPELL_POISON_BOLT = 30917,
|
||||||
SPELL_POISON = 30914,
|
SPELL_POISON = 30914
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_broggok : public BossAI
|
struct boss_broggok : public BossAI
|
||||||
@@ -52,7 +55,6 @@ struct boss_broggok : public BossAI
|
|||||||
void JustSummoned(Creature* summoned) override
|
void JustSummoned(Creature* summoned) override
|
||||||
{
|
{
|
||||||
summons.Summon(summoned);
|
summons.Summon(summoned);
|
||||||
|
|
||||||
summoned->SetFaction(FACTION_MONSTER_2);
|
summoned->SetFaction(FACTION_MONSTER_2);
|
||||||
summoned->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
summoned->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
summoned->CastSpell(summoned, SPELL_POISON, true, 0, 0, me->GetGUID());
|
summoned->CastSpell(summoned, SPELL_POISON, true, 0, 0, me->GetGUID());
|
||||||
@@ -80,7 +82,6 @@ struct boss_broggok : public BossAI
|
|||||||
DoCastSelf(SPELL_POISON_CLOUD);
|
DoCastSelf(SPELL_POISON_CLOUD);
|
||||||
context.Repeat(20s);
|
context.Repeat(20s);
|
||||||
});
|
});
|
||||||
|
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
me->SetImmuneToAll(false);
|
me->SetImmuneToAll(false);
|
||||||
@@ -106,7 +107,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
go->UseDoorOrButton();
|
go->UseDoorOrButton();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -121,6 +121,7 @@ class spell_broggok_poison_cloud : public AuraScript
|
|||||||
{
|
{
|
||||||
if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell))
|
if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +143,6 @@ class spell_broggok_poison_cloud : public AuraScript
|
|||||||
void AddSC_boss_broggok()
|
void AddSC_boss_broggok()
|
||||||
{
|
{
|
||||||
RegisterBloodFurnaceCreatureAI(boss_broggok);
|
RegisterBloodFurnaceCreatureAI(boss_broggok);
|
||||||
new go_broggok_lever();
|
|
||||||
RegisterSpellScript(spell_broggok_poison_cloud);
|
RegisterSpellScript(spell_broggok_poison_cloud);
|
||||||
|
new go_broggok_lever();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,15 +20,18 @@
|
|||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
#include "blood_furnace.h"
|
#include "blood_furnace.h"
|
||||||
|
|
||||||
enum eKelidan
|
enum Says
|
||||||
{
|
{
|
||||||
SAY_WAKE = 0,
|
SAY_WAKE = 0,
|
||||||
SAY_ADD_AGGRO = 1,
|
SAY_ADD_AGGRO = 1,
|
||||||
SAY_KILL = 2,
|
SAY_KILL = 2,
|
||||||
SAY_NOVA = 3,
|
SAY_NOVA = 3,
|
||||||
SAY_DIE = 4,
|
SAY_DIE = 4
|
||||||
|
};
|
||||||
|
|
||||||
// Keldian spells
|
enum Spells
|
||||||
|
{
|
||||||
|
// Keldian
|
||||||
SPELL_CORRUPTION = 30938,
|
SPELL_CORRUPTION = 30938,
|
||||||
SPELL_EVOCATION = 30935,
|
SPELL_EVOCATION = 30935,
|
||||||
SPELL_FIRE_NOVA = 33132,
|
SPELL_FIRE_NOVA = 33132,
|
||||||
@@ -36,23 +39,16 @@ enum eKelidan
|
|||||||
SPELL_BURNING_NOVA = 30940,
|
SPELL_BURNING_NOVA = 30940,
|
||||||
SPELL_VORTEX = 37370,
|
SPELL_VORTEX = 37370,
|
||||||
|
|
||||||
// Channelers spells
|
// Channelers
|
||||||
SPELL_SHADOW_BOLT = 12739,
|
SPELL_SHADOW_BOLT = 12739,
|
||||||
SPELL_SHADOW_BOLT_H = 15472,
|
|
||||||
SPELL_MARK_OF_SHADOW = 30937,
|
SPELL_MARK_OF_SHADOW = 30937,
|
||||||
SPELL_CHANNELING = 39123,
|
SPELL_CHANNELING = 39123
|
||||||
|
};
|
||||||
|
|
||||||
// Events
|
enum Actions
|
||||||
EVENT_SPELL_VOLLEY = 1,
|
{
|
||||||
EVENT_SPELL_CORRUPTION = 2,
|
|
||||||
EVENT_SPELL_BURNING_NOVA = 3,
|
|
||||||
EVENT_SPELL_FIRE_NOVA = 4,
|
|
||||||
EVENT_SPELL_SHADOW_BOLT = 5,
|
|
||||||
EVENT_SPELL_MARK = 6,
|
|
||||||
|
|
||||||
// Actions
|
|
||||||
ACTION_CHANNELER_ENGAGED = 1,
|
ACTION_CHANNELER_ENGAGED = 1,
|
||||||
ACTION_CHANNELER_DIED = 2,
|
ACTION_CHANNELER_DIED = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
const float ShadowmoonChannelers[5][4] =
|
const float ShadowmoonChannelers[5][4] =
|
||||||
@@ -64,22 +60,16 @@ const float ShadowmoonChannelers[5][4] =
|
|||||||
{316.0f, -109.0f, -24.6f, 1.257f}
|
{316.0f, -109.0f, -24.6f, 1.257f}
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_kelidan_the_breaker : public CreatureScript
|
struct boss_kelidan_the_breaker : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_kelidan_the_breaker(Creature* creature) : BossAI(creature, DATA_KELIDAN)
|
||||||
boss_kelidan_the_breaker() : CreatureScript("boss_kelidan_the_breaker")
|
|
||||||
{
|
{
|
||||||
|
scheduler.SetValidator([this]
|
||||||
|
{
|
||||||
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
struct boss_kelidan_the_breakerAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
boss_kelidan_the_breakerAI(Creature* creature) : ScriptedAI(creature)
|
|
||||||
{
|
|
||||||
instance = creature->GetInstanceScript();
|
|
||||||
}
|
|
||||||
|
|
||||||
InstanceScript* instance;
|
|
||||||
EventMap events;
|
|
||||||
ObjectGuid channelers[5];
|
ObjectGuid channelers[5];
|
||||||
uint32 checkTimer;
|
uint32 checkTimer;
|
||||||
bool addYell;
|
bool addYell;
|
||||||
@@ -88,35 +78,61 @@ public:
|
|||||||
{
|
{
|
||||||
addYell = false;
|
addYell = false;
|
||||||
checkTimer = 5000;
|
checkTimer = 5000;
|
||||||
|
_Reset();
|
||||||
events.Reset();
|
|
||||||
ApplyImmunities(true);
|
ApplyImmunities(true);
|
||||||
SummonChannelers();
|
SummonChannelers();
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
me->SetImmuneToAll(true);
|
me->SetImmuneToAll(true);
|
||||||
if (instance)
|
if (instance)
|
||||||
|
{
|
||||||
instance->SetData(DATA_KELIDAN, NOT_STARTED);
|
instance->SetData(DATA_KELIDAN, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
events.ScheduleEvent(EVENT_SPELL_VOLLEY, 1000);
|
|
||||||
events.ScheduleEvent(EVENT_SPELL_CORRUPTION, 5000);
|
|
||||||
events.ScheduleEvent(EVENT_SPELL_BURNING_NOVA, 15000);
|
|
||||||
|
|
||||||
me->InterruptNonMeleeSpells(false);
|
|
||||||
Talk(SAY_WAKE);
|
Talk(SAY_WAKE);
|
||||||
|
_JustEngagedWith();
|
||||||
|
me->InterruptNonMeleeSpells(false);
|
||||||
if (instance)
|
if (instance)
|
||||||
|
{
|
||||||
instance->SetData(DATA_KELIDAN, IN_PROGRESS);
|
instance->SetData(DATA_KELIDAN, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
scheduler.Schedule(1s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_SHADOW_BOLT_VOLLEY);
|
||||||
|
context.Repeat(8s, 13s);
|
||||||
|
}).Schedule(5s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_CORRUPTION);
|
||||||
|
context.Repeat(30s, 50s);
|
||||||
|
}).Schedule(15s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
Talk(SAY_NOVA);
|
||||||
|
ApplyImmunities(false);
|
||||||
|
me->AddAura(SPELL_BURNING_NOVA, me);
|
||||||
|
ApplyImmunities(true);
|
||||||
|
if (IsHeroic())
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_VORTEX);
|
||||||
|
}
|
||||||
|
scheduler.DelayGroup(0, 6s);
|
||||||
|
scheduler.Schedule(5s, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_FIRE_NOVA, true);
|
||||||
|
});
|
||||||
|
context.Repeat(25s, 32s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (urand(0, 1))
|
if (urand(0, 1))
|
||||||
|
{
|
||||||
Talk(SAY_KILL);
|
Talk(SAY_KILL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void DoAction(int32 param) override
|
||||||
{
|
{
|
||||||
@@ -126,15 +142,16 @@ public:
|
|||||||
{
|
{
|
||||||
addYell = true;
|
addYell = true;
|
||||||
Talk(SAY_ADD_AGGRO);
|
Talk(SAY_ADD_AGGRO);
|
||||||
|
|
||||||
for (uint8 i = 0; i < 5; ++i)
|
for (uint8 i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
Creature* channeler = ObjectAccessor::GetCreature(*me, channelers[i]);
|
Creature* channeler = ObjectAccessor::GetCreature(*me, channelers[i]);
|
||||||
if (channeler && !channeler->IsInCombat())
|
if (channeler && !channeler->IsInCombat())
|
||||||
|
{
|
||||||
channeler->SetInCombatWithZone();
|
channeler->SetInCombatWithZone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (param == ACTION_CHANNELER_DIED)
|
else if (param == ACTION_CHANNELER_DIED)
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < 5; ++i)
|
for (uint8 i = 0; i < 5; ++i)
|
||||||
@@ -147,19 +164,22 @@ public:
|
|||||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
me->SetImmuneToAll(false);
|
me->SetImmuneToAll(false);
|
||||||
if (Unit* target = me->SelectNearestPlayer(100.0f))
|
if (Unit* target = me->SelectNearestPlayer(100.0f))
|
||||||
|
{
|
||||||
AttackStart(target);
|
AttackStart(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CheckChannelers()
|
void CheckChannelers()
|
||||||
{
|
{
|
||||||
if (addYell)
|
if (addYell)
|
||||||
{
|
{
|
||||||
if (!SelectTargetFromPlayerList(100.0f))
|
if (!SelectTargetFromPlayerList(100.0f))
|
||||||
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SummonChannelers();
|
SummonChannelers();
|
||||||
for (uint8 i = 0; i < 5; ++i)
|
for (uint8 i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
@@ -168,10 +188,12 @@ public:
|
|||||||
{
|
{
|
||||||
Creature* target = ObjectAccessor::GetCreature(*me, channelers[(i + 2) % 5]);
|
Creature* target = ObjectAccessor::GetCreature(*me, channelers[(i + 2) % 5]);
|
||||||
if (target)
|
if (target)
|
||||||
|
{
|
||||||
channeler->CastSpell(target, SPELL_CHANNELING, false);
|
channeler->CastSpell(target, SPELL_CHANNELING, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SummonChannelers()
|
void SummonChannelers()
|
||||||
{
|
{
|
||||||
@@ -184,8 +206,9 @@ public:
|
|||||||
channeler = nullptr;
|
channeler = nullptr;
|
||||||
}
|
}
|
||||||
if (!channeler)
|
if (!channeler)
|
||||||
|
{
|
||||||
channeler = me->SummonCreature(NPC_CHANNELER, ShadowmoonChannelers[i][0], ShadowmoonChannelers[i][1], ShadowmoonChannelers[i][2], ShadowmoonChannelers[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
channeler = me->SummonCreature(NPC_CHANNELER, ShadowmoonChannelers[i][0], ShadowmoonChannelers[i][1], ShadowmoonChannelers[i][2], ShadowmoonChannelers[i][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||||
|
}
|
||||||
channelers[i] = channeler ? channeler->GetGUID() : ObjectGuid::Empty;
|
channelers[i] = channeler ? channeler->GetGUID() : ObjectGuid::Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,9 +216,9 @@ public:
|
|||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
Talk(SAY_DIE);
|
Talk(SAY_DIE);
|
||||||
|
_JustDied();
|
||||||
if (instance)
|
if (instance)
|
||||||
{
|
{
|
||||||
// Xinef: load grid with start doors
|
|
||||||
me->GetMap()->LoadGrid(0, -111.0f);
|
me->GetMap()->LoadGrid(0, -111.0f);
|
||||||
instance->SetData(DATA_KELIDAN, DONE);
|
instance->SetData(DATA_KELIDAN, DONE);
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR1), true);
|
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR1), true);
|
||||||
@@ -235,128 +258,78 @@ public:
|
|||||||
checkTimer = 0;
|
checkTimer = 0;
|
||||||
CheckChannelers();
|
CheckChannelers();
|
||||||
if (!me->HasUnitState(UNIT_STATE_CASTING))
|
if (!me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
|
{
|
||||||
me->CastSpell(me, SPELL_EVOCATION, false);
|
me->CastSpell(me, SPELL_EVOCATION, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
events.Update(diff);
|
scheduler.Update(diff);
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (events.ExecuteEvent())
|
|
||||||
{
|
|
||||||
case EVENT_SPELL_VOLLEY:
|
|
||||||
me->CastSpell(me, SPELL_SHADOW_BOLT_VOLLEY, false);
|
|
||||||
events.RepeatEvent(urand(8000, 13000));
|
|
||||||
break;
|
|
||||||
case EVENT_SPELL_CORRUPTION:
|
|
||||||
me->CastSpell(me, SPELL_CORRUPTION, false);
|
|
||||||
events.RepeatEvent(urand(30000, 50000));
|
|
||||||
break;
|
|
||||||
case EVENT_SPELL_BURNING_NOVA:
|
|
||||||
Talk(SAY_NOVA);
|
|
||||||
|
|
||||||
ApplyImmunities(false);
|
|
||||||
me->AddAura(SPELL_BURNING_NOVA, me);
|
|
||||||
ApplyImmunities(true);
|
|
||||||
|
|
||||||
if (IsHeroic())
|
|
||||||
DoTeleportAll(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
|
||||||
|
|
||||||
events.DelayEvents(6000, 0);
|
|
||||||
events.RepeatEvent(urand(25000, 32000));
|
|
||||||
events.ScheduleEvent(EVENT_SPELL_FIRE_NOVA, 5000);
|
|
||||||
break;
|
|
||||||
case EVENT_SPELL_FIRE_NOVA:
|
|
||||||
me->CastSpell(me, SPELL_FIRE_NOVA, true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetBloodFurnaceAI<boss_kelidan_the_breakerAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class npc_shadowmoon_channeler : public CreatureScript
|
struct npc_shadowmoon_channeler : public ScriptedAI
|
||||||
{
|
{
|
||||||
public:
|
npc_shadowmoon_channeler(Creature* creature) : ScriptedAI(creature) {}
|
||||||
npc_shadowmoon_channeler() : CreatureScript("npc_shadowmoon_channeler") {}
|
|
||||||
|
|
||||||
struct npc_shadowmoon_channelerAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
npc_shadowmoon_channelerAI(Creature* creature) : ScriptedAI(creature) {}
|
|
||||||
|
|
||||||
EventMap events;
|
|
||||||
|
|
||||||
void Reset() override
|
|
||||||
{
|
|
||||||
events.Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
Creature* GetKelidan()
|
Creature* GetKelidan()
|
||||||
{
|
{
|
||||||
if (InstanceScript* instance = me->GetInstanceScript())
|
if (InstanceScript* instance = me->GetInstanceScript())
|
||||||
|
{
|
||||||
return instance->GetCreature(DATA_KELIDAN);
|
return instance->GetCreature(DATA_KELIDAN);
|
||||||
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
if (Creature* kelidan = GetKelidan())
|
if (Creature* kelidan = GetKelidan())
|
||||||
|
{
|
||||||
kelidan->AI()->DoAction(ACTION_CHANNELER_ENGAGED);
|
kelidan->AI()->DoAction(ACTION_CHANNELER_ENGAGED);
|
||||||
|
}
|
||||||
me->InterruptNonMeleeSpells(false);
|
me->InterruptNonMeleeSpells(false);
|
||||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, urand(1200, 2400));
|
_scheduler.Schedule(1200ms, 2400ms, [this](TaskContext context)
|
||||||
events.ScheduleEvent(EVENT_SPELL_MARK, urand(5000, 6500));
|
{
|
||||||
|
DoCastVictim(SPELL_SHADOW_BOLT);
|
||||||
|
context.Repeat(6s, 7200ms);
|
||||||
|
}).Schedule(5s, 6500ms, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastRandomTarget(SPELL_MARK_OF_SHADOW);
|
||||||
|
context.Repeat(16s, 17500ms);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
if (Creature* kelidan = GetKelidan())
|
if (Creature* kelidan = GetKelidan())
|
||||||
|
{
|
||||||
kelidan->AI()->DoAction(ACTION_CHANNELER_DIED);
|
kelidan->AI()->DoAction(ACTION_CHANNELER_DIED);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
_scheduler.Update(diff);
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (events.ExecuteEvent())
|
|
||||||
{
|
|
||||||
case EVENT_SPELL_SHADOW_BOLT:
|
|
||||||
me->CastSpell(me->GetVictim(), IsHeroic() ? SPELL_SHADOW_BOLT_H : SPELL_SHADOW_BOLT, false);
|
|
||||||
events.RepeatEvent(urand(6000, 7200));
|
|
||||||
break;
|
|
||||||
case EVENT_SPELL_MARK:
|
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
|
||||||
me->CastSpell(target, SPELL_MARK_OF_SHADOW, false);
|
|
||||||
events.RepeatEvent(urand(16000, 17500));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
private:
|
||||||
{
|
TaskScheduler _scheduler;
|
||||||
return GetBloodFurnaceAI<npc_shadowmoon_channelerAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_kelidan_the_breaker()
|
void AddSC_boss_kelidan_the_breaker()
|
||||||
{
|
{
|
||||||
new boss_kelidan_the_breaker();
|
RegisterBloodFurnaceCreatureAI(boss_kelidan_the_breaker);
|
||||||
new npc_shadowmoon_channeler();
|
RegisterBloodFurnaceCreatureAI(npc_shadowmoon_channeler);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,72 +19,68 @@
|
|||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "blood_furnace.h"
|
#include "blood_furnace.h"
|
||||||
|
|
||||||
enum eEnums
|
enum Says
|
||||||
{
|
{
|
||||||
SAY_AGGRO = 0,
|
SAY_AGGRO = 0,
|
||||||
SAY_KILL = 1,
|
SAY_KILL = 1,
|
||||||
SAY_DIE = 2,
|
SAY_DIE = 2
|
||||||
|
|
||||||
SPELL_EXPLODING_BREAKER = 30925,
|
|
||||||
SPELL_DOMINATION = 30923,
|
|
||||||
|
|
||||||
EVENT_SPELL_EXPLODING = 1,
|
|
||||||
EVENT_SPELL_DOMINATION = 2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_the_maker : public CreatureScript
|
enum Spells
|
||||||
{
|
{
|
||||||
public:
|
SPELL_EXPLODING_BEAKER = 30925,
|
||||||
boss_the_maker() : CreatureScript("boss_the_maker")
|
SPELL_DOMINATION = 30923
|
||||||
{
|
};
|
||||||
}
|
|
||||||
|
|
||||||
struct boss_the_makerAI : public ScriptedAI
|
struct boss_the_maker : public BossAI
|
||||||
|
{
|
||||||
|
boss_the_maker(Creature* creature) : BossAI(creature, DATA_THE_MAKER)
|
||||||
{
|
{
|
||||||
boss_the_makerAI(Creature* creature) : ScriptedAI(creature)
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
instance = creature->GetInstanceScript();
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
InstanceScript* instance;
|
|
||||||
EventMap events;
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
events.Reset();
|
_Reset();
|
||||||
if (!instance)
|
if (instance)
|
||||||
return;
|
{
|
||||||
|
|
||||||
instance->SetData(DATA_THE_MAKER, NOT_STARTED);
|
instance->SetData(DATA_THE_MAKER, NOT_STARTED);
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR2), true);
|
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR2), true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
events.ScheduleEvent(EVENT_SPELL_EXPLODING, 6000);
|
_JustEngagedWith();
|
||||||
events.ScheduleEvent(EVENT_SPELL_DOMINATION, 120000);
|
|
||||||
|
|
||||||
if (!instance)
|
|
||||||
return;
|
|
||||||
|
|
||||||
instance->SetData(DATA_THE_MAKER, IN_PROGRESS);
|
instance->SetData(DATA_THE_MAKER, IN_PROGRESS);
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR2), false);
|
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR2), false);
|
||||||
|
scheduler.Schedule(6s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastRandomTarget(SPELL_EXPLODING_BEAKER);
|
||||||
|
context.Repeat(7s, 11s);
|
||||||
|
}).Schedule(2min, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastRandomTarget(SPELL_DOMINATION);
|
||||||
|
context.Repeat(2min);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0, 1))
|
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0, 1))
|
||||||
|
{
|
||||||
Talk(SAY_KILL);
|
Talk(SAY_KILL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
Talk(SAY_DIE);
|
Talk(SAY_DIE);
|
||||||
|
_JustDied();
|
||||||
if (!instance)
|
|
||||||
return;
|
|
||||||
|
|
||||||
instance->SetData(DATA_THE_MAKER, DONE);
|
instance->SetData(DATA_THE_MAKER, DONE);
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR2), true);
|
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR2), true);
|
||||||
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR3), true);
|
instance->HandleGameObject(instance->GetGuidData(DATA_DOOR3), true);
|
||||||
@@ -95,35 +91,15 @@ public:
|
|||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
scheduler.Update(diff);
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (events.ExecuteEvent())
|
|
||||||
{
|
|
||||||
case EVENT_SPELL_EXPLODING:
|
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
|
||||||
me->CastSpell(target, SPELL_EXPLODING_BREAKER, false);
|
|
||||||
events.RepeatEvent(urand(7000, 11000));
|
|
||||||
break;
|
|
||||||
case EVENT_SPELL_DOMINATION:
|
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
|
||||||
me->CastSpell(target, SPELL_DOMINATION, false);
|
|
||||||
events.RepeatEvent(120000);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetBloodFurnaceAI<boss_the_makerAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_the_maker()
|
void AddSC_boss_the_maker()
|
||||||
{
|
{
|
||||||
new boss_the_maker();
|
RegisterBloodFurnaceCreatureAI(boss_the_maker);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,17 +37,11 @@ enum Spells
|
|||||||
SPELL_DEMONIC_SHIELD = 31901
|
SPELL_DEMONIC_SHIELD = 31901
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_omor_the_unscarred : public CreatureScript
|
struct boss_omor_the_unscarred : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_omor_the_unscarred(Creature* creature) : BossAI(creature, DATA_OMOR_THE_UNSCARRED)
|
||||||
boss_omor_the_unscarred() : CreatureScript("boss_omor_the_unscarred") { }
|
|
||||||
|
|
||||||
struct boss_omor_the_unscarredAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_omor_the_unscarredAI(Creature* creature) : BossAI(creature, DATA_OMOR_THE_UNSCARRED)
|
|
||||||
{
|
{
|
||||||
SetCombatMovement(false);
|
SetCombatMovement(false);
|
||||||
|
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
@@ -59,7 +53,6 @@ public:
|
|||||||
Talk(SAY_WIPE);
|
Talk(SAY_WIPE);
|
||||||
_Reset();
|
_Reset();
|
||||||
_targetGUID.Clear();
|
_targetGUID.Clear();
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(21, [&]{
|
ScheduleHealthCheckEvent(21, [&]{
|
||||||
DoCastSelf(SPELL_DEMONIC_SHIELD);
|
DoCastSelf(SPELL_DEMONIC_SHIELD);
|
||||||
scheduler.Schedule(15s, [this](TaskContext context)
|
scheduler.Schedule(15s, [this](TaskContext context)
|
||||||
@@ -74,7 +67,6 @@ public:
|
|||||||
{
|
{
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
_JustEngagedWith();
|
_JustEngagedWith();
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext context)
|
scheduler.Schedule(6s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
if (roll_chance_i(33))
|
if (roll_chance_i(33))
|
||||||
@@ -119,11 +111,12 @@ public:
|
|||||||
_JustDied();
|
_JustDied();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 /*diff*/) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
scheduler.Update(diff);
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -138,23 +131,17 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
me->GetMotionMaster()->Clear();
|
me->GetMotionMaster()->Clear();
|
||||||
me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
|
DoCastVictim(SPELL_SHADOW_BOLT);
|
||||||
me->resetAttackTimer();
|
me->resetAttackTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ObjectGuid _targetGUID;
|
ObjectGuid _targetGUID;
|
||||||
bool _hasSpoken;
|
bool _hasSpoken;
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetHellfireRampartsAI<boss_omor_the_unscarredAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_omor_the_unscarred()
|
void AddSC_boss_omor_the_unscarred()
|
||||||
{
|
{
|
||||||
new boss_omor_the_unscarred();
|
RegisterHellfireRampartsCreatureAI(boss_omor_the_unscarred);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ enum Spells
|
|||||||
SPELL_FIREBALL = 33793,
|
SPELL_FIREBALL = 33793,
|
||||||
SPELL_SUMMON_LIQUID_FIRE = 31706,
|
SPELL_SUMMON_LIQUID_FIRE = 31706,
|
||||||
SPELL_REVENGE = 19130,
|
SPELL_REVENGE = 19130,
|
||||||
SPELL_REVENGE_H = 40392,
|
|
||||||
SPELL_CALL_NAZAN = 30693,
|
SPELL_CALL_NAZAN = 30693,
|
||||||
SPELL_BELLOWING_ROAR = 39427,
|
SPELL_BELLOWING_ROAR = 39427,
|
||||||
SPELL_CONE_OF_FIRE = 30926
|
SPELL_CONE_OF_FIRE = 30926
|
||||||
@@ -60,16 +59,9 @@ const Position NazanPos[3] =
|
|||||||
{-1373.84f, 1771.57f, 111.0f, 0.0f}
|
{-1373.84f, 1771.57f, 111.0f, 0.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_vazruden_the_herald : public CreatureScript
|
struct boss_vazruden_the_herald : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_vazruden_the_herald(Creature* creature) : BossAI(creature, DATA_VAZRUDEN) {}
|
||||||
boss_vazruden_the_herald() : CreatureScript("boss_vazruden_the_herald") { }
|
|
||||||
|
|
||||||
struct boss_vazruden_the_heraldAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_vazruden_the_heraldAI(Creature* creature) : BossAI(creature, DATA_VAZRUDEN)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
@@ -80,16 +72,16 @@ public:
|
|||||||
me->SummonCreature(NPC_HELLFIRE_SENTRY, -1383.39f, 1711.82f, 82.7961f, 5.67232f);
|
me->SummonCreature(NPC_HELLFIRE_SENTRY, -1383.39f, 1711.82f, 82.7961f, 5.67232f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit*) override
|
void AttackStart(Unit*) override {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
{
|
{
|
||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
if (summon->GetEntry() != NPC_HELLFIRE_SENTRY)
|
if (summon->GetEntry() != NPC_HELLFIRE_SENTRY)
|
||||||
|
{
|
||||||
summon->SetInCombatWithZone();
|
summon->SetInCombatWithZone();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustDied(Unit*) override
|
void JustDied(Unit*) override
|
||||||
{
|
{
|
||||||
@@ -125,8 +117,10 @@ public:
|
|||||||
{
|
{
|
||||||
summons.Despawn(summon);
|
summons.Despawn(summon);
|
||||||
if (summon->GetEntry() != NPC_HELLFIRE_SENTRY)
|
if (summon->GetEntry() != NPC_HELLFIRE_SENTRY)
|
||||||
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data) override
|
void SetData(uint32 type, uint32 data) override
|
||||||
{
|
{
|
||||||
@@ -139,24 +133,15 @@ public:
|
|||||||
void UpdateAI(uint32 /*diff*/) override
|
void UpdateAI(uint32 /*diff*/) override
|
||||||
{
|
{
|
||||||
if (!me->IsVisible() && summons.size() == 0)
|
if (!me->IsVisible() && summons.size() == 0)
|
||||||
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetHellfireRampartsAI<boss_vazruden_the_heraldAI>(creature);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_nazan : public CreatureScript
|
struct boss_nazan : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_nazan(Creature* creature) : BossAI(creature, DATA_VAZRUDEN)
|
||||||
boss_nazan() : CreatureScript("boss_nazan") { }
|
|
||||||
|
|
||||||
struct boss_nazanAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_nazanAI(Creature* creature) : BossAI(creature, DATA_VAZRUDEN)
|
|
||||||
{
|
{
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
@@ -168,7 +153,6 @@ public:
|
|||||||
{
|
{
|
||||||
me->SetCanFly(true);
|
me->SetCanFly(true);
|
||||||
me->SetDisableGravity(true);
|
me->SetDisableGravity(true);
|
||||||
events.Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
@@ -194,17 +178,20 @@ public:
|
|||||||
void AttackStart(Unit* who) override
|
void AttackStart(Unit* who) override
|
||||||
{
|
{
|
||||||
if (me->IsLevitating())
|
if (me->IsLevitating())
|
||||||
|
{
|
||||||
me->Attack(who, true);
|
me->Attack(who, true);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ScriptedAI::AttackStart(who);
|
ScriptedAI::AttackStart(who);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void DoAction(int32 param) override
|
||||||
{
|
{
|
||||||
if (param == ACTION_FLY_DOWN)
|
if (param == ACTION_FLY_DOWN)
|
||||||
{
|
{
|
||||||
Talk(EMOTE_NAZAN);
|
Talk(EMOTE_NAZAN);
|
||||||
events.Reset();
|
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
me->InterruptNonMeleeSpells(true);
|
me->InterruptNonMeleeSpells(true);
|
||||||
me->GetMotionMaster()->MovePoint(POINT_MIDDLE, -1406.5f, 1746.5f, 81.2f, false);
|
me->GetMotionMaster()->MovePoint(POINT_MIDDLE, -1406.5f, 1746.5f, 81.2f, false);
|
||||||
@@ -220,7 +207,6 @@ public:
|
|||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
scheduler.CancelGroup(GROUP_PHASE_1);
|
scheduler.CancelGroup(GROUP_PHASE_1);
|
||||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||||
|
|
||||||
scheduler.Schedule(5s, GROUP_PHASE_2, [this](TaskContext context)
|
scheduler.Schedule(5s, GROUP_PHASE_2, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastVictim(SPELL_CONE_OF_FIRE);
|
DoCastVictim(SPELL_CONE_OF_FIRE);
|
||||||
@@ -252,25 +238,11 @@ public:
|
|||||||
if (!me->IsLevitating())
|
if (!me->IsLevitating())
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
EventMap events;
|
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetHellfireRampartsAI<boss_nazanAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_vazruden : public CreatureScript
|
struct boss_vazruden : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_vazruden(Creature* creature) : BossAI(creature, DATA_VAZRUDEN)
|
||||||
boss_vazruden() : CreatureScript("boss_vazruden") { }
|
|
||||||
|
|
||||||
struct boss_vazrudenAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_vazrudenAI(Creature* creature) : BossAI(creature, DATA_VAZRUDEN)
|
|
||||||
{
|
{
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
@@ -280,7 +252,6 @@ public:
|
|||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
events.Reset();
|
|
||||||
_nazanCalled = false;
|
_nazanCalled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +268,7 @@ public:
|
|||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
}).Schedule(4s, [this](TaskContext context)
|
}).Schedule(4s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastVictim(DUNGEON_MODE(SPELL_REVENGE, SPELL_REVENGE_H));
|
DoCastVictim(SPELL_REVENGE);
|
||||||
context.Repeat(6s);
|
context.Repeat(6s);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -320,7 +291,7 @@ public:
|
|||||||
if (!_nazanCalled && me->HealthBelowPctDamaged(35, damage))
|
if (!_nazanCalled && me->HealthBelowPctDamaged(35, damage))
|
||||||
{
|
{
|
||||||
_nazanCalled = true;
|
_nazanCalled = true;
|
||||||
me->CastSpell(me, SPELL_CALL_NAZAN, true);
|
DoCastSelf(SPELL_CALL_NAZAN, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,85 +300,61 @@ public:
|
|||||||
Talk(SAY_DIE);
|
Talk(SAY_DIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 /*diff*/) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
scheduler.Update(diff);
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventMap events;
|
|
||||||
bool _hasSpoken;
|
bool _hasSpoken;
|
||||||
bool _nazanCalled;
|
bool _nazanCalled;
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetHellfireRampartsAI<boss_vazrudenAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_vazruden_fireball : public SpellScriptLoader
|
class spell_vazruden_fireball : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_vazruden_fireball);
|
||||||
spell_vazruden_fireball() : SpellScriptLoader("spell_vazruden_fireball") { }
|
|
||||||
|
|
||||||
class spell_vazruden_fireball_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_vazruden_fireball_SpellScript);
|
|
||||||
|
|
||||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
|
{
|
||||||
target->CastSpell(target, SPELL_SUMMON_LIQUID_FIRE, true);
|
target->CastSpell(target, SPELL_SUMMON_LIQUID_FIRE, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_vazruden_fireball_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
OnEffectHitTarget += SpellEffectFn(spell_vazruden_fireball::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_vazruden_fireball_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_vazruden_call_nazan : public SpellScriptLoader
|
class spell_vazruden_call_nazan : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_vazruden_call_nazan);
|
||||||
spell_vazruden_call_nazan() : SpellScriptLoader("spell_vazruden_call_nazan") { }
|
|
||||||
|
|
||||||
class spell_vazruden_call_nazan_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_vazruden_call_nazan_SpellScript);
|
|
||||||
|
|
||||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
|
{
|
||||||
target->GetAI()->DoAction(ACTION_FLY_DOWN);
|
target->GetAI()->DoAction(ACTION_FLY_DOWN);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_vazruden_call_nazan_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
OnEffectHitTarget += SpellEffectFn(spell_vazruden_call_nazan::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_vazruden_call_nazan_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_vazruden_the_herald()
|
void AddSC_boss_vazruden_the_herald()
|
||||||
{
|
{
|
||||||
new boss_vazruden_the_herald();
|
RegisterHellfireRampartsCreatureAI(boss_vazruden_the_herald);
|
||||||
new boss_vazruden();
|
RegisterHellfireRampartsCreatureAI(boss_vazruden);
|
||||||
new boss_nazan();
|
RegisterHellfireRampartsCreatureAI(boss_nazan);
|
||||||
new spell_vazruden_fireball();
|
RegisterSpellScript(spell_vazruden_fireball);
|
||||||
new spell_vazruden_call_nazan();
|
RegisterSpellScript(spell_vazruden_call_nazan);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,17 +41,11 @@ enum Misc
|
|||||||
NPC_HELLFIRE_WATCHER = 17309
|
NPC_HELLFIRE_WATCHER = 17309
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_watchkeeper_gargolmar : public CreatureScript
|
struct boss_watchkeeper_gargolmar : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_watchkeeper_gargolmar(Creature* creature) : BossAI(creature, DATA_WATCHKEEPER_GARGOLMAR)
|
||||||
boss_watchkeeper_gargolmar() : CreatureScript("boss_watchkeeper_gargolmar") { }
|
|
||||||
|
|
||||||
struct boss_watchkeeper_gargolmarAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_watchkeeper_gargolmarAI(Creature* creature) : BossAI(creature, DATA_WATCHKEEPER_GARGOLMAR)
|
|
||||||
{
|
{
|
||||||
_taunted = false;
|
_taunted = false;
|
||||||
|
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
@@ -61,13 +55,14 @@ public:
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(50, [&]{
|
ScheduleHealthCheckEvent(50, [&]{
|
||||||
Talk(SAY_HEAL);
|
Talk(SAY_HEAL);
|
||||||
std::list<Creature*> clist;
|
std::list<Creature*> clist;
|
||||||
me->GetCreaturesWithEntryInRange(clist, 100.0f, NPC_HELLFIRE_WATCHER);
|
me->GetCreaturesWithEntryInRange(clist, 100.0f, NPC_HELLFIRE_WATCHER);
|
||||||
for (std::list<Creature*>::const_iterator itr = clist.begin(); itr != clist.end(); ++itr)
|
for (std::list<Creature*>::const_iterator itr = clist.begin(); itr != clist.end(); ++itr)
|
||||||
|
{
|
||||||
(*itr)->AI()->SetData(NPC_HELLFIRE_WATCHER, 0);
|
(*itr)->AI()->SetData(NPC_HELLFIRE_WATCHER, 0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(20, [&]{
|
ScheduleHealthCheckEvent(20, [&]{
|
||||||
@@ -84,7 +79,6 @@ public:
|
|||||||
{
|
{
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
_JustEngagedWith();
|
_JustEngagedWith();
|
||||||
|
|
||||||
scheduler.Schedule(5s, [this] (TaskContext context)
|
scheduler.Schedule(5s, [this] (TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastVictim(SPELL_MORTAL_WOUND);
|
DoCastVictim(SPELL_MORTAL_WOUND);
|
||||||
@@ -92,7 +86,7 @@ public:
|
|||||||
}).Schedule(3s, [this](TaskContext context)
|
}).Schedule(3s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
Talk(SAY_SURGE);
|
Talk(SAY_SURGE);
|
||||||
if(Unit* target = SelectTarget((SelectTargetMethod::MinDistance), 0))
|
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0))
|
||||||
{
|
{
|
||||||
me->CastSpell(target, SPELL_SURGE);
|
me->CastSpell(target, SPELL_SURGE);
|
||||||
}
|
}
|
||||||
@@ -110,7 +104,6 @@ public:
|
|||||||
Talk(SAY_TAUNT);
|
Talk(SAY_TAUNT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BossAI::MoveInLineOfSight(who);
|
BossAI::MoveInLineOfSight(who);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,29 +126,25 @@ public:
|
|||||||
_JustDied();
|
_JustDied();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 /*diff*/) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
scheduler.Update(diff);
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _taunted;
|
bool _taunted;
|
||||||
bool _hasSpoken;
|
bool _hasSpoken;
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetHellfireRampartsAI<boss_watchkeeper_gargolmarAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_watchkeeper_gargolmar()
|
void AddSC_boss_watchkeeper_gargolmar()
|
||||||
{
|
{
|
||||||
new boss_watchkeeper_gargolmar();
|
RegisterHellfireRampartsCreatureAI(boss_watchkeeper_gargolmar);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,4 +52,6 @@ inline AI* GetHellfireRampartsAI(T* obj)
|
|||||||
return GetInstanceAI<AI>(obj, HellfireRampartsScriptName);
|
return GetInstanceAI<AI>(obj, HellfireRampartsScriptName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define RegisterHellfireRampartsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetHellfireRampartsAI)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "shattered_halls.h"
|
#include "shattered_halls.h"
|
||||||
|
|
||||||
enum eGrandWarlockNethekurse
|
enum Says
|
||||||
{
|
{
|
||||||
SAY_INTRO = 0,
|
SAY_INTRO = 0,
|
||||||
SAY_INTRO_2 = 1,
|
SAY_INTRO_2 = 1,
|
||||||
@@ -30,41 +30,42 @@ enum eGrandWarlockNethekurse
|
|||||||
SAY_SHADOW_FISSURE = 5,
|
SAY_SHADOW_FISSURE = 5,
|
||||||
SAY_DEATH_COIL = 6,
|
SAY_DEATH_COIL = 6,
|
||||||
SAY_SLAY = 7,
|
SAY_SLAY = 7,
|
||||||
SAY_DIE = 8,
|
SAY_DIE = 8
|
||||||
|
};
|
||||||
|
|
||||||
SPELL_DEATH_COIL_N = 30500,
|
enum Spells
|
||||||
SPELL_DEATH_COIL_H = 35954,
|
{
|
||||||
|
SPELL_DEATH_COIL = 30500,
|
||||||
SPELL_DARK_SPIN = 30502,
|
SPELL_DARK_SPIN = 30502,
|
||||||
SPELL_SHADOW_FISSURE = 30496,
|
SPELL_SHADOW_FISSURE = 30496,
|
||||||
SPELL_SHADOW_CLEAVE_N = 30495,
|
SPELL_SHADOW_CLEAVE = 30495,
|
||||||
SPELL_SHADOW_SLAM_H = 35953,
|
|
||||||
|
|
||||||
// Spells used exclusively in RP
|
|
||||||
SPELL_SHADOW_SEAR = 30735,
|
SPELL_SHADOW_SEAR = 30735,
|
||||||
SPELL_DEATH_COIL = 30741,
|
SPELL_DEATH_COIL_RP = 30741,
|
||||||
SPELL_SHADOW_FISSURE_RP = 30745,
|
SPELL_SHADOW_FISSURE_RP = 30745
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Events
|
||||||
|
{
|
||||||
EVENT_INTRO = 1,
|
EVENT_INTRO = 1,
|
||||||
EVENT_START_ATTACK = 2,
|
EVENT_START_ATTACK = 2,
|
||||||
|
|
||||||
EVENT_STAGE_NONE = 0,
|
EVENT_STAGE_NONE = 0,
|
||||||
EVENT_STAGE_INTRO = 1,
|
EVENT_STAGE_INTRO = 1,
|
||||||
EVENT_STAGE_TAUNT = 2,
|
EVENT_STAGE_TAUNT = 2,
|
||||||
EVENT_STAGE_MAIN = 3,
|
EVENT_STAGE_MAIN = 3
|
||||||
|
|
||||||
SETDATA_DATA = 1,
|
|
||||||
SETDATA_PEON_AGGRO = 1,
|
|
||||||
SETDATA_PEON_DEATH = 2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Creatures
|
enum Data
|
||||||
{
|
{
|
||||||
NPC_PEON = 17083
|
SETDATA_DATA = 1,
|
||||||
|
SETDATA_PEON_AGGRO = 1,
|
||||||
|
SETDATA_PEON_DEATH = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Groups
|
enum Groups
|
||||||
{
|
{
|
||||||
GROUP_RP = 0,
|
GROUP_RP = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Actions
|
enum Actions
|
||||||
@@ -74,10 +75,6 @@ enum Actions
|
|||||||
ACTION_START_COMBAT = 2,
|
ACTION_START_COMBAT = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
// ########################################################
|
|
||||||
// Grand Warlock Nethekurse
|
|
||||||
// ########################################################
|
|
||||||
|
|
||||||
float NethekurseIntroPath[4][3] =
|
float NethekurseIntroPath[4][3] =
|
||||||
{
|
{
|
||||||
{184.78966f, 290.3699f, -8.18139f},
|
{184.78966f, 290.3699f, -8.18139f},
|
||||||
@@ -86,14 +83,9 @@ float NethekurseIntroPath[4][3] =
|
|||||||
{178.51125f, 287.97794f, -8.183065f}
|
{178.51125f, 287.97794f, -8.183065f}
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_grand_warlock_nethekurse : public CreatureScript
|
struct boss_grand_warlock_nethekurse : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_grand_warlock_nethekurse(Creature* creature) : BossAI(creature, DATA_NETHEKURSE)
|
||||||
boss_grand_warlock_nethekurse() : CreatureScript("boss_grand_warlock_nethekurse") { }
|
|
||||||
|
|
||||||
struct boss_grand_warlock_nethekurseAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_grand_warlock_nethekurseAI(Creature* creature) : BossAI(creature, DATA_NETHEKURSE)
|
|
||||||
{
|
{
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
@@ -102,12 +94,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
EventMap events2;
|
EventMap events2;
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
EventStage = EVENT_STAGE_NONE;
|
EventStage = EVENT_STAGE_NONE;
|
||||||
_Reset();
|
_Reset();
|
||||||
events2.Reset();
|
events2.Reset();
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(25, [&] {
|
ScheduleHealthCheckEvent(25, [&] {
|
||||||
DoCastSelf(SPELL_DARK_SPIN);
|
DoCastSelf(SPELL_DARK_SPIN);
|
||||||
});
|
});
|
||||||
@@ -144,7 +136,9 @@ public:
|
|||||||
PeonDieRP();
|
PeonDieRP();
|
||||||
}
|
}
|
||||||
if (++PeonKilledCount == 4)
|
if (++PeonKilledCount == 4)
|
||||||
|
{
|
||||||
DoAction(ACTION_CANCEL_INTRO);
|
DoAction(ACTION_CANCEL_INTRO);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -178,7 +172,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (me->HealthBelowPct(90))
|
if (me->HealthBelowPct(90))
|
||||||
{
|
{
|
||||||
DoCastRandomTarget(DUNGEON_MODE(SPELL_DEATH_COIL_N, SPELL_DEATH_COIL_H), 0, 30.0f, true);
|
DoCastRandomTarget(SPELL_DEATH_COIL, 0, 30.0f, true);
|
||||||
}
|
}
|
||||||
context.Repeat();
|
context.Repeat();
|
||||||
}).Schedule(8100ms, 17300ms, [this](TaskContext context)
|
}).Schedule(8100ms, 17300ms, [this](TaskContext context)
|
||||||
@@ -187,7 +181,7 @@ public:
|
|||||||
context.Repeat(8450ms, 9450ms);
|
context.Repeat(8450ms, 9450ms);
|
||||||
}).Schedule(10950ms, 21850ms, [this](TaskContext context)
|
}).Schedule(10950ms, 21850ms, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastVictim(DUNGEON_MODE(SPELL_SHADOW_CLEAVE_N, SPELL_SHADOW_SLAM_H));
|
DoCastVictim(SPELL_SHADOW_CLEAVE);
|
||||||
context.Repeat(1200ms, 23900ms);
|
context.Repeat(1200ms, 23900ms);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -237,7 +231,7 @@ public:
|
|||||||
if (choice == 1)
|
if (choice == 1)
|
||||||
{
|
{
|
||||||
Talk(SAY_DEATH_COIL);
|
Talk(SAY_DEATH_COIL);
|
||||||
me->CastSpell(me, SPELL_DEATH_COIL, false);
|
me->CastSpell(me, SPELL_DEATH_COIL_RP, false);
|
||||||
}
|
}
|
||||||
else if (choice == 2)
|
else if (choice == 2)
|
||||||
{
|
{
|
||||||
@@ -272,14 +266,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (action != ACTION_START_INTRO)
|
if (action != ACTION_START_INTRO)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (ATreached == true)
|
if (ATreached == true)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
ATreached = true;
|
ATreached = true;
|
||||||
me->SetUnitFlag(UNIT_FLAG_NOT_ATTACKABLE_1);
|
me->SetUnitFlag(UNIT_FLAG_NOT_ATTACKABLE_1);
|
||||||
@@ -296,7 +286,6 @@ public:
|
|||||||
events2.Update(diff);
|
events2.Update(diff);
|
||||||
scheduler.Update(diff);
|
scheduler.Update(diff);
|
||||||
uint32 eventId = events2.ExecuteEvent();
|
uint32 eventId = events2.ExecuteEvent();
|
||||||
|
|
||||||
if (EventStage < EVENT_STAGE_MAIN && instance->GetBossState(DATA_NETHEKURSE) == IN_PROGRESS)
|
if (EventStage < EVENT_STAGE_MAIN && instance->GetBossState(DATA_NETHEKURSE) == IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if (eventId == EVENT_INTRO)
|
if (eventId == EVENT_INTRO)
|
||||||
@@ -307,7 +296,9 @@ public:
|
|||||||
{
|
{
|
||||||
EventStage = EVENT_STAGE_MAIN;
|
EventStage = EVENT_STAGE_MAIN;
|
||||||
if (Unit* target = me->SelectNearestPlayer(50.0f))
|
if (Unit* target = me->SelectNearestPlayer(50.0f))
|
||||||
|
{
|
||||||
AttackStart(target);
|
AttackStart(target);
|
||||||
|
}
|
||||||
DoAction(ACTION_CANCEL_INTRO);
|
DoAction(ACTION_CANCEL_INTRO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -323,28 +314,17 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8 PeonEngagedCount = 0;
|
uint8 PeonEngagedCount = 0;
|
||||||
uint8 PeonKilledCount = 0;
|
uint8 PeonKilledCount = 0;
|
||||||
uint8 EventStage;
|
uint8 EventStage;
|
||||||
bool introDone;
|
bool introDone;
|
||||||
bool ATreached = false;
|
bool ATreached = false;
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetShatteredHallsAI<boss_grand_warlock_nethekurseAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_tsh_shadow_sear : public SpellScriptLoader
|
class spell_tsh_shadow_sear : public AuraScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareAuraScript(spell_tsh_shadow_sear);
|
||||||
spell_tsh_shadow_sear() : SpellScriptLoader("spell_tsh_shadow_sear") { }
|
|
||||||
|
|
||||||
class spell_tsh_shadow_sear_AuraScript : public AuraScript
|
|
||||||
{
|
|
||||||
PrepareAuraScript(spell_tsh_shadow_sear_AuraScript);
|
|
||||||
|
|
||||||
void CalculateDamageAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
void CalculateDamageAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||||
{
|
{
|
||||||
@@ -353,24 +333,13 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_tsh_shadow_sear_AuraScript::CalculateDamageAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_tsh_shadow_sear::CalculateDamageAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
AuraScript* GetAuraScript() const override
|
|
||||||
{
|
|
||||||
return new spell_tsh_shadow_sear_AuraScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_tsh_shadow_bolt : public SpellScriptLoader
|
class spell_tsh_shadow_bolt : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_tsh_shadow_bolt);
|
||||||
spell_tsh_shadow_bolt() : SpellScriptLoader("spell_tsh_shadow_bolt") { }
|
|
||||||
|
|
||||||
class spell_tsh_shadow_bolt_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_tsh_shadow_bolt_SpellScript);
|
|
||||||
|
|
||||||
void SelectRandomPlayer(WorldObject*& target)
|
void SelectRandomPlayer(WorldObject*& target)
|
||||||
{
|
{
|
||||||
@@ -379,31 +348,33 @@ public:
|
|||||||
std::list<Player*> playerList;
|
std::list<Player*> playerList;
|
||||||
Map::PlayerList const& players = caster->GetMap()->GetPlayers();
|
Map::PlayerList const& players = caster->GetMap()->GetPlayers();
|
||||||
for (auto itr = players.begin(); itr != players.end(); ++itr)
|
for (auto itr = players.begin(); itr != players.end(); ++itr)
|
||||||
|
{
|
||||||
if (Player* player = itr->GetSource()->ToPlayer())
|
if (Player* player = itr->GetSource()->ToPlayer())
|
||||||
|
{
|
||||||
if (player->IsWithinDist(caster, 100.0f) && player->IsAlive())
|
if (player->IsWithinDist(caster, 100.0f) && player->IsAlive())
|
||||||
|
{
|
||||||
playerList.push_back(player);
|
playerList.push_back(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!playerList.empty())
|
if (!playerList.empty())
|
||||||
|
{
|
||||||
target = Acore::Containers::SelectRandomContainerElement(playerList);
|
target = Acore::Containers::SelectRandomContainerElement(playerList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_tsh_shadow_bolt_SpellScript::SelectRandomPlayer, EFFECT_0, TARGET_UNIT_TARGET_ENEMY);
|
OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_tsh_shadow_bolt::SelectRandomPlayer, EFFECT_0, TARGET_UNIT_TARGET_ENEMY);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_tsh_shadow_bolt_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class at_rp_nethekurse : public AreaTriggerScript
|
class at_rp_nethekurse : public AreaTriggerScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
at_rp_nethekurse() : AreaTriggerScript
|
at_rp_nethekurse() : AreaTriggerScript("at_rp_nethekurse") { }
|
||||||
("at_rp_nethekurse") { }
|
|
||||||
|
|
||||||
bool OnTrigger(Player* player, AreaTrigger const* /*at*/) override
|
bool OnTrigger(Player* player, AreaTrigger const* /*at*/) override
|
||||||
{
|
{
|
||||||
@@ -427,8 +398,8 @@ public:
|
|||||||
|
|
||||||
void AddSC_boss_grand_warlock_nethekurse()
|
void AddSC_boss_grand_warlock_nethekurse()
|
||||||
{
|
{
|
||||||
new boss_grand_warlock_nethekurse();
|
RegisterShatteredHallsCreatureAI(boss_grand_warlock_nethekurse);
|
||||||
new spell_tsh_shadow_sear();
|
RegisterSpellScript(spell_tsh_shadow_sear);
|
||||||
new spell_tsh_shadow_bolt();
|
RegisterSpellScript(spell_tsh_shadow_bolt);
|
||||||
new at_rp_nethekurse();
|
new at_rp_nethekurse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,10 +25,13 @@ enum Spells
|
|||||||
SPELL_FEAR = 30584,
|
SPELL_FEAR = 30584,
|
||||||
SPELL_THUNDERCLAP = 30633,
|
SPELL_THUNDERCLAP = 30633,
|
||||||
SPELL_BEATDOWN = 30618,
|
SPELL_BEATDOWN = 30618,
|
||||||
SPELL_BURNING_MAUL_N = 30598,
|
SPELL_BURNING_MAUL = 30598
|
||||||
SPELL_BURNING_MAUL_H = 36056,
|
};
|
||||||
|
|
||||||
|
enum Equip
|
||||||
|
{
|
||||||
EQUIP_STANDARD = 1,
|
EQUIP_STANDARD = 1,
|
||||||
EQUIP_BURNING_MAUL = 2,
|
EQUIP_BURNING_MAUL = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Creatures
|
enum Creatures
|
||||||
@@ -50,16 +53,13 @@ enum Events
|
|||||||
EVENT_AGGRO_YELL_1 = 1,
|
EVENT_AGGRO_YELL_1 = 1,
|
||||||
EVENT_AGGRO_YELL_2 = 2,
|
EVENT_AGGRO_YELL_2 = 2,
|
||||||
EVENT_AGGRO_YELL_3 = 3,
|
EVENT_AGGRO_YELL_3 = 3,
|
||||||
|
|
||||||
EVENT_THREAT_YELL_L_1 = 4,
|
EVENT_THREAT_YELL_L_1 = 4,
|
||||||
EVENT_THREAT_YELL_L_2 = 5,
|
EVENT_THREAT_YELL_L_2 = 5,
|
||||||
EVENT_THREAT_YELL_L_3 = 6,
|
EVENT_THREAT_YELL_L_3 = 6,
|
||||||
|
|
||||||
EVENT_THREAT_YELL_R_1 = 7,
|
EVENT_THREAT_YELL_R_1 = 7,
|
||||||
|
|
||||||
EVENT_KILL_YELL_LEFT = 8,
|
EVENT_KILL_YELL_LEFT = 8,
|
||||||
EVENT_KILL_YELL_RIGHT = 9,
|
EVENT_KILL_YELL_RIGHT = 9,
|
||||||
EVENT_DEATH_YELL = 10,
|
EVENT_DEATH_YELL = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Phase
|
enum Phase
|
||||||
@@ -69,18 +69,9 @@ enum Phase
|
|||||||
GROUP_FULL_PHASE = 2
|
GROUP_FULL_PHASE = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
// ########################################################
|
struct boss_warbringer_omrogg : public BossAI
|
||||||
// Warbringer_Omrogg
|
|
||||||
// ########################################################
|
|
||||||
|
|
||||||
class boss_warbringer_omrogg : public CreatureScript
|
|
||||||
{
|
{
|
||||||
public:
|
boss_warbringer_omrogg(Creature* creature) : BossAI(creature, DATA_OMROGG)
|
||||||
boss_warbringer_omrogg() : CreatureScript("boss_warbringer_omrogg") { }
|
|
||||||
|
|
||||||
struct boss_warbringer_omroggAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_warbringer_omroggAI(Creature* creature) : BossAI(creature, DATA_OMROGG)
|
|
||||||
{
|
{
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
@@ -121,7 +112,7 @@ public:
|
|||||||
context.Repeat(17200ms, 24200ms);
|
context.Repeat(17200ms, 24200ms);
|
||||||
}).Schedule(20s, 30s, GROUP_NON_BURNING_PHASE, [this](TaskContext /*context*/)
|
}).Schedule(20s, 30s, GROUP_NON_BURNING_PHASE, [this](TaskContext /*context*/)
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_BEATDOWN, false);
|
DoCastSelf(SPELL_BEATDOWN);
|
||||||
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
|
me->SetUnitFlag(UNIT_FLAG_PACIFIED);
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
scheduler.Schedule(200ms, GROUP_NON_BURNING_PHASE, [this](TaskContext /*context*/)
|
scheduler.Schedule(200ms, GROUP_NON_BURNING_PHASE, [this](TaskContext /*context*/)
|
||||||
@@ -130,7 +121,9 @@ public:
|
|||||||
{
|
{
|
||||||
uint8 threatYell = urand(EVENT_THREAT_YELL_L_1, EVENT_THREAT_YELL_R_1);
|
uint8 threatYell = urand(EVENT_THREAT_YELL_L_1, EVENT_THREAT_YELL_R_1);
|
||||||
if (Creature* head = threatYell == EVENT_THREAT_YELL_R_1 ? GetRightHead() : GetLeftHead())
|
if (Creature* head = threatYell == EVENT_THREAT_YELL_R_1 ? GetRightHead() : GetLeftHead())
|
||||||
|
{
|
||||||
head->AI()->Talk(threatYell - 1);
|
head->AI()->Talk(threatYell - 1);
|
||||||
|
}
|
||||||
events.ScheduleEvent(threatYell, 3000);
|
events.ScheduleEvent(threatYell, 3000);
|
||||||
DoResetThreatList();
|
DoResetThreatList();
|
||||||
me->AddThreat(target, 2250.0f);
|
me->AddThreat(target, 2250.0f);
|
||||||
@@ -146,8 +139,8 @@ public:
|
|||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
scheduler.Schedule(1200ms, GROUP_NON_BURNING_PHASE, [this](TaskContext /*context*/)
|
scheduler.Schedule(1200ms, GROUP_NON_BURNING_PHASE, [this](TaskContext /*context*/)
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_FEAR, false);
|
DoCastSelf(SPELL_FEAR);
|
||||||
DoCastSelf(DUNGEON_MODE(SPELL_BURNING_MAUL_N, SPELL_BURNING_MAUL_H), false);
|
DoCastSelf(SPELL_BURNING_MAUL);
|
||||||
me->LoadEquipment(EQUIP_BURNING_MAUL);
|
me->LoadEquipment(EQUIP_BURNING_MAUL);
|
||||||
scheduler.CancelGroup(GROUP_NON_BURNING_PHASE);
|
scheduler.CancelGroup(GROUP_NON_BURNING_PHASE);
|
||||||
scheduler.Schedule(200ms, GROUP_BURNING_PHASE, [this](TaskContext /*context*/)
|
scheduler.Schedule(200ms, GROUP_BURNING_PHASE, [this](TaskContext /*context*/)
|
||||||
@@ -159,9 +152,10 @@ public:
|
|||||||
{
|
{
|
||||||
uint8 threatYell = urand(EVENT_THREAT_YELL_L_1, EVENT_THREAT_YELL_R_1);
|
uint8 threatYell = urand(EVENT_THREAT_YELL_L_1, EVENT_THREAT_YELL_R_1);
|
||||||
if (Creature* head = threatYell == EVENT_THREAT_YELL_R_1 ? GetRightHead() : GetLeftHead())
|
if (Creature* head = threatYell == EVENT_THREAT_YELL_R_1 ? GetRightHead() : GetLeftHead())
|
||||||
|
{
|
||||||
head->AI()->Talk(threatYell - 1);
|
head->AI()->Talk(threatYell - 1);
|
||||||
|
}
|
||||||
events.ScheduleEvent(threatYell, 3000);
|
events.ScheduleEvent(threatYell, 3000);
|
||||||
|
|
||||||
DoResetThreatList();
|
DoResetThreatList();
|
||||||
me->AddThreat(target, 2250.0f);
|
me->AddThreat(target, 2250.0f);
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
@@ -209,8 +203,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (head)
|
if (head)
|
||||||
|
{
|
||||||
head->AI()->Talk(eventId - 1);
|
head->AI()->Talk(eventId - 1);
|
||||||
|
}
|
||||||
events2.ScheduleEvent(eventId, 3000);
|
events2.ScheduleEvent(eventId, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,10 +218,8 @@ public:
|
|||||||
|
|
||||||
LeftHead->DespawnOrUnsummon(5000);
|
LeftHead->DespawnOrUnsummon(5000);
|
||||||
RightHead->DespawnOrUnsummon(5000);
|
RightHead->DespawnOrUnsummon(5000);
|
||||||
|
|
||||||
LeftHead->AI()->Talk(EVENT_DEATH_YELL - 1);
|
LeftHead->AI()->Talk(EVENT_DEATH_YELL - 1);
|
||||||
RightHead->AI()->SetData(SETDATA_DATA, SETDATA_YELL);
|
RightHead->AI()->SetData(SETDATA_DATA, SETDATA_YELL);
|
||||||
|
|
||||||
instance->SetBossState(DATA_OMROGG, DONE);
|
instance->SetBossState(DATA_OMROGG, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,12 +237,16 @@ public:
|
|||||||
case EVENT_THREAT_YELL_L_2:
|
case EVENT_THREAT_YELL_L_2:
|
||||||
case EVENT_THREAT_YELL_L_3:
|
case EVENT_THREAT_YELL_L_3:
|
||||||
if (Creature* RightHead = GetRightHead())
|
if (Creature* RightHead = GetRightHead())
|
||||||
|
{
|
||||||
RightHead->AI()->Talk(eventId - 1);
|
RightHead->AI()->Talk(eventId - 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_KILL_YELL_RIGHT:
|
case EVENT_KILL_YELL_RIGHT:
|
||||||
case EVENT_THREAT_YELL_R_1:
|
case EVENT_THREAT_YELL_R_1:
|
||||||
if (Creature* LeftHead = GetLeftHead())
|
if (Creature* LeftHead = GetLeftHead())
|
||||||
|
{
|
||||||
LeftHead->AI()->Talk(eventId - 1);
|
LeftHead->AI()->Talk(eventId - 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,22 +258,14 @@ public:
|
|||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetShatteredHallsAI<boss_warbringer_omroggAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class npc_omrogg_heads : public CreatureScript
|
struct npc_omrogg_heads : public NullCreatureAI
|
||||||
{
|
{
|
||||||
public:
|
npc_omrogg_heads(Creature* creature) : NullCreatureAI(creature)
|
||||||
npc_omrogg_heads() : CreatureScript("npc_omrogg_heads") { }
|
|
||||||
|
|
||||||
struct npc_omrogg_headsAI : public NullCreatureAI
|
|
||||||
{
|
{
|
||||||
npc_omrogg_headsAI(Creature* creature) : NullCreatureAI(creature) { timer = 0; }
|
timer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void SetData(uint32 data, uint32 value) override
|
void SetData(uint32 data, uint32 value) override
|
||||||
{
|
{
|
||||||
@@ -297,16 +286,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint32 timer;
|
uint32 timer;
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetShatteredHallsAI<npc_omrogg_headsAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_warbringer_omrogg()
|
void AddSC_boss_warbringer_omrogg()
|
||||||
{
|
{
|
||||||
new boss_warbringer_omrogg();
|
RegisterShatteredHallsCreatureAI(boss_warbringer_omrogg);
|
||||||
new npc_omrogg_heads();
|
RegisterShatteredHallsCreatureAI(npc_omrogg_heads);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ enum Spells
|
|||||||
{
|
{
|
||||||
SPELL_BLADE_DANCE = 30739,
|
SPELL_BLADE_DANCE = 30739,
|
||||||
SPELL_CHARGE = 25821,
|
SPELL_CHARGE = 25821,
|
||||||
SPELL_SPRINT = 32720,
|
SPELL_SPRINT = 32720
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Creatures
|
enum Creatures
|
||||||
@@ -41,65 +41,104 @@ enum Creatures
|
|||||||
NPC_REAVER_GUARD = 17623
|
NPC_REAVER_GUARD = 17623
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Misc
|
||||||
|
{
|
||||||
|
EVENT_SPELL_CHARGE = 1,
|
||||||
|
EVENT_MOVE_TO_NEXT_POINT = 2,
|
||||||
|
EVENT_BLADE_DANCE = 3,
|
||||||
|
EVENT_FINISH_BLADE_DANCE = 4
|
||||||
|
};
|
||||||
|
|
||||||
float AssassEntrance[3] = { 275.136f, -84.29f, 2.3f }; // y -8
|
float AssassEntrance[3] = { 275.136f, -84.29f, 2.3f }; // y -8
|
||||||
float AssassExit[3] = { 184.233f, -84.29f, 2.3f }; // y -8
|
float AssassExit[3] = { 184.233f, -84.29f, 2.3f }; // y -8
|
||||||
float AddsEntrance[3] = { 306.036f, -84.29f, 1.93f };
|
float AddsEntrance[3] = { 306.036f, -84.29f, 1.93f };
|
||||||
|
|
||||||
enum Misc
|
struct boss_warchief_kargath_bladefist : public BossAI
|
||||||
{
|
{
|
||||||
EVENT_CHECK_ROOM = 1,
|
boss_warchief_kargath_bladefist(Creature* creature) : BossAI(creature, DATA_KARGATH)
|
||||||
EVENT_SUMMON_ADDS = 2,
|
|
||||||
EVENT_SUMMON_ASSASSINS = 3,
|
|
||||||
EVENT_SPELL_CHARGE = 4,
|
|
||||||
EVENT_MOVE_TO_NEXT_POINT = 5,
|
|
||||||
EVENT_BLADE_DANCE = 6,
|
|
||||||
EVENT_FINISH_BLADE_DANCE = 7
|
|
||||||
};
|
|
||||||
|
|
||||||
class boss_warchief_kargath_bladefist : public CreatureScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
boss_warchief_kargath_bladefist() : CreatureScript("boss_warchief_kargath_bladefist") { }
|
|
||||||
|
|
||||||
struct boss_warchief_kargath_bladefistAI : public BossAI
|
|
||||||
{
|
{
|
||||||
boss_warchief_kargath_bladefistAI(Creature* creature) : BossAI(creature, DATA_KARGATH) { }
|
scheduler.SetValidator([this]
|
||||||
|
{
|
||||||
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void InitializeAI() override
|
void InitializeAI() override
|
||||||
{
|
{
|
||||||
BossAI::InitializeAI();
|
BossAI::InitializeAI();
|
||||||
if (instance)
|
if (instance)
|
||||||
|
{
|
||||||
if (Creature* executioner = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EXECUTIONER)))
|
if (Creature* executioner = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EXECUTIONER)))
|
||||||
|
{
|
||||||
executioner->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
executioner->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
_JustDied();
|
_JustDied();
|
||||||
|
|
||||||
if (instance)
|
if (instance)
|
||||||
|
{
|
||||||
if (Creature* executioner = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EXECUTIONER)))
|
if (Creature* executioner = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_EXECUTIONER)))
|
||||||
|
{
|
||||||
executioner->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
executioner->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
_JustEngagedWith();
|
_JustEngagedWith();
|
||||||
|
scheduler.Schedule(5s, [this](TaskContext /*context*/)
|
||||||
events.ScheduleEvent(EVENT_CHECK_ROOM, 5000);
|
{
|
||||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 30000);
|
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] + 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||||
events.ScheduleEvent(EVENT_SUMMON_ASSASSINS, 5000);
|
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] - 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||||
events.ScheduleEvent(EVENT_BLADE_DANCE, 30000);
|
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] + 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 0);
|
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] - 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||||
|
}).Schedule(30s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
for (uint8 i = 0; i < 2; ++i)
|
||||||
|
{
|
||||||
|
me->SummonCreature(NPC_HEARTHEN_GUARD + urand(0, 2), AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||||
|
}
|
||||||
|
context.Repeat(30s);
|
||||||
|
}).Schedule(30s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
scheduler.DelayAll(10001ms);
|
||||||
|
context.Repeat(40s);
|
||||||
|
scheduler.Schedule(1ms, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
float x = 210 + frand(0.0f, 35.0f);
|
||||||
|
float y = -65.0f - frand(0.0f, 35.0f);
|
||||||
|
me->GetMotionMaster()->MovePoint(1, x, y, me->GetPositionZ());
|
||||||
|
}).Schedule(10s, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
//events.SetPhase(0); howToMigrate?
|
||||||
|
me->GetMotionMaster()->Clear();
|
||||||
|
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||||
|
if (IsHeroic())
|
||||||
|
{
|
||||||
|
scheduler.Schedule(3s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_CHARGE);
|
||||||
|
context.Repeat(30s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//events.SetPhase(1); howToMigrate?
|
||||||
|
DoCastSelf(SPELL_SPRINT, true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
{
|
{
|
||||||
if (summon->GetEntry() != NPC_SHATTERED_ASSASSIN)
|
if (summon->GetEntry() != NPC_SHATTERED_ASSASSIN)
|
||||||
|
{
|
||||||
summon->AI()->AttackStart(SelectTarget(SelectTargetMethod::Random, 0));
|
summon->AI()->AttackStart(SelectTarget(SelectTargetMethod::Random, 0));
|
||||||
|
}
|
||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,71 +159,23 @@ public:
|
|||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
events.Update(diff);
|
|
||||||
switch (events.ExecuteEvent())
|
|
||||||
{
|
|
||||||
case EVENT_CHECK_ROOM:
|
|
||||||
if (me->GetPositionX() > 255 || me->GetPositionX() < 205)
|
if (me->GetPositionX() > 255 || me->GetPositionX() < 205)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
events.ScheduleEvent(EVENT_CHECK_ROOM, 5000);
|
|
||||||
break;
|
|
||||||
case EVENT_SUMMON_ASSASSINS:
|
|
||||||
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] + 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
|
||||||
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassEntrance[0], AssassEntrance[1] - 8, AssassEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
|
||||||
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] + 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
|
||||||
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1] - 8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
|
||||||
break;
|
|
||||||
case EVENT_SUMMON_ADDS:
|
|
||||||
for (uint8 i = 0; i < 2; ++i)
|
|
||||||
me->SummonCreature(NPC_HEARTHEN_GUARD + urand(0, 2), AddsEntrance[0], AddsEntrance[1], AddsEntrance[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
|
||||||
|
|
||||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 30000);
|
if (!UpdateVictim())
|
||||||
break;
|
return;
|
||||||
case EVENT_BLADE_DANCE:
|
|
||||||
events.DelayEvents(10001);
|
|
||||||
events.ScheduleEvent(EVENT_BLADE_DANCE, 40000);
|
|
||||||
events.ScheduleEvent(EVENT_MOVE_TO_NEXT_POINT, 0);
|
|
||||||
events.ScheduleEvent(EVENT_FINISH_BLADE_DANCE, 10000);
|
|
||||||
events.SetPhase(1);
|
|
||||||
me->CastSpell(me, SPELL_SPRINT, true);
|
|
||||||
break;
|
|
||||||
case EVENT_MOVE_TO_NEXT_POINT:
|
|
||||||
{
|
|
||||||
float x = 210 + frand(0.0f, 35.0f);
|
|
||||||
float y = -65.0f - frand(0.0f, 35.0f);
|
|
||||||
me->GetMotionMaster()->MovePoint(1, x, y, me->GetPositionZ());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case EVENT_FINISH_BLADE_DANCE:
|
|
||||||
events.SetPhase(0);
|
|
||||||
me->GetMotionMaster()->Clear();
|
|
||||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
|
||||||
if (IsHeroic())
|
|
||||||
events.ScheduleEvent(EVENT_SPELL_CHARGE, 3000);
|
|
||||||
break;
|
|
||||||
case EVENT_SPELL_CHARGE:
|
|
||||||
me->CastSpell(me->GetVictim(), SPELL_CHARGE, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!events.IsInPhase(1))
|
scheduler.Update(diff);
|
||||||
|
|
||||||
|
if (!events.IsInPhase(1)) // howToMigrate?
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetShatteredHallsAI<boss_warchief_kargath_bladefistAI>(creature);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_warchief_kargath_bladefist()
|
void AddSC_boss_warchief_kargath_bladefist()
|
||||||
{
|
{
|
||||||
new boss_warchief_kargath_bladefist();
|
RegisterShatteredHallsCreatureAI(boss_warchief_kargath_bladefist);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,4 +73,6 @@ inline AI* GetShatteredHallsAI(T* obj)
|
|||||||
return GetInstanceAI<AI>(obj, ShatteredHallsLairScriptName);
|
return GetInstanceAI<AI>(obj, ShatteredHallsLairScriptName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define RegisterShatteredHallsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetShatteredHallsAI)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user