mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 21:45:12 +00:00
feat(Scripts/Spells): Move to spell scripts - Brittle Armor & Mercurial Shield (#11116)
* . * Update SpellEffects.cpp
This commit is contained in:
committed by
GitHub
parent
bd248a82d0
commit
b680ea3dae
@@ -0,0 +1,6 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648012632855324300');
|
||||||
|
|
||||||
|
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');
|
||||||
@@ -3782,14 +3782,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
|||||||
{
|
{
|
||||||
switch (m_spellInfo->Id)
|
switch (m_spellInfo->Id)
|
||||||
{
|
{
|
||||||
// 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)
|
// Shadow Flame (All script effects, not just end ones to prevent player from dodging the last triggered spell)
|
||||||
case 22539:
|
case 22539:
|
||||||
case 22972:
|
case 22972:
|
||||||
|
|||||||
@@ -1369,6 +1369,27 @@ class spell_item_valanyr_hammer_of_ancient_kings : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 24590 - Brittle Armor
|
||||||
|
enum BrittleArmor
|
||||||
|
{
|
||||||
|
SPELL_BRITTLE_ARMOR = 24575
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_item_brittle_armor : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_item_brittle_armor);
|
||||||
|
|
||||||
|
void HandleScript(SpellEffIndex /* effIndex */)
|
||||||
|
{
|
||||||
|
GetHitUnit()->RemoveAuraFromStack(SPELL_BRITTLE_ARMOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_item_brittle_armor::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
|
// 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
|
||||||
enum BlessingOfAncientKings
|
enum BlessingOfAncientKings
|
||||||
{
|
{
|
||||||
@@ -1811,6 +1832,27 @@ std::array<uint32, 20> const CreateFortuneSpells =
|
|||||||
SPELL_CREATE_FORTUNE_16, SPELL_CREATE_FORTUNE_17, SPELL_CREATE_FORTUNE_18, SPELL_CREATE_FORTUNE_19, SPELL_CREATE_FORTUNE_20
|
SPELL_CREATE_FORTUNE_16, SPELL_CREATE_FORTUNE_17, SPELL_CREATE_FORTUNE_18, SPELL_CREATE_FORTUNE_19, SPELL_CREATE_FORTUNE_20
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 26465 - Mercurial Shield
|
||||||
|
enum MercurialShield
|
||||||
|
{
|
||||||
|
SPELL_MERCURIAL_SHIELD = 26464
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_item_mercurial_shield : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_item_mercurial_shield);
|
||||||
|
|
||||||
|
void HandleScript(SpellEffIndex /* effIndex */)
|
||||||
|
{
|
||||||
|
GetHitUnit()->RemoveAuraFromStack(SPELL_MERCURIAL_SHIELD);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_item_mercurial_shield::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// http://www.wowhead.com/item=32686 Mingo's Fortune Giblets
|
// http://www.wowhead.com/item=32686 Mingo's Fortune Giblets
|
||||||
// 40802 Mingo's Fortune Generator
|
// 40802 Mingo's Fortune Generator
|
||||||
class spell_item_mingos_fortune_generator : public SpellScript
|
class spell_item_mingos_fortune_generator : public SpellScript
|
||||||
@@ -3642,6 +3684,7 @@ void AddSC_item_spell_scripts()
|
|||||||
RegisterSpellScriptWithArgs(spell_item_trigger_spell, "spell_item_mithril_mechanical_dragonling", SPELL_MITHRIL_MECHANICAL_DRAGONLING);
|
RegisterSpellScriptWithArgs(spell_item_trigger_spell, "spell_item_mithril_mechanical_dragonling", SPELL_MITHRIL_MECHANICAL_DRAGONLING);
|
||||||
RegisterSpellScript(spell_item_aegis_of_preservation);
|
RegisterSpellScript(spell_item_aegis_of_preservation);
|
||||||
RegisterSpellScript(spell_item_arcane_shroud);
|
RegisterSpellScript(spell_item_arcane_shroud);
|
||||||
|
RegisterSpellScript(spell_item_brittle_armor);
|
||||||
RegisterSpellScript(spell_item_blessing_of_ancient_kings);
|
RegisterSpellScript(spell_item_blessing_of_ancient_kings);
|
||||||
RegisterSpellScript(spell_item_valanyr_hammer_of_ancient_kings);
|
RegisterSpellScript(spell_item_valanyr_hammer_of_ancient_kings);
|
||||||
RegisterSpellScriptWithArgs(spell_item_defibrillate, "spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
|
RegisterSpellScriptWithArgs(spell_item_defibrillate, "spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
|
||||||
@@ -3655,6 +3698,7 @@ void AddSC_item_spell_scripts()
|
|||||||
RegisterSpellScript(spell_item_flask_of_the_north);
|
RegisterSpellScript(spell_item_flask_of_the_north);
|
||||||
RegisterSpellScript(spell_item_gnomish_death_ray);
|
RegisterSpellScript(spell_item_gnomish_death_ray);
|
||||||
RegisterSpellScript(spell_item_make_a_wish);
|
RegisterSpellScript(spell_item_make_a_wish);
|
||||||
|
RegisterSpellScript(spell_item_mercurial_shield);
|
||||||
RegisterSpellScript(spell_item_mingos_fortune_generator);
|
RegisterSpellScript(spell_item_mingos_fortune_generator);
|
||||||
RegisterSpellScript(spell_item_necrotic_touch);
|
RegisterSpellScript(spell_item_necrotic_touch);
|
||||||
RegisterSpellScript(spell_item_net_o_matic);
|
RegisterSpellScript(spell_item_net_o_matic);
|
||||||
|
|||||||
Reference in New Issue
Block a user