mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Spells: Fix shaman talent "Feedback"
Note: For Chain Lightning need more fix
This commit is contained in:
11
sql/updates/world/2013_06_16_00_world_spell_misc_434.sql
Normal file
11
sql/updates/world/2013_06_16_00_world_spell_misc_434.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (86183,86184,86185);
|
||||
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
|
||||
(86183, 'spell_sha_feedback'),
|
||||
(86184, 'spell_sha_feedback'),
|
||||
(86185, 'spell_sha_feedback');
|
||||
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (86183,86184,86185);
|
||||
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
|
||||
(86183, 0, 11, 0x3, 0, 0, 0, 0, 0, 0, 0),
|
||||
(86184, 0, 11, 0x3, 0, 0, 0, 0, 0, 0, 0),
|
||||
(86185, 0, 11, 0x3, 0, 0, 0, 0, 0, 0, 0);
|
||||
@@ -35,6 +35,7 @@ enum ShamanSpells
|
||||
SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC = 52752,
|
||||
SPELL_SHAMAN_BIND_SIGHT = 6277,
|
||||
SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379,
|
||||
SPELL_SHAMAN_ELEMENTAL_MASTERY = 16166,
|
||||
SPELL_SHAMAN_EXHAUSTION = 57723,
|
||||
SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349,
|
||||
SPELL_SHAMAN_FLAME_SHOCK = 8050,
|
||||
@@ -362,6 +363,43 @@ class spell_sha_earthen_power : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 86185 Feedback
|
||||
class spell_sha_feedback : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_sha_feedback() : SpellScriptLoader("spell_sha_feedback") { }
|
||||
|
||||
class spell_sha_feedback_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_sha_feedback_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ELEMENTAL_MASTERY))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction(); // will prevent default effect execution
|
||||
if (Player* target = GetTarget()->ToPlayer())
|
||||
target->ModifySpellCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, aurEff->GetBaseAmount());
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_sha_feedback_AuraScript::DoCheck);
|
||||
OnEffectProc += AuraEffectProcFn(spell_sha_feedback_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_sha_feedback_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 1535 Fire Nova
|
||||
/// Updated 4.3.4
|
||||
class spell_sha_fire_nova : public SpellScriptLoader
|
||||
@@ -729,6 +767,7 @@ void AddSC_shaman_spell_scripts()
|
||||
new spell_sha_earth_shield();
|
||||
new spell_sha_earthbind_totem();
|
||||
new spell_sha_earthen_power();
|
||||
new spell_sha_feedback();
|
||||
new spell_sha_fire_nova();
|
||||
new spell_sha_flame_shock();
|
||||
new spell_sha_healing_stream_totem();
|
||||
|
||||
Reference in New Issue
Block a user