mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
fix(Scripts/Northrend): KTZ Void Blast can now fail Immortal criteria (#25652)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 27812 AND `ScriptName` = 'spell_kelthuzad_void_blast';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(27812, 'spell_kelthuzad_void_blast');
|
||||
@@ -680,10 +680,34 @@ class spell_kelthuzad_detonate_mana_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_kelthuzad_void_blast : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_kelthuzad_void_blast);
|
||||
|
||||
void HandleAfterHit()
|
||||
{
|
||||
Player* player = GetHitPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (player->IsAlive())
|
||||
return;
|
||||
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
instance->StorePersistentData(PERSISTENT_DATA_IMMORTAL_FAIL, 1);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_kelthuzad_void_blast::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_kelthuzad()
|
||||
{
|
||||
new boss_kelthuzad();
|
||||
new boss_kelthuzad_minion();
|
||||
RegisterSpellScript(spell_kelthuzad_frost_blast);
|
||||
RegisterSpellScript(spell_kelthuzad_detonate_mana_aura);
|
||||
RegisterSpellScript(spell_kelthuzad_void_blast);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user