Core/Spells: Allow overriding aura stack amount from CastCustomSpell

This commit is contained in:
Shauren
2011-05-21 21:36:37 +02:00
parent 1e783cc446
commit 78ea0075e1
4 changed files with 12 additions and 24 deletions
@@ -257,7 +257,7 @@ class boss_professor_putricide : public CreatureScript
// no possible aura seen in sniff adding the aurastate
summon->SetFlag(UNIT_FIELD_AURASTATE, 1 << (AURA_STATE_UNKNOWN22 - 1));
summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true);
summon->CastSpell(summon, SPELL_GASEOUS_BLOAT, false);
summon->CastCustomSpell(SPELL_GASEOUS_BLOAT, SPELLVALUE_AURA_STACK, 10, summon, false);
summon->SetReactState(REACT_PASSIVE);
return;
case NPC_VOLATILE_OOZE:
@@ -710,22 +710,6 @@ class spell_putricide_gaseous_bloat : public SpellScriptLoader
public:
spell_putricide_gaseous_bloat() : SpellScriptLoader("spell_putricide_gaseous_bloat") { }
class spell_putricide_gaseous_bloat_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_gaseous_bloat_SpellScript);
void ModAuraStack()
{
if (Aura* aur = GetHitAura())
aur->SetStackAmount(10);
}
void Register()
{
AfterHit += SpellHitFn(spell_putricide_gaseous_bloat_SpellScript::ModAuraStack);
}
};
class spell_putricide_gaseous_bloat_AuraScript : public AuraScript
{
PrepareAuraScript(spell_putricide_gaseous_bloat_AuraScript);
@@ -745,11 +729,6 @@ class spell_putricide_gaseous_bloat : public SpellScriptLoader
}
};
SpellScript* GetSpellScript() const
{
return new spell_putricide_gaseous_bloat_SpellScript();
}
AuraScript* GetAuraScript() const
{
return new spell_putricide_gaseous_bloat_AuraScript();