mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-04 08:07:09 +01:00
Scripts/ICC: Fixed Chocking Gas killing Abomination (#25565)
(cherry picked from commit 3c0766df54)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_putricide_choking_gas_filter';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(71278,'spell_putricide_choking_gas_filter'),
|
||||
(71279,'spell_putricide_choking_gas_filter');
|
||||
@@ -1450,6 +1450,39 @@ class spell_abomination_mutated_transformation : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 71278, 72460, 72619, 72620 - Choking Gas
|
||||
// 71279, 72459, 72621, 72622 - Choking Gas Explosion
|
||||
class spell_putricide_choking_gas_filter : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_putricide_choking_gas_filter);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_OOZE_VARIABLE, SPELL_GAS_VARIABLE });
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if([](WorldObject* obj)
|
||||
{
|
||||
return obj->ToUnit() && obj->ToUnit()->GetVehicle();
|
||||
});
|
||||
}
|
||||
|
||||
void HandleDispel(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* target = GetHitUnit();
|
||||
target->RemoveAurasDueToSpell(SPELL_OOZE_VARIABLE);
|
||||
target->RemoveAurasDueToSpell(SPELL_GAS_VARIABLE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_choking_gas_filter::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_putricide_choking_gas_filter::HandleDispel, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_professor_putricide()
|
||||
{
|
||||
// Creatures
|
||||
@@ -1477,4 +1510,5 @@ void AddSC_boss_professor_putricide()
|
||||
RegisterSpellScript(spell_putricide_clear_aura_effect_value);
|
||||
RegisterSpellScript(spell_stinky_precious_decimate);
|
||||
RegisterSpellScript(spell_abomination_mutated_transformation);
|
||||
RegisterSpellScript(spell_putricide_choking_gas_filter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user