fix(Scripts/TheEye): remove faulty aurascript and do visual transition in normal script instead (#18395)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 34341 AND `ScriptName` = 'spell_alar_ember_blast_death';
|
||||||
@@ -69,7 +69,8 @@ enum Misc
|
|||||||
EVENT_SPELL_BERSERK = 3,
|
EVENT_SPELL_BERSERK = 3,
|
||||||
|
|
||||||
EVENT_MOVE_TO_PHASE_2 = 4,
|
EVENT_MOVE_TO_PHASE_2 = 4,
|
||||||
EVENT_FINISH_DIVE = 5
|
EVENT_FINISH_DIVE = 5,
|
||||||
|
EVENT_INVISIBLE = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GroupAlar
|
enum GroupAlar
|
||||||
@@ -172,22 +173,25 @@ struct boss_alar : public BossAI
|
|||||||
if (damage >= me->GetHealth() && _platform < POINT_MIDDLE)
|
if (damage >= me->GetHealth() && _platform < POINT_MIDDLE)
|
||||||
{
|
{
|
||||||
damage = 0;
|
damage = 0;
|
||||||
me->SetReactState(REACT_PASSIVE);
|
DoCastSelf(SPELL_EMBER_BLAST, true);
|
||||||
scheduler.CancelAll();
|
PretendToDie(me);
|
||||||
me->CastStop();
|
ScheduleUniqueTimedEvent(1s, [&]{
|
||||||
me->SetHealth(me->GetMaxHealth());
|
me->SetVisible(false);
|
||||||
DoCastSelf(SPELL_EMBER_BLAST, true); //spellscript doesn't trigger
|
}, EVENT_INVISIBLE);
|
||||||
|
|
||||||
ScheduleUniqueTimedEvent(8s, [&]{
|
ScheduleUniqueTimedEvent(8s, [&]{
|
||||||
me->SetPosition(alarPoints[POINT_MIDDLE]);
|
me->SetPosition(alarPoints[POINT_MIDDLE]);
|
||||||
}, EVENT_RELOCATE_MIDDLE);
|
}, EVENT_RELOCATE_MIDDLE);
|
||||||
ScheduleUniqueTimedEvent(12s, [&]
|
ScheduleUniqueTimedEvent(12s, [&]
|
||||||
{
|
{
|
||||||
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
|
me->SetVisible(true);
|
||||||
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
|
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
|
||||||
DoCastSelf(SPELL_REBIRTH_PHASE2);
|
DoCastSelf(SPELL_REBIRTH_PHASE2);
|
||||||
}, EVENT_MOVE_TO_PHASE_2);
|
}, EVENT_MOVE_TO_PHASE_2);
|
||||||
ScheduleUniqueTimedEvent(16001ms, [&]{
|
ScheduleUniqueTimedEvent(16001ms, [&]{
|
||||||
|
me->SetHealth(me->GetMaxHealth());
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||||
_platform = POINT_MIDDLE;
|
_platform = POINT_MIDDLE;
|
||||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||||
ScheduleAbilities();
|
ScheduleAbilities();
|
||||||
@@ -195,6 +199,18 @@ struct boss_alar : public BossAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PretendToDie(Creature* creature)
|
||||||
|
{
|
||||||
|
scheduler.CancelAll();
|
||||||
|
creature->InterruptNonMeleeSpells(true);
|
||||||
|
creature->RemoveAllAuras();
|
||||||
|
creature->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
creature->SetReactState(REACT_PASSIVE);
|
||||||
|
creature->GetMotionMaster()->MovementExpired(false);
|
||||||
|
creature->GetMotionMaster()->MoveIdle();
|
||||||
|
creature->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||||
|
}
|
||||||
|
|
||||||
void ScheduleAbilities()
|
void ScheduleAbilities()
|
||||||
{
|
{
|
||||||
ScheduleTimedEvent(57s, [&]
|
ScheduleTimedEvent(57s, [&]
|
||||||
@@ -394,37 +410,6 @@ class spell_alar_ember_blast : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_alar_ember_blast_death : public AuraScript
|
|
||||||
{
|
|
||||||
PrepareAuraScript(spell_alar_ember_blast_death);
|
|
||||||
|
|
||||||
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
|
||||||
{
|
|
||||||
PreventDefaultAction(); // xinef: prevent default action after change that invisibility in instances is executed instantly even for creatures
|
|
||||||
Unit* target = GetTarget();
|
|
||||||
InvisibilityType type = InvisibilityType(aurEff->GetMiscValue());
|
|
||||||
target->m_invisibility.AddFlag(type);
|
|
||||||
target->m_invisibility.AddValue(type, aurEff->GetAmount());
|
|
||||||
|
|
||||||
GetUnitOwner()->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
GetUnitOwner()->SetStandState(UNIT_STAND_STATE_DEAD);
|
|
||||||
GetUnitOwner()->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f);
|
|
||||||
GetUnitOwner()->m_delayed_unit_relocation_timer = 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
|
||||||
{
|
|
||||||
GetUnitOwner()->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
GetUnitOwner()->SetStandState(UNIT_STAND_STATE_STAND);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Register() override
|
|
||||||
{
|
|
||||||
OnEffectApply += AuraEffectApplyFn(spell_alar_ember_blast_death::OnApply, EFFECT_2, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
|
|
||||||
OnEffectRemove += AuraEffectRemoveFn(spell_alar_ember_blast_death::OnRemove, EFFECT_2, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class spell_alar_dive_bomb : public AuraScript
|
class spell_alar_dive_bomb : public AuraScript
|
||||||
{
|
{
|
||||||
PrepareAuraScript(spell_alar_dive_bomb);
|
PrepareAuraScript(spell_alar_dive_bomb);
|
||||||
@@ -446,7 +431,6 @@ void AddSC_boss_alar()
|
|||||||
RegisterTheEyeAI(boss_alar);
|
RegisterTheEyeAI(boss_alar);
|
||||||
RegisterSpellScript(spell_alar_flame_quills);
|
RegisterSpellScript(spell_alar_flame_quills);
|
||||||
RegisterSpellScript(spell_alar_ember_blast);
|
RegisterSpellScript(spell_alar_ember_blast);
|
||||||
RegisterSpellScript(spell_alar_ember_blast_death);
|
|
||||||
RegisterSpellScript(spell_alar_dive_bomb);
|
RegisterSpellScript(spell_alar_dive_bomb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user