aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/7217_world_spell_proc_event.sql15
-rw-r--r--sql/world.sql12
-rw-r--r--src/game/Spell.cpp15
-rw-r--r--src/game/Unit.cpp4
4 files changed, 30 insertions, 16 deletions
diff --git a/sql/updates/7217_world_spell_proc_event.sql b/sql/updates/7217_world_spell_proc_event.sql
new file mode 100644
index 00000000000..c189d5a6297
--- /dev/null
+++ b/sql/updates/7217_world_spell_proc_event.sql
@@ -0,0 +1,15 @@
+-- Entrapment
+DELETE FROM `spell_proc_event` WHERE `entry` IN (19387,19388,19184);
+INSERT INTO `spell_proc_event`
+(`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+(19184,0x00,9,0x00000010,0x00002000,0x00000000,0x00000000,0x00000000,0,0,0),
+(19387,0x00,9,0x00000010,0x00002000,0x00000000,0x00000000,0x00000000,0,0,0),
+(19388,0x00,9,0x00000010,0x00002000,0x00000000,0x00000000,0x00000000,0,0,0);
+
+-- Lock and Load
+DELETE FROM `spell_proc_event` WHERE `entry` IN (56342,56343,56344);
+INSERT INTO `spell_proc_event`
+(`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+(56342,0x00,9,0x00000018,0x08000000,0x00024000,0x00000000,0x00000000,0,0,0),
+(56343,0x00,9,0x00000018,0x08000000,0x00024000,0x00000000,0x00000000,0,0,0),
+(56344,0x00,9,0x00000018,0x08000000,0x00024000,0x00000000,0x00000000,0,0,0);
diff --git a/sql/world.sql b/sql/world.sql
index 71f18933256..097291a5487 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -5787,9 +5787,9 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam
( 18094, 0x00, 5, 0x0000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Nightfall (Rank 1)
( 18095, 0x00, 5, 0x0000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Nightfall (Rank 2)
( 18820, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Insight
-( 19184, 0x00, 9, 0x00000014, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Entrapment (Rank 1)
-( 19387, 0x00, 9, 0x00000014, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Entrapment (Rank 2)
-( 19388, 0x00, 9, 0x00000014, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Entrapment (Rank 3)
+( 19184, 0x00, 9, 0x00000010, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Entrapment (Rank 1)
+( 19387, 0x00, 9, 0x00000010, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Entrapment (Rank 2)
+( 19388, 0x00, 9, 0x00000010, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Entrapment (Rank 3)
( 19572, 0x00, 9, 0x00800000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Improved Mend Pet (Rank 1)
( 19573, 0x00, 9, 0x00800000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Improved Mend Pet (Rank 2)
( 20049, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Vengeance (Rank 1)
@@ -6593,9 +6593,9 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam
( 49137, 0x00, 15, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Endless Winter
( 49657, 0x00, 15, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Endless Winter
( 58620, 0x00, 15, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Glyph of Chains of Ice
-( 56342, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
-( 56343, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
-( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
+( 56342, 0x00, 9, 0x00000018, 0x08000000, 0x00024000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
+( 56343, 0x00, 9, 0x00000018, 0x08000000, 0x00024000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
+( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00024000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
( 48539, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
( 48544, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
( 48545, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 3e7b2519224..add99c25795 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -814,15 +814,14 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const * triggeredByAura)
}
m_procEx= PROC_EX_NONE;
- // Hunter traps spells (for Entrapment trigger)
- // Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap ....
- if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (m_spellInfo->SpellFamilyFlags[1] & 0x00002000 || m_spellInfo->SpellFamilyFlags[0] & 0x1C))
- {
+ // Hunter trap spells - activation proc for Lock and Load, Entrapment and Misdirection
+ if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
+ (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_ON_TRAP_ACTIVATION;
- // Trigger only from spells originally casted by hunter(trap activation) to prevent multiple trigger from trap triggered spells
- if (m_originalCasterGUID != m_caster->GetGUID() && m_originalCasterGUID)
- return;
- }
+
/*
Effects which are result of aura proc from triggered spell cannot proc
to prevent chain proc of these spells
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 1c9afc1538a..d9c1179823c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8377,8 +8377,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
// Lock and Load
case 56453:
{
- // Proc only from trap activation (from periodic proc another aura of this spell)
- if (!(procFlags & PROC_FLAG_ON_TRAP_ACTIVATION) || !roll_chance_i(triggerAmount))
+ // Proc only from Frost/Freezing trap activation or from Freezing Arrow (the periodic dmg proc handled elsewhere)
+ if (!(procFlags & PROC_FLAG_ON_TRAP_ACTIVATION) || !procSpell || !(procSpell->SchoolMask & SPELL_SCHOOL_MASK_FROST) || !roll_chance_i(triggerAmount))
return false;
break;
}