diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-08-28 02:22:50 -0300 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-02-18 17:16:11 +0100 |
commit | b3f993894af2963801fe79eabea6f5be1098161c (patch) | |
tree | c64cdbb1aed84ac75dc50c06a97b12214a6faa09 /src | |
parent | e0b557c8583562f87b1db118994e873f15d81229 (diff) |
Core/Scripts: Professor Putricide oozes, reapply passive proc auras on reset, and register them as PP summons since they're summoned by a trigger. (f183ed3c50cdcf13cd9fe608e0f4791177f120a4 follow-up)
(cherry picked from commit 27590fbb9856c77af49bcf396e86db8f8f3aec9d)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp | 22 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp | 8 |
2 files changed, 19 insertions, 11 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 77488abe988..f64b40dab3c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -316,13 +316,11 @@ class boss_professor_putricide : public CreatureScript case NPC_GAS_CLOUD: // no possible aura seen in sniff adding the aurastate summon->ModifyAuraState(AURA_STATE_UNKNOWN22, true); - summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true); summon->SetReactState(REACT_PASSIVE); break; case NPC_VOLATILE_OOZE: // no possible aura seen in sniff adding the aurastate summon->ModifyAuraState(AURA_STATE_UNKNOWN19, true); - summon->CastSpell(summon, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, true); summon->SetReactState(REACT_PASSIVE); break; case NPC_CHOKING_GAS_BOMB: @@ -716,10 +714,8 @@ class boss_professor_putricide : public CreatureScript class npc_putricide_oozeAI : public ScriptedAI { public: - npc_putricide_oozeAI(Creature* creature, uint32 hitTargetSpellId) : ScriptedAI(creature), - _hitTargetSpellId(hitTargetSpellId), _newTargetSelectTimer(0) - { - } + npc_putricide_oozeAI(Creature* creature, uint32 auraSpellId, uint32 hitTargetSpellId) : ScriptedAI(creature), + _auraSpellId(auraSpellId), _hitTargetSpellId(hitTargetSpellId), _newTargetSelectTimer(0) { } void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override { @@ -727,6 +723,11 @@ class npc_putricide_oozeAI : public ScriptedAI _newTargetSelectTimer = 1000; } + void Reset() override + { + DoCastAOE(_auraSpellId, true); + } + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override { if (spell->Id == SPELL_TEAR_GAS_CREATURE) @@ -761,6 +762,7 @@ class npc_putricide_oozeAI : public ScriptedAI virtual void CastMainSpell() = 0; private: + uint32 _auraSpellId; uint32 _hitTargetSpellId; uint32 _newTargetSelectTimer; }; @@ -772,9 +774,7 @@ class npc_volatile_ooze : public CreatureScript struct npc_volatile_oozeAI : public npc_putricide_oozeAI { - npc_volatile_oozeAI(Creature* creature) : npc_putricide_oozeAI(creature, SPELL_OOZE_ERUPTION) - { - } + npc_volatile_oozeAI(Creature* creature) : npc_putricide_oozeAI(creature, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, SPELL_OOZE_ERUPTION) { } void CastMainSpell() override { @@ -795,7 +795,7 @@ class npc_gas_cloud : public CreatureScript struct npc_gas_cloudAI : public npc_putricide_oozeAI { - npc_gas_cloudAI(Creature* creature) : npc_putricide_oozeAI(creature, SPELL_EXPUNGED_GAS) + npc_gas_cloudAI(Creature* creature) : npc_putricide_oozeAI(creature, SPELL_GASEOUS_BLOAT_PROC, SPELL_EXPUNGED_GAS) { _newTargetSelectTimer = 0; } @@ -1029,7 +1029,7 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader break; } - GetCaster()->CastSpell(target, uint32(GetSpellInfo()->GetEffect(stage)->CalcValue()), true, NULL, NULL, GetCaster()->GetGUID()); + GetCaster()->CastSpell(target, uint32(GetSpellInfo()->GetEffect(stage)->CalcValue()), true); } void Register() override diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index a2db0c28565..a9f029059ac 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -264,6 +264,14 @@ class instance_icecrown_citadel : public InstanceMapScript case NPC_PROFESSOR_PUTRICIDE: ProfessorPutricideGUID = creature->GetGUID(); break; + case NPC_VOLATILE_OOZE: + case NPC_GAS_CLOUD: + //! These creatures are summoned by something else than Professor Putricide + //! but need to be controlled/despawned by him - so they need to be + //! registered on his summon list + if (Creature* professorPutricide = instance->GetCreature(ProfessorPutricideGUID)) + professorPutricide->AI()->JustSummoned(creature); + break; case NPC_PRINCE_KELESETH: BloodCouncilGUIDs[0] = creature->GetGUID(); break; |