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

@@ -0,0 +1,11 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (34497,34498,34499);
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
(34497, 'spell_hun_thrill_of_the_hunt'),
(34498, 'spell_hun_thrill_of_the_hunt'),
(34499, 'spell_hun_thrill_of_the_hunt');
DELETE FROM `spell_proc_event` WHERE `entry` IN (34497,34498,34499);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(34497, 0, 9, 0x880, 0x88000000, 0, 0, 0, 0, 0, 0),
(34498, 0, 9, 0x880, 0x88000000, 0, 0, 0, 0, 0, 0),
(34499, 0, 9, 0x880, 0x88000000, 0, 0, 0, 0, 0, 0);

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