diff --git a/sql/mangos.sql b/sql/mangos.sql index b2f26f539..682539521 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, - `required_7168_01_mangos_command` bit(1) default NULL + `required_7175_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -17106,6 +17106,9 @@ INSERT INTO `spell_proc_event` VALUES (55680, 0x00000000, 6, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (55689, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (56218, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(56333, 0x00000000, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(56336, 0x00000000, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(56337, 0x00000000, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56342, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56343, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56344, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), diff --git a/sql/updates/7175_01_mangos_spell_proc_event.sql b/sql/updates/7175_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..57e02defe --- /dev/null +++ b/sql/updates/7175_01_mangos_spell_proc_event.sql @@ -0,0 +1,13 @@ +ALTER TABLE db_version CHANGE COLUMN required_7168_01_mangos_command required_7175_01_mangos_spell_proc_event bit; + +-- (56333) T.N.T. (Rank 1) +DELETE FROM `spell_proc_event` WHERE `entry` IN (56333); +INSERT INTO `spell_proc_event` VALUES (56333, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); + +-- (56336) T.N.T. (Rank 2) +DELETE FROM `spell_proc_event` WHERE `entry` IN (56336); +INSERT INTO `spell_proc_event` VALUES (56336, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); + +-- (56337) T.N.T. (Rank 3) +DELETE FROM `spell_proc_event` WHERE `entry` IN (56337); +INSERT INTO `spell_proc_event` VALUES (56337, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); \ No newline at end of file diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 4819d0cf9..8b81f825a 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -151,6 +151,7 @@ pkgdata_DATA = \ 7150_01_mangos_playercreateinfo_spell.sql \ 7156_01_mangos_spell_proc_event.sql \ 7168_01_mangos_command.sql \ + 7175_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -282,4 +283,5 @@ EXTRA_DIST = \ 7150_01_mangos_playercreateinfo_spell.sql \ 7156_01_mangos_spell_proc_event.sql \ 7168_01_mangos_command.sql \ + 7175_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 657d75ac0..4cd470d1c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -760,7 +760,7 @@ void Spell::prepareDataForTriggerSystem() } // 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 & 0x0000200000000014LL) + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags & 0x000020000000001CLL) m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION; } diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 4b316e5cb..e7253a7cc 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -888,7 +888,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP return false; // Always trigger for this - if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL)) + if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL | PROC_FLAG_ON_TRAP_ACTIVATION)) return true; if (spellProcEvent) // Exist event data diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d374dc06c..b64828e75 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5278,7 +5278,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu return false; // mana cost save - basepoints0 = procSpell->manaCost * 40/100; + int32 mana = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100; + basepoints0 = mana * 40/100; if(basepoints0 <= 0) return false; @@ -5297,9 +5298,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu if ( dummySpell->SpellIconID == 3579 ) { // Proc only from periodic (from trap activation proc another aura of this spell) - if (!(procFlag & PROC_FLAG_ON_DO_PERIODIC)) - return false; - if (!roll_chance_i(triggeredByAura->GetModifier()->m_amount)) + if (!(procFlag & PROC_FLAG_ON_DO_PERIODIC) || !roll_chance_i(triggerAmount)) return false; triggered_spell_id = 56453; target = this; @@ -6615,6 +6614,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB return false; break; } + // 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)) + return false; + break; + } } if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id)) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 18686ea5d..3184a7a35 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7174" + #define REVISION_NR "7175" #endif // __REVISION_NR_H__