diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 9333e840b..e5d5e3744 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -2685,14 +2685,6 @@ namespace Game.Spells case 45204: // Clone Me! m_caster.CastSpell(unitTarget, (uint)damage, new CastSpellExtraArgs(true)); break; - // Brittle Armor - need remove one 24575 Brittle Armor aura - case 24590: - unitTarget.RemoveAuraFromStack(24575); - return; - // Mercurial Shield - need remove one 26464 Mercurial Shield aura - case 26465: - unitTarget.RemoveAuraFromStack(26464); - return; // Shadow Flame (All script effects, not just end ones to prevent player from dodging the last triggered spell) case 22539: case 22972: diff --git a/Source/Scripts/Spells/Items.cs b/Source/Scripts/Spells/Items.cs index 8316b274d..29226ebfd 100644 --- a/Source/Scripts/Spells/Items.cs +++ b/Source/Scripts/Spells/Items.cs @@ -59,6 +59,9 @@ namespace Scripts.Spells.Items public const uint DementiaPos = 41406; public const uint DementiaNeg = 41409; + // BrittleArmor + public const uint BrittleArmor = 24575; + //Blessingofancientkings public const uint ProtectionOfAncientKings = 64413; @@ -135,6 +138,9 @@ namespace Scripts.Spells.Items //Markofconquest public const uint MarkOfConquestEnergize = 39599; + // MercurialShield + public const uint MercurialShield = 26464; + //Necrotictouch public const uint ItemNecroticTouchProc = 71879; @@ -769,6 +775,25 @@ namespace Scripts.Spells.Items } } + [Script]// 24590 - Brittle Armor + class spell_item_brittle_armor : SpellScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.BrittleArmor); + } + + void HandleScript(uint effIndex) + { + GetHitUnit().RemoveAuraFromStack(SpellIds.BrittleArmor); + } + + public override void Register() + { + OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect)); + } + } + [Script] // 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings) class spell_item_blessing_of_ancient_kings : AuraScript { @@ -1436,6 +1461,25 @@ namespace Scripts.Spells.Items } } + [Script]// 26465 - Mercurial Shield + class spell_item_mercurial_shield : SpellScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.MercurialShield); + } + + void HandleScript(uint effIndex) + { + GetHitUnit().RemoveAuraFromStack(SpellIds.MercurialShield); + } + + public override void Register() + { + OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect)); + } + } + // http://www.wowhead.com/item=32686 Mingo's Fortune Giblets [Script] // 40802 Mingo's Fortune Generator class spell_item_mingos_fortune_generator : SpellScript diff --git a/sql/updates/world/master/2021_12_14_08_world_2019_07_08_00_world.sql b/sql/updates/world/master/2021_12_14_08_world_2019_07_08_00_world.sql new file mode 100644 index 000000000..e1df8449b --- /dev/null +++ b/sql/updates/world/master/2021_12_14_08_world_2019_07_08_00_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_item_brittle_armor','spell_item_mercurial_shield'); +INSERT INTO `spell_script_names` VALUES +(24590,'spell_item_brittle_armor'), +(26465,'spell_item_mercurial_shield');