aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-08-28 02:22:50 -0300
committerariel- <ariel-@users.noreply.github.com>2016-08-28 02:22:50 -0300
commit27590fbb9856c77af49bcf396e86db8f8f3aec9d (patch)
treec92bbff5ad4bd42c550f52aaa2bfe66fea6a5cd1
parent5615645b6bd3dc432ed60897b727cdc7f6962c22 (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)
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp22
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp8
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 fe6e4081326..6a23e1c3d1b 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()->Effects[stage].CalcValue()), true, NULL, NULL, GetCaster()->GetGUID());
+ GetCaster()->CastSpell(target, uint32(GetSpellInfo()->Effects[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 388d7ff7561..684e5866386 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;