mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/ICC: Fixed Chocking Gas killing Abomination (#25565)
This commit is contained in:
11
sql/updates/world/3.3.5/2020_10_12_00_world.sql
Normal file
11
sql/updates/world/3.3.5/2020_10_12_00_world.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
--
|
||||
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'),
|
||||
(72460,'spell_putricide_choking_gas_filter'),
|
||||
(72619,'spell_putricide_choking_gas_filter'),
|
||||
(72620,'spell_putricide_choking_gas_filter'),
|
||||
(71279,'spell_putricide_choking_gas_filter'),
|
||||
(72459,'spell_putricide_choking_gas_filter'),
|
||||
(72621,'spell_putricide_choking_gas_filter'),
|
||||
(72622,'spell_putricide_choking_gas_filter');
|
||||
@@ -1453,6 +1453,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
|
||||
@@ -1480,4 +1513,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