diff --git a/data/sql/updates/pending_db_world/rev_1718581107240568800.sql b/data/sql/updates/pending_db_world/rev_1718581107240568800.sql new file mode 100644 index 000000000..a82272d91 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718581107240568800.sql @@ -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); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 5cc549636..cdf4fc11a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -194,15 +194,6 @@ struct boss_archimonde : public BossAI _availableAuras.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) { me->SetVisible(false); @@ -216,7 +207,7 @@ struct boss_archimonde : public BossAI ScheduleHealthCheckEvent(10, [&]{ scheduler.CancelAll(); me->SetReactState(REACT_PASSIVE); - DoCastProtection(); + DoCastAOE(SPELL_PROTECTION_OF_ELUNE, true); Talk(SAY_ENRAGE); _enraged = true; me->GetMotionMaster()->Clear(false); @@ -225,7 +216,7 @@ struct boss_archimonde : public BossAI { 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 }; 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)) { - nordrassil->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - nordrassil->SetDisplayId(DISPLAY_ID_TRIGGER); DoCast(nordrassil, SPELL_DRAIN_WORLD_TREE); _isChanneling = true; nordrassil->AI()->DoCast(me, SPELL_DRAIN_WORLD_TREE_2, true); @@ -264,20 +253,7 @@ struct boss_archimonde : public BossAI } } - void DoCastProtection() - { - 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 + void JustEngagedWith(Unit* /*who*/) override { _JustEngagedWith(); me->InterruptNonMeleeSpells(false); @@ -345,7 +321,7 @@ struct boss_archimonde : public BossAI instance->SetData(DATA_SPAWN_WAVES, 1); } - void KilledUnit(Unit* victim) override + void KilledUnit(Unit* /*victim*/) override { Talk(SAY_SLAY); } @@ -431,8 +407,6 @@ struct boss_archimonde : public BossAI { if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) { - doomfireSpirit->SetVisible(false); - doomfire->SetVisible(false); doomfireSpirit->SetWalk(false); doomfireSpirit->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 { PrepareSpellScript(spell_air_burst); @@ -552,8 +490,6 @@ class spell_air_burst : public SpellScript void AddSC_boss_archimonde() { RegisterSpellScript(spell_red_sky_effect); - RegisterSpellScript(spell_hand_of_death); - RegisterSpellScript(spell_finger_of_death); RegisterSpellScript(spell_air_burst); RegisterHyjalAI(boss_archimonde); RegisterHyjalAI(npc_ancient_wisp);