fix(Scripts/SethekkHalls): Prevent pets from pulling Ikiss from behin… (#15764)
* fix(Scripts/SethekkHalls): Prevent pets from pulling Ikiss from behind doors * Update src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp
This commit is contained in:
@@ -43,7 +43,7 @@ enum Spells
|
|||||||
|
|
||||||
struct boss_talon_king_ikiss : public BossAI
|
struct boss_talon_king_ikiss : public BossAI
|
||||||
{
|
{
|
||||||
boss_talon_king_ikiss(Creature* creature) : BossAI(creature, DATA_IKISS), _spoken(false), _manaShield(false)
|
boss_talon_king_ikiss(Creature* creature) : BossAI(creature, DATA_IKISS), _spoken(false)
|
||||||
{
|
{
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
@@ -55,8 +55,44 @@ struct boss_talon_king_ikiss : public BossAI
|
|||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
_spoken = false;
|
_spoken = false;
|
||||||
_manaShield = false;
|
|
||||||
_comboHealthStages.fill(false);
|
ScheduleHealthCheckEvent(80, [&] {
|
||||||
|
TeleportAndCastExplosion();
|
||||||
|
});
|
||||||
|
|
||||||
|
ScheduleHealthCheckEvent(50, [&] {
|
||||||
|
TeleportAndCastExplosion();
|
||||||
|
});
|
||||||
|
|
||||||
|
ScheduleHealthCheckEvent(25, [&] {
|
||||||
|
TeleportAndCastExplosion();
|
||||||
|
});
|
||||||
|
|
||||||
|
ScheduleHealthCheckEvent(20, [&] {
|
||||||
|
DoCast(me, SPELL_MANA_SHIELD);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @todo: remove this once pets stop going through doors.
|
||||||
|
bool CanAIAttack(Unit const* /*victim*/) const override
|
||||||
|
{
|
||||||
|
return _spoken;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TeleportAndCastExplosion()
|
||||||
|
{
|
||||||
|
me->InterruptNonMeleeSpells(false);
|
||||||
|
DoCastSelf(SPELL_ARCANE_BUBBLE, true);
|
||||||
|
DoCastAOE(SPELL_BLINK);
|
||||||
|
Talk(EMOTE_ARCANE_EXP);
|
||||||
|
|
||||||
|
scheduler.Schedule(1s, [this](TaskContext)
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
||||||
|
}).Schedule(6500ms, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
me->GetThreatMgr().ResetAllThreat();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
@@ -106,69 +142,6 @@ struct boss_talon_king_ikiss : public BossAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
|
|
||||||
{
|
|
||||||
if (!_comboHealthStages[0] && me->HealthBelowPctDamaged(80, damage))
|
|
||||||
{
|
|
||||||
_comboHealthStages[0] = true;
|
|
||||||
|
|
||||||
me->InterruptNonMeleeSpells(false);
|
|
||||||
DoCastSelf(SPELL_ARCANE_BUBBLE, true);
|
|
||||||
DoCastAOE(SPELL_BLINK);
|
|
||||||
Talk(EMOTE_ARCANE_EXP);
|
|
||||||
|
|
||||||
scheduler.Schedule(1s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
|
||||||
}).Schedule(6500ms, [this](TaskContext /*context*/)
|
|
||||||
{
|
|
||||||
me->GetThreatMgr().ResetAllThreat();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_comboHealthStages[1] && me->HealthBelowPctDamaged(50, damage))
|
|
||||||
{
|
|
||||||
_comboHealthStages[1] = true;
|
|
||||||
|
|
||||||
me->InterruptNonMeleeSpells(false);
|
|
||||||
DoCastSelf(SPELL_ARCANE_BUBBLE, true);
|
|
||||||
DoCastAOE(SPELL_BLINK);
|
|
||||||
Talk(EMOTE_ARCANE_EXP);
|
|
||||||
|
|
||||||
scheduler.Schedule(1s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
|
||||||
}).Schedule(6500ms, [this](TaskContext /*context*/)
|
|
||||||
{
|
|
||||||
me->GetThreatMgr().ResetAllThreat();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_comboHealthStages[2] && me->HealthBelowPctDamaged(25, damage))
|
|
||||||
{
|
|
||||||
_comboHealthStages[2] = true;
|
|
||||||
|
|
||||||
me->InterruptNonMeleeSpells(false);
|
|
||||||
DoCastSelf(SPELL_ARCANE_BUBBLE, true);
|
|
||||||
DoCastAOE(SPELL_BLINK);
|
|
||||||
Talk(EMOTE_ARCANE_EXP);
|
|
||||||
|
|
||||||
scheduler.Schedule(1s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
|
||||||
}).Schedule(6500ms, [this](TaskContext /*context*/)
|
|
||||||
{
|
|
||||||
me->GetThreatMgr().ResetAllThreat();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_manaShield && me->HealthBelowPctDamaged(20, damage))
|
|
||||||
{
|
|
||||||
DoCast(me, SPELL_MANA_SHIELD);
|
|
||||||
_manaShield = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (urand(0, 1))
|
if (urand(0, 1))
|
||||||
@@ -177,8 +150,6 @@ struct boss_talon_king_ikiss : public BossAI
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool _spoken;
|
bool _spoken;
|
||||||
bool _manaShield;
|
|
||||||
std::array<bool, 3> _comboHealthStages;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 38194 - Blink
|
// 38194 - Blink
|
||||||
|
|||||||
Reference in New Issue
Block a user