aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-20 14:54:50 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-20 14:56:37 +0200
commit2aef91d045f0c7f1cee88649bc4b951702dfcb16 (patch)
tree41e9a8f42ffed1a955ceda890a045688500f361f /src/server/scripts
parent6372eb1fcc8b592569c97469ffb6700985c8dec5 (diff)
Core/Spells: Fix hunter "T.N.T." and "Lock and Load" for 4.3.4
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index ca789de3142..0630491bb8c 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -40,6 +40,7 @@ enum HunterSpells
SPELL_HUNTER_CHIMERA_SHOT_SCORPID = 53359,
SPELL_HUNTER_GLYPH_OF_ASPECT_OF_THE_VIPER = 56851,
SPELL_HUNTER_INVIGORATION_TRIGGERED = 53398,
+ SPELL_HUNTER_LOCK_AND_LOAD = 56453,
SPELL_HUNTER_MASTERS_CALL_TRIGGERED = 62305,
SPELL_HUNTER_MISDIRECTION_PROC = 35079,
SPELL_HUNTER_PET_LAST_STAND_TRIGGERED = 53479,
@@ -890,6 +891,48 @@ class spell_hun_thrill_of_the_hunt : public SpellScriptLoader
}
};
+
+// -56333 - T.N.T.
+class spell_hun_tnt : public SpellScriptLoader
+{
+ public:
+ spell_hun_tnt() : SpellScriptLoader("spell_hun_tnt") { }
+
+ class spell_hun_tnt_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_hun_tnt_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_LOCK_AND_LOAD))
+ return false;
+ return true;
+ }
+
+ bool CheckProc(ProcEventInfo& /*eventInfo*/)
+ {
+ return roll_chance_i(GetEffect(EFFECT_0)->GetAmount());
+ }
+
+ void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_LOCK_AND_LOAD, true, NULL, aurEff);
+ }
+
+ void Register() OVERRIDE
+ {
+ DoCheckProc += AuraCheckProcFn(spell_hun_tnt_AuraScript::CheckProc);
+ OnEffectProc += AuraEffectProcFn(spell_hun_tnt_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_hun_tnt_AuraScript();
+ }
+};
+
void AddSC_hunter_spell_scripts()
{
new spell_hun_aspect_of_the_beast();
@@ -910,4 +953,5 @@ void AddSC_hunter_spell_scripts()
new spell_hun_tame_beast();
new spell_hun_target_only_pet_and_owner();
new spell_hun_thrill_of_the_hunt();
+ new spell_hun_tnt();
}