aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_07_20_02_world_spell_script_misc_434.sql17
-rw-r--r--src/server/game/Spells/Spell.cpp3
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp44
3 files changed, 63 insertions, 1 deletions
diff --git a/sql/updates/world/2013_07_20_02_world_spell_script_misc_434.sql b/sql/updates/world/2013_07_20_02_world_spell_script_misc_434.sql
new file mode 100644
index 00000000000..b8a515f4d21
--- /dev/null
+++ b/sql/updates/world/2013_07_20_02_world_spell_script_misc_434.sql
@@ -0,0 +1,17 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (56342, 56343, 56333, 56336);
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+-- Lock and Load
+(56342, 0, 9, 0x18, 0, 0, 0x200000, 0, 0, 0, 0),
+(56343, 0, 9, 0x18, 0, 0, 0x200000, 0, 0, 0, 0),
+-- T.N.T.
+(56333, 0, 9, 0x84, 0x8000000, 0x24000, 0x240000, 0, 0, 100, 0),
+(56336, 0, 9, 0x84, 0x8000000, 0x24000, 0x240000, 0, 0, 100, 0);
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (-56333);
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(-56333,'spell_hun_tnt');
+
+DELETE FROM `spell_ranks` WHERE `first_spell_id`=56333;
+INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
+(56333, 56333, 1),
+(56333, 56336, 2);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 4bb8e5b4bd2..0be1c5df308 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2075,8 +2075,9 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
(m_spellInfo->SpellFamilyFlags[0] & 0x18 || // Freezing and Frost Trap, Freezing Arrow
m_spellInfo->Id == 57879 || // Snake Trap - done this way to avoid double proc
m_spellInfo->SpellFamilyFlags[2] & 0x00024000)) // Explosive and Immolation Trap
-
+ {
m_procAttacker |= PROC_FLAG_DONE_TRAP_ACTIVATION;
+ }
/* Effects which are result of aura proc from triggered spell cannot proc
to prevent chain proc of these spells */
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();
}