Scripts/Icecrown Citadel: Professor Putricide will now remove Mutated Plague from players when dying

This commit is contained in:
Shauren
2012-01-30 12:31:59 +01:00
parent c62a82c674
commit 83e0486e59
3 changed files with 37 additions and 0 deletions
@@ -0,0 +1,3 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=72618;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,72618,0,0,18,1,0,0,0, '', 'Mutated Plague Clear - target players');
@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_putricide_clear_mutated_plague';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(72618,'spell_putricide_clear_mutated_plague');
@@ -75,6 +75,7 @@ enum Spells
SPELL_PLAGUE_SICKNESS = 70953,
SPELL_UNBOUND_PLAGUE_PROTECTION = 70955,
SPELL_MUTATED_PLAGUE = 72451,
SPELL_MUTATED_PLAGUE_CLEAR = 72618,
// Slime Puddle
SPELL_GROW_STACKER = 70345,
@@ -244,6 +245,7 @@ class boss_professor_putricide : public CreatureScript
{
_JustDied();
Talk(SAY_DEATH);
DoCast(SPELL_MUTATED_PLAGUE_CLEAR);
}
void JustSummoned(Creature* summon)
@@ -1427,6 +1429,34 @@ class spell_putricide_regurgitated_ooze : public SpellScriptLoader
}
};
class spell_putricide_clear_mutated_plague : public SpellScriptLoader
{
public:
spell_putricide_clear_mutated_plague() : SpellScriptLoader("spell_putricide_clear_mutated_plague") { }
class spell_putricide_clear_mutated_plague_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_clear_mutated_plague_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
uint32 auraId = sSpellMgr->GetSpellIdForDifficulty(uint32(GetEffectValue()), GetCaster());
GetHitUnit()->RemoveAurasDueToSpell(auraId);
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_putricide_clear_mutated_plague_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
{
return new spell_putricide_clear_mutated_plague_SpellScript();
}
};
// Stinky and Precious spell, it's here because its used for both (Festergut and Rotface "pets")
class spell_stinky_precious_decimate : public SpellScriptLoader
{
@@ -1478,5 +1508,6 @@ void AddSC_boss_professor_putricide()
new spell_putricide_mutated_transformation();
new spell_putricide_mutated_transformation_dmg();
new spell_putricide_regurgitated_ooze();
new spell_putricide_clear_mutated_plague();
new spell_stinky_precious_decimate();
}