aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-06-28 16:55:12 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-06-28 16:55:12 +0200
commitd547cc8e3bc6e93e82d4437ba331b455bbbdae52 (patch)
tree85f0a556f873e971a688db7bdcee491f54c00d5e
parent465a1c05a9ed314544c524d84e681f2203994a73 (diff)
Core/Spells: Fix hunter talent "Thrill of the Hunt"
-rw-r--r--sql/updates/world/2013_06_28_00_world_spell_misc_434.sql11
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp40
2 files changed, 51 insertions, 0 deletions
diff --git a/sql/updates/world/2013_06_28_00_world_spell_misc_434.sql b/sql/updates/world/2013_06_28_00_world_spell_misc_434.sql
new file mode 100644
index 00000000000..3f1cac1a4ed
--- /dev/null
+++ b/sql/updates/world/2013_06_28_00_world_spell_misc_434.sql
@@ -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);
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 2965d6a7a5f..98357d82d16 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -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();
}