Core/Scripts: implemented Combined Toxins proc only from poisons

This commit is contained in:
ariel-
2018-02-11 21:10:56 -03:00
committed by Aokromes
parent d5a77f6b79
commit e6888f72e0
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_combined_toxins';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(56584, 'spell_combined_toxins');

View File

@@ -280,7 +280,26 @@ class instance_ahnkahet : public InstanceMapScript
}
};
// 56584 - Combined Toxins
class spell_combined_toxins : public AuraScript
{
PrepareAuraScript(spell_combined_toxins);
bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
// only procs on poisons (damage class check to exclude stuff like Envenom)
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
return (spellInfo && spellInfo->Dispel == DISPEL_POISON && spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE);
}
void Register() override
{
DoCheckEffectProc += AuraCheckEffectProcFn(spell_combined_toxins::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_DAMAGE);
}
};
void AddSC_instance_ahnkahet()
{
new instance_ahnkahet();
RegisterAuraScript(spell_combined_toxins);
}