Core/Spells: Fix hunter talent "Thrill of the Hunt"

This commit is contained in:
Vincent-Michael
2013-06-28 16:55:12 +02:00
parent 465a1c05a9
commit d547cc8e3b
2 changed files with 51 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ enum HunterSpells
SPELL_HUNTER_READINESS = 23989,
SPELL_HUNTER_SNIPER_TRAINING_R1 = 53302,
SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 = 64418,
SPELL_HUNTER_THRILL_OF_THE_HUNT = 34720,
SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543,
};
@@ -802,6 +803,44 @@ class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
}
};
// 34497 - Thrill of the Hunt
class spell_hun_thrill_of_the_hunt : public SpellScriptLoader
{
public:
spell_hun_thrill_of_the_hunt() : SpellScriptLoader("spell_hun_thrill_of_the_hunt") { }
class spell_hun_thrill_of_the_hunt_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_thrill_of_the_hunt_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_THRILL_OF_THE_HUNT))
return false;
return true;
}
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
int32 focus = eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), SpellSchoolMask(eventInfo.GetDamageInfo()->GetSchoolMask()));
focus = CalculatePct(focus, aurEff->GetAmount());
GetTarget()->CastCustomSpell(GetTarget(), SPELL_HUNTER_THRILL_OF_THE_HUNT, &focus, NULL, NULL, true, NULL, aurEff);
}
void Register()
{
OnEffectProc += AuraEffectProcFn(spell_hun_thrill_of_the_hunt_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const
{
return new spell_hun_thrill_of_the_hunt_AuraScript();
}
};
void AddSC_hunter_spell_scripts()
{
new spell_hun_aspect_of_the_beast();
@@ -820,4 +859,5 @@ void AddSC_hunter_spell_scripts()
new spell_hun_sniper_training();
new spell_hun_tame_beast();
new spell_hun_target_only_pet_and_owner();
new spell_hun_thrill_of_the_hunt();
}