Scripts/Spells: Brittle Armor & Mercurial Shield

Port From (https://github.com/TrinityCore/TrinityCore/commit/a947a0e85e301748d32140d76d0a25a1e5997406)
This commit is contained in:
hondacrx
2021-12-27 16:47:12 -05:00
parent 30d198cfbd
commit df4c537943
3 changed files with 48 additions and 8 deletions
-8
View File
@@ -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:
+44
View File
@@ -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
@@ -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');