Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
- index a0fca52..a333cb7 100755
- --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
- +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
- @@ -1562,6 +1562,79 @@ class spell_stinky_precious_decimate : public SpellScriptLoader
- }
- };
- +class ChokingGasTargetFilter
- +{
- + public:
- + explicit ChokingGasTargetFilter(Unit* caster) : _caster(caster) { }
- +
- + bool operator()(Unit* unit)
- + {
- + if (unit->GetVehicleBase())
- + if (unit->GetVehicleBase()->GetEntry() == NPC_MUTATED_ABOMINATION_10 ||
- + unit->GetVehicleBase()->GetEntry() == NPC_MUTATED_ABOMINATION_25)
- + return true;
- + return false;
- + }
- +
- + private:
- + Unit* _caster;
- +};
- +
- +class spell_putricide_choking_gas_damage : public SpellScriptLoader
- +{
- + public:
- + spell_putricide_choking_gas_damage() : SpellScriptLoader("spell_putricide_choking_gas_damage") { }
- +
- + class spell_putricide_choking_gas_explosion_damage_SpellScript : public SpellScript
- + {
- + PrepareSpellScript(spell_putricide_choking_gas_explosion_damage_SpellScript);
- +
- + void FilterTargets(std::list<Unit*>& unitList)
- + {
- + unitList.remove_if(ChokingGasTargetFilter(GetCaster()));
- + }
- +
- + void Register()
- + {
- + OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_choking_gas_explosion_damage_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
- + OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_choking_gas_explosion_damage_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENTRY);
- + }
- + };
- +
- + SpellScript* GetSpellScript() const
- + {
- + return new spell_putricide_choking_gas_explosion_damage_SpellScript();
- + }
- +};
- +
- +class spell_putricide_choking_gas_explosion_damage : public SpellScriptLoader
- +{
- + public:
- + spell_putricide_choking_gas_explosion_damage() : SpellScriptLoader("spell_putricide_choking_gas_explosion_damage") { }
- +
- + class spell_putricide_choking_gas_explosion_damage_SpellScript : public SpellScript
- + {
- + PrepareSpellScript(spell_putricide_choking_gas_explosion_damage_SpellScript);
- +
- + void FilterTargets(std::list<Unit*>& unitList)
- + {
- + unitList.remove_if(ChokingGasTargetFilter(GetCaster()));
- + }
- +
- + void Register()
- + {
- + OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_choking_gas_explosion_damage_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
- + OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_choking_gas_explosion_damage_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENTRY);
- + OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_choking_gas_explosion_damage_SpellScript::FilterTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENTRY);
- + }
- + };
- +
- + SpellScript* GetSpellScript() const
- + {
- + return new spell_putricide_choking_gas_explosion_damage_SpellScript();
- + }
- +};
- +
- void AddSC_boss_professor_putricide()
- {
- new boss_professor_putricide();
- @@ -1584,4 +1657,6 @@ void AddSC_boss_professor_putricide()
- new spell_putricide_regurgitated_ooze();
- new spell_putricide_clear_aura_effect_value();
- new spell_stinky_precious_decimate();
- + new spell_putricide_choking_gas_damage();
- + new spell_putricide_choking_gas_explosion_damage();
- }
Advertisement
Add Comment
Please, Sign In to add comment