Core/Spells: Fixed Dragon's Breath with Living Bomb explosion (#20622)

Close: #19949
This commit is contained in:
Keader
2017-10-16 23:36:40 -02:00
committed by GitHub
parent 5a90251ea2
commit 4eababa9f0
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `scriptname`='spell_mage_dragon_breath';
INSERT INTO `spell_script_names` (`spell_id`,`scriptname`) VALUES
(-31661,'spell_mage_dragon_breath');

View File

@@ -74,7 +74,8 @@ enum MageSpellIcons
{
SPELL_ICON_MAGE_SHATTERED_BARRIER = 2945,
SPELL_ICON_MAGE_PRESENCE_OF_MIND = 139,
SPELL_ICON_MAGE_CLEARCASTING = 212
SPELL_ICON_MAGE_CLEARCASTING = 212,
SPELL_ICON_MAGE_LIVING_BOMB = 3000
};
// Incanter's Absorbtion
@@ -408,6 +409,26 @@ class spell_mage_combustion_proc : public SpellScriptLoader
}
};
// -31661 - Dragon's Breath
class spell_mage_dragon_breath : public AuraScript
{
PrepareAuraScript(spell_mage_dragon_breath);
bool CheckProc(ProcEventInfo& eventInfo)
{
// Dont proc with Living Bomb explosion
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (spellInfo && spellInfo->SpellIconID == SPELL_ICON_MAGE_LIVING_BOMB && spellInfo->SpellFamilyName == SPELLFAMILY_MAGE)
return false;
return true;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_mage_dragon_breath::CheckProc);
}
};
// -11185 - Improved Blizzard
class spell_mage_imp_blizzard : public SpellScriptLoader
{
@@ -1295,6 +1316,7 @@ void AddSC_mage_spell_scripts()
new spell_mage_cold_snap();
new spell_mage_combustion();
new spell_mage_combustion_proc();
RegisterAuraScript(spell_mage_dragon_breath);
new spell_mage_imp_blizzard();
new spell_mage_imp_mana_gems();
new spell_mage_empowered_fire();