mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(Scripts/SunwellPlateau): Felmyst Strafe strafe spells (#21745)
Co-authored-by: killerwife <killerwife@gmail.com>
This commit is contained in:
@@ -49,6 +49,12 @@ enum Spells
|
||||
SPELL_ENCAPSULATE_CHANNEL = 45661,
|
||||
|
||||
//Flight phase
|
||||
SPELL_TRIGGER_TOP_STRAFE = 45586,
|
||||
SPELL_TRIGGER_MIDDLE_STRAFE = 45622,
|
||||
SPELL_TRIGGER_BOTTOM_STRAFE = 45623,
|
||||
SPELL_STRAFE_TOP = 45585,
|
||||
SPELL_STRAFE_MIDDLE = 45633,
|
||||
SPELL_STRAFE_BOTTOM = 45635,
|
||||
SPELL_SUMMON_DEMONIC_VAPOR = 45391,
|
||||
SPELL_DEMONIC_VAPOR_SPAWN_TRIGGER = 45388, // Triggers visual beam
|
||||
SPELL_DEMONIC_VAPOR_PERIODIC = 45411, // Spawns cloud and deals damage
|
||||
@@ -110,18 +116,17 @@ public:
|
||||
|
||||
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
|
||||
{
|
||||
std::list<Creature*> creatureList;
|
||||
_caster->GetCreaturesWithEntryInRange(creatureList, 70.0f, NPC_FOG_TRIGGER);
|
||||
for (auto const& creature : creatureList)
|
||||
switch (_currentLane)
|
||||
{
|
||||
if (_caster->GetExactDist2d(creature) <= 11.0f)
|
||||
{
|
||||
creature->CastSpell(creature, SPELL_FOG_OF_CORRUPTION, true);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!_currentLane && creature->GetPositionX() > 1510.0f)
|
||||
creature->CastSpell(creature, SPELL_FOG_OF_CORRUPTION, true);
|
||||
case 0: // top
|
||||
_caster->CastSpell(_caster, SPELL_STRAFE_TOP, true);
|
||||
break;
|
||||
case 1: // middle
|
||||
_caster->CastSpell(_caster, SPELL_STRAFE_MIDDLE, true);
|
||||
break;
|
||||
case 2: // bottom
|
||||
_caster->CastSpell(_caster, SPELL_STRAFE_BOTTOM, true);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -183,6 +188,12 @@ struct boss_felmyst : public BossAI
|
||||
Talk(YELL_KILL);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_STRAFE_TOP || spell->Id == SPELL_STRAFE_MIDDLE || spell->Id == SPELL_STRAFE_BOTTOM)
|
||||
target->CastSpell(target, SPELL_FOG_OF_CORRUPTION, true);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
@@ -297,15 +308,8 @@ struct boss_felmyst : public BossAI
|
||||
case POINT_LANE:
|
||||
Talk(EMOTE_BREATH);
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(0));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(1000));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(1500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(2000));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(2500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(3000));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(3500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(4000));
|
||||
for (uint8 i = 0; i < 16; ++i)
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(i*250));
|
||||
}, 5s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
|
||||
Reference in New Issue
Block a user