fix(Scripts/TempleOfAhnQiraj): Don't let Giant Claw Tentacles autoatt… (#13550)

* fix(Scripts/TempleOfAhnQiraj): Don't let Giant Claw Tentacles autoattack while submerged and reorder digestive acid cast

* delay small claw tentacles autoattack by 2s

* Revert "delay small claw tentacles autoattack by 2s"

This reverts commit 08b9c7d62528a9147266d084768b8a7fb0deb3e0.

* change the delay
This commit is contained in:
Skjalf
2022-10-26 17:17:46 -03:00
committed by GitHub
parent 47bf00ad2f
commit bfa68b0839

View File

@@ -452,10 +452,9 @@ struct boss_cthun : public BossAI
target->m_Events.AddEventAtOffset([target, this]()
{
DoCast(target, SPELL_DIGESTIVE_ACID, true);
DoTeleportPlayer(target, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O);
target->RemoveAurasDueToSpell(SPELL_MIND_FLAY);
//Cast digestive acid on them
DoCast(target, SPELL_DIGESTIVE_ACID, true);
}, 3800ms);
}
@@ -747,6 +746,8 @@ struct npc_giant_claw_tentacle : public ScriptedAI
}
}
}
_canAttack = false;
}
void JustDied(Unit* /*killer*/) override
@@ -770,14 +771,17 @@ struct npc_giant_claw_tentacle : public ScriptedAI
DoZoneInCombat();
_scheduler.Schedule(2s, [this](TaskContext context)
{
{
DoCastVictim(SPELL_HAMSTRING);
context.Repeat(10s);
}).Schedule(5s, [this](TaskContext context)
{
DoCastSelf(SPELL_THRASH);
context.Repeat(10s);
});
}).Schedule(5s, [this](TaskContext context)
{
DoCastSelf(SPELL_THRASH);
context.Repeat(10s);
}).Schedule(3s, [this](TaskContext /*context*/)
{
_canAttack = true;
});
ScheduleMeleeCheck();
}
@@ -825,6 +829,7 @@ struct npc_giant_claw_tentacle : public ScriptedAI
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
_scheduler.CancelAll();
_canAttack = false;
_scheduler.Schedule(5s, [this](TaskContext /*task*/)
{
@@ -851,6 +856,11 @@ struct npc_giant_claw_tentacle : public ScriptedAI
ScheduleMeleeCheck();
}
_scheduler.Schedule(3s, [this](TaskContext /*context*/)
{
_canAttack = true;
});
}
void UpdateAI(uint32 diff) override
@@ -861,12 +871,16 @@ struct npc_giant_claw_tentacle : public ScriptedAI
_scheduler.Update(diff);
DoMeleeAttackIfReady();
if (_canAttack)
{
DoMeleeAttackIfReady();
}
}
private:
TaskScheduler _scheduler;
ObjectGuid _portalGUID;
bool _canAttack;
};
struct npc_giant_eye_tentacle : public ScriptedAI