fix(Scripts/MagtheridonsLair): make it so no attack is being done during Quake and fix p1 cheese tactic (#17136)
* initial - adds condition for taunt speech - makes it so no attack happens whatsoever during quake * fix p1 channeler skip bug * initialise channelers * doforallminions * thisiswhathappenswhenyoucodeinbrowser * Update src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp --------- Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
@@ -102,12 +102,16 @@ struct boss_magtheridon : public BossAI
|
|||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_channelersKilled = 0;
|
_channelersKilled = 0;
|
||||||
_currentPhase = 0;
|
_currentPhase = 0;
|
||||||
|
_castingQuake = false;
|
||||||
_recentlySpoken = false;
|
_recentlySpoken = false;
|
||||||
_magReleased = false;
|
_magReleased = false;
|
||||||
_interruptScheduler.CancelAll();
|
_interruptScheduler.CancelAll();
|
||||||
scheduler.Schedule(90s, [this](TaskContext context)
|
scheduler.Schedule(90s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
if (!me->IsEngaged())
|
||||||
{
|
{
|
||||||
Talk(SAY_TAUNT);
|
Talk(SAY_TAUNT);
|
||||||
|
}
|
||||||
context.Repeat(90s);
|
context.Repeat(90s);
|
||||||
});
|
});
|
||||||
DoCastSelf(SPELL_SHADOW_CAGE, true);
|
DoCastSelf(SPELL_SHADOW_CAGE, true);
|
||||||
@@ -182,9 +186,18 @@ struct boss_magtheridon : public BossAI
|
|||||||
context.Repeat(11s, 39s);
|
context.Repeat(11s, 39s);
|
||||||
}).Schedule(40s, [this](TaskContext context)
|
}).Schedule(40s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_QUAKE); //needs fixes with custom spell
|
DoCastSelf(SPELL_QUAKE);
|
||||||
|
_castingQuake = true;
|
||||||
|
me->GetMotionMaster()->Clear();
|
||||||
|
me->SetReactState(REACT_PASSIVE);
|
||||||
|
me->SetOrientation(me->GetAngle(me->GetVictim()));
|
||||||
|
me->SetTarget(ObjectGuid::Empty);
|
||||||
|
scheduler.DelayAll(6999ms);
|
||||||
scheduler.Schedule(7s, [this](TaskContext /*context*/)
|
scheduler.Schedule(7s, [this](TaskContext /*context*/)
|
||||||
{
|
{
|
||||||
|
_castingQuake = false;
|
||||||
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||||
DoCastSelf(SPELL_BLAST_NOVA);
|
DoCastSelf(SPELL_BLAST_NOVA);
|
||||||
|
|
||||||
_interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context)
|
_interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context)
|
||||||
@@ -234,6 +247,10 @@ struct boss_magtheridon : public BossAI
|
|||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
Talk(SAY_EMOTE_BEGIN);
|
Talk(SAY_EMOTE_BEGIN);
|
||||||
|
|
||||||
|
instance->DoForAllMinions(TYPE_MAGTHERIDON, [&](Creature* creature) {
|
||||||
|
creature->SetInCombatWithZone();
|
||||||
|
});
|
||||||
|
|
||||||
scheduler.Schedule(60s, GROUP_EARLY_RELEASE_CHECK, [this](TaskContext /*context*/)
|
scheduler.Schedule(60s, GROUP_EARLY_RELEASE_CHECK, [this](TaskContext /*context*/)
|
||||||
{
|
{
|
||||||
Talk(SAY_EMOTE_NEARLY);
|
Talk(SAY_EMOTE_NEARLY);
|
||||||
@@ -256,13 +273,14 @@ struct boss_magtheridon : public BossAI
|
|||||||
scheduler.Update(diff);
|
scheduler.Update(diff);
|
||||||
_interruptScheduler.Update(diff);
|
_interruptScheduler.Update(diff);
|
||||||
|
|
||||||
if (_currentPhase != 1)
|
if (_currentPhase != 1 && !_castingQuake)
|
||||||
{
|
{
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool _castingQuake;
|
||||||
bool _recentlySpoken;
|
bool _recentlySpoken;
|
||||||
bool _magReleased;
|
bool _magReleased;
|
||||||
uint8 _currentPhase;
|
uint8 _currentPhase;
|
||||||
|
|||||||
Reference in New Issue
Block a user