chore(Scripts/Hyjal): Remove unneeded Archimonde spell scripts (#19080)
* chore(Scripts/Hyjal): Remove unneeded spell scripts * use trigger flags * Update boss_archimonde.cpp * Update boss_archimonde.cpp
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_hand_of_death', 'spell_finger_of_death');
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |128 WHERE `entry` IN (18104, 18095);
|
||||||
@@ -194,15 +194,6 @@ struct boss_archimonde : public BossAI
|
|||||||
_availableAuras.clear();
|
_availableAuras.clear();
|
||||||
_availableSpells.clear();
|
_availableSpells.clear();
|
||||||
|
|
||||||
if (Map* map = me->GetMap())
|
|
||||||
{
|
|
||||||
map->DoForAllPlayers([&](Player* player)
|
|
||||||
{
|
|
||||||
player->ApplySpellImmune(SPELL_HAND_OF_DEATH, IMMUNITY_ID, SPELL_HAND_OF_DEATH, false);
|
|
||||||
player->ApplySpellImmune(0, IMMUNITY_ID, SPELL_HAND_OF_DEATH, false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (instance->GetBossState(DATA_AZGALOR) != DONE)
|
if (instance->GetBossState(DATA_AZGALOR) != DONE)
|
||||||
{
|
{
|
||||||
me->SetVisible(false);
|
me->SetVisible(false);
|
||||||
@@ -216,7 +207,7 @@ struct boss_archimonde : public BossAI
|
|||||||
ScheduleHealthCheckEvent(10, [&]{
|
ScheduleHealthCheckEvent(10, [&]{
|
||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
DoCastProtection();
|
DoCastAOE(SPELL_PROTECTION_OF_ELUNE, true);
|
||||||
Talk(SAY_ENRAGE);
|
Talk(SAY_ENRAGE);
|
||||||
_enraged = true;
|
_enraged = true;
|
||||||
me->GetMotionMaster()->Clear(false);
|
me->GetMotionMaster()->Clear(false);
|
||||||
@@ -225,7 +216,7 @@ struct boss_archimonde : public BossAI
|
|||||||
{
|
{
|
||||||
if (_wispCount >= 30)
|
if (_wispCount >= 30)
|
||||||
{
|
{
|
||||||
Unit::DealDamage(me, me, me->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
me->KillSelf();
|
||||||
}
|
}
|
||||||
Position wispPosition = { me->GetPositionX() + float(rand() % WISP_OFFSET), me->GetPositionY() + float(rand() % WISP_OFFSET), me->GetPositionZ(), 0.0f };
|
Position wispPosition = { me->GetPositionX() + float(rand() % WISP_OFFSET), me->GetPositionY() + float(rand() % WISP_OFFSET), me->GetPositionZ(), 0.0f };
|
||||||
if (Creature* wisp = me->SummonCreature(CREATURE_ANCIENT_WISP, wispPosition))
|
if (Creature* wisp = me->SummonCreature(CREATURE_ANCIENT_WISP, wispPosition))
|
||||||
@@ -253,8 +244,6 @@ struct boss_archimonde : public BossAI
|
|||||||
{
|
{
|
||||||
if (Creature* nordrassil = me->SummonCreature(CREATURE_CHANNEL_TARGET, nordrassilPosition, TEMPSUMMON_TIMED_DESPAWN, 1200000))
|
if (Creature* nordrassil = me->SummonCreature(CREATURE_CHANNEL_TARGET, nordrassilPosition, TEMPSUMMON_TIMED_DESPAWN, 1200000))
|
||||||
{
|
{
|
||||||
nordrassil->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
nordrassil->SetDisplayId(DISPLAY_ID_TRIGGER);
|
|
||||||
DoCast(nordrassil, SPELL_DRAIN_WORLD_TREE);
|
DoCast(nordrassil, SPELL_DRAIN_WORLD_TREE);
|
||||||
_isChanneling = true;
|
_isChanneling = true;
|
||||||
nordrassil->AI()->DoCast(me, SPELL_DRAIN_WORLD_TREE_2, true);
|
nordrassil->AI()->DoCast(me, SPELL_DRAIN_WORLD_TREE_2, true);
|
||||||
@@ -264,20 +253,7 @@ struct boss_archimonde : public BossAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoCastProtection()
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
|
||||||
if (Map* map = me->GetMap())
|
|
||||||
{
|
|
||||||
map->DoForAllPlayers([&](Player* player)
|
|
||||||
{
|
|
||||||
player->AddAura(SPELL_PROTECTION_OF_ELUNE, player);
|
|
||||||
player->ApplySpellImmune(SPELL_HAND_OF_DEATH, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
|
|
||||||
player->ApplySpellImmune(0, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit* who) override
|
|
||||||
{
|
{
|
||||||
_JustEngagedWith();
|
_JustEngagedWith();
|
||||||
me->InterruptNonMeleeSpells(false);
|
me->InterruptNonMeleeSpells(false);
|
||||||
@@ -345,7 +321,7 @@ struct boss_archimonde : public BossAI
|
|||||||
instance->SetData(DATA_SPAWN_WAVES, 1);
|
instance->SetData(DATA_SPAWN_WAVES, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
Talk(SAY_SLAY);
|
Talk(SAY_SLAY);
|
||||||
}
|
}
|
||||||
@@ -431,8 +407,6 @@ struct boss_archimonde : public BossAI
|
|||||||
{
|
{
|
||||||
if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
|
if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
|
||||||
{
|
{
|
||||||
doomfireSpirit->SetVisible(false);
|
|
||||||
doomfire->SetVisible(false);
|
|
||||||
doomfireSpirit->SetWalk(false);
|
doomfireSpirit->SetWalk(false);
|
||||||
doomfireSpirit->SetReactState(REACT_PASSIVE);
|
doomfireSpirit->SetReactState(REACT_PASSIVE);
|
||||||
doomfire->SetReactState(REACT_PASSIVE);
|
doomfire->SetReactState(REACT_PASSIVE);
|
||||||
@@ -495,42 +469,6 @@ class spell_red_sky_effect : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_finger_of_death : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_finger_of_death);
|
|
||||||
|
|
||||||
void HandleHit(SpellEffIndex /*effIndex*/)
|
|
||||||
{
|
|
||||||
if (GetHitUnit() && GetHitUnit()->GetAura(SPELL_PROTECTION_OF_ELUNE))
|
|
||||||
PreventHitDamage();
|
|
||||||
else
|
|
||||||
GetHitUnit()->RemoveAurasByType(SPELL_AURA_EFFECT_IMMUNITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Register() override
|
|
||||||
{
|
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_finger_of_death::HandleHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class spell_hand_of_death : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_hand_of_death);
|
|
||||||
|
|
||||||
void HandleHit(SpellEffIndex /*effIndex*/)
|
|
||||||
{
|
|
||||||
if (GetHitUnit() && GetHitUnit()->GetAura(SPELL_PROTECTION_OF_ELUNE))
|
|
||||||
PreventHitDamage();
|
|
||||||
else
|
|
||||||
GetHitUnit()->RemoveAurasByType(SPELL_AURA_EFFECT_IMMUNITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Register() override
|
|
||||||
{
|
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_hand_of_death::HandleHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class spell_air_burst : public SpellScript
|
class spell_air_burst : public SpellScript
|
||||||
{
|
{
|
||||||
PrepareSpellScript(spell_air_burst);
|
PrepareSpellScript(spell_air_burst);
|
||||||
@@ -552,8 +490,6 @@ class spell_air_burst : public SpellScript
|
|||||||
void AddSC_boss_archimonde()
|
void AddSC_boss_archimonde()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_red_sky_effect);
|
RegisterSpellScript(spell_red_sky_effect);
|
||||||
RegisterSpellScript(spell_hand_of_death);
|
|
||||||
RegisterSpellScript(spell_finger_of_death);
|
|
||||||
RegisterSpellScript(spell_air_burst);
|
RegisterSpellScript(spell_air_burst);
|
||||||
RegisterHyjalAI(boss_archimonde);
|
RegisterHyjalAI(boss_archimonde);
|
||||||
RegisterHyjalAI(npc_ancient_wisp);
|
RegisterHyjalAI(npc_ancient_wisp);
|
||||||
|
|||||||
Reference in New Issue
Block a user