Core/Spells: Fix shaman talent "Feedback"

Note: For Chain Lightning need more fix
This commit is contained in:
Vincent-Michael
2013-06-16 22:57:09 +02:00
parent d2e1b7421a
commit b21749a68c
2 changed files with 50 additions and 0 deletions

View 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);

View File

@@ -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();