mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Merge pull request #8374 from Huri/4.3.4
Core/Spells: Fixed Arcane Brilliance, Dalaran Brilliance, Power Word: Fo...
This commit is contained in:
39
sql/updates/world/2012_11_20_00_world_misc.sql
Normal file
39
sql/updates/world/2012_11_20_00_world_misc.sql
Normal file
@@ -0,0 +1,39 @@
|
||||
-- Mark of the Wild
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=1126;
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=1126 OR `ScriptName`='spell_dru_mark_of_the_wild';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(1126,'spell_dru_mark_of_the_wild');
|
||||
|
||||
-- Arcane Brilliance
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=1459 OR `ScriptName`='spell_mage_arcane_brilliance';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(1459,'spell_mage_arcane_brilliance');
|
||||
|
||||
-- Dalaran Brilliance
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=61316 OR `ScriptName`='spell_mage_dalaran_brilliance';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(61316,'spell_mage_dalaran_brilliance');
|
||||
|
||||
-- Blessing of Kings
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=20217 OR `ScriptName`='spell_pal_blessing_of_kings';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(20217,'spell_pal_blessing_of_kings');
|
||||
|
||||
-- Blessing of Might
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=19740;
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=19740 OR `ScriptName`='spell_pal_blessing_of_might';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(19740,'spell_pal_blessing_of_might');
|
||||
|
||||
-- Power Word: Fortitude
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=21562;
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=21562 OR `ScriptName`='spell_pri_power_word_fortitude';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(21562,'spell_pri_power_word_fortitude');
|
||||
|
||||
-- Shadow Protection
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=27683;
|
||||
DELETE FROM `spell_scripts` WHERE `id`=27683;
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=27683 OR `ScriptName`='spell_pri_shadow_protection';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(27683,'spell_pri_shadow_protection');
|
||||
@@ -3306,6 +3306,35 @@ class spell_gen_gift_of_naaru : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_increase_stats_buff : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_increase_stats_buff(char const* scriptName) : SpellScriptLoader(scriptName) { }
|
||||
|
||||
class spell_gen_increase_stats_buff_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_increase_stats_buff_SpellScript);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitUnit()->IsInRaidWith(GetCaster()))
|
||||
GetCaster()->CastSpell(GetCaster(), GetEffectValue() + 1, true); // raid buff
|
||||
else
|
||||
GetCaster()->CastSpell(GetHitUnit(), GetEffectValue(), true); // single-target buff
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_increase_stats_buff_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_gen_increase_stats_buff_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -3382,4 +3411,11 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_upper_deck_create_foam_sword();
|
||||
new spell_gen_bonked();
|
||||
new spell_gen_gift_of_naaru();
|
||||
new spell_gen_increase_stats_buff("spell_pal_blessing_of_kings");
|
||||
new spell_gen_increase_stats_buff("spell_pal_blessing_of_might");
|
||||
new spell_gen_increase_stats_buff("spell_dru_mark_of_the_wild");
|
||||
new spell_gen_increase_stats_buff("spell_pri_power_word_fortitude");
|
||||
new spell_gen_increase_stats_buff("spell_pri_shadow_protection");
|
||||
new spell_gen_increase_stats_buff("spell_mage_arcane_brilliance");
|
||||
new spell_gen_increase_stats_buff("spell_mage_dalaran_brilliance");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user