diff options
author | QAston <none@none> | 2009-07-09 23:49:46 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-09 23:49:46 +0200 |
commit | 107e7eafbdf3ae836442d1087d453aa16cccf968 (patch) | |
tree | 170dee7f9b13797d0bf19beb6e6993d55c159ec0 | |
parent | 490494ab074f328c8a231aec38177dfe2fbb9538 (diff) |
*Add new procExFlag: PROC_EX_ONLY_ACTIVE_SPELL - which allows only damaging/healing spells to proc - this fixes double proc of judgement auras in some cases.
--HG--
branch : trunk
-rw-r--r-- | sql/FULL/world_spell_full.sql | 36 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 16 | ||||
-rw-r--r-- | src/game/SpellMgr.h | 11 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
4 files changed, 37 insertions, 28 deletions
diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 9c989eaf16e..9d6ee9c6f82 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -864,9 +864,9 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 31836, 0x00, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Light's Grace (Rank 3) ( 31871, 0x00, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Divine Purpose (Rank 1) ( 31872, 0x00, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Divine Purpose (Rank 2) -( 31876, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Wise (Rank 1) -( 31877, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Wise (Rank 2) -( 31878, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Wise (Rank 3) +( 31876, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Wise (Rank 1) +( 31877, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Wise (Rank 2) +( 31878, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Wise (Rank 3) ( 31904, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0, 0, 0), -- Holy Shield ( 32385, 0x00, 5, 0x00000001, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Shadow Embrace (Rank 1) ( 32387, 0x00, 5, 0x00000001, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Shadow Embrace (Rank 2) @@ -916,8 +916,8 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 34080, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0, 0, 0), -- Riposte Stance ( 34138, 0x00, 11, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Totem of the Third Wind ( 34139, 0x00, 10, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Libram of Justice -( 34258, 0x00, 10, 0x00000400, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Justice -( 34262, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Mercy +( 34258, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Justice +( 34262, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Mercy ( 34320, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Call of the Nexus ( 34355, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 3), -- Poison Shield ( 34457, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Ferocious Inspiration (Rank 1) @@ -965,7 +965,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 37173, 0x00, 8, 0x2CBC0598, 0x00000106, 0x00000000, 0x00000000, 0x00000000, 0, 0, 30), -- Armor Penetration ( 37189, 0x00, 10, 0xC0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 60), -- Recuced Holy Light Cast Time ( 37193, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0, 0, 0), -- Infused Shield -( 37195, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgement Group Heal +( 37195, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgement Group Heal ( 37197, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 45), -- Spell Damage ( 37213, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Mana Cost Reduction ( 37214, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Energized @@ -1013,7 +1013,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 40444, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0, 0, 0), -- Black Temple Tank Trinket ( 40458, 0x00, 4, 0x02000000, 0x00000601, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Warrior Tier 6 Trinket ( 40463, 0x00, 11, 0x00000081, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Shaman Tier 6 Trinket -( 40470, 0x00, 10, 0xC0800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Paladin Tier 6 Trinket +( 40470, 0x00, 10, 0xC0800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Paladin Tier 6 Trinket ( 40475, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 3, 0, 0), -- Black Temple Melee Trinket ( 40478, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Warlock Tier 6 Trinket ( 40482, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Mage Tier 6 Trinket @@ -1150,7 +1150,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 48521, 0x00, 7, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 30), -- Eclipse (Rank 2) ( 48525, 0x00, 7, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 30), -- Eclipse (Rank 3) ( 48833, 0x00, 7, 0x00000000, 0x00000440, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Primal Instinct -( 48835, 0x00, 10, 0x00000000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Justice +( 48835, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Justice ( 48837, 0x00, 11, 0x90100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Elemental Tenacity ( 48951, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0, 0, 0), -- Holy Shield (Rank 5) ( 48952, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0, 0, 0), -- Holy Shield (Rank 6) @@ -1266,12 +1266,12 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 53292, 0x00, 9, 0x00000800, 0x7FFFFFFF, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Hunting Party (Rank 3) ( 53375, 0x00, 10, 0x00000000, 0x00002000, 0x00000000, 0x00000400, 0x00000000, 0, 0, 6), -- Sanctified Wrath (Rank 1) ( 53376, 0x00, 10, 0x00000000, 0x00002000, 0x00000000, 0x00000400, 0x00000000, 0, 0, 6), -- Sanctified Wrath (Rank 2) -( 53380, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Righteous Vengeance (Rank 1) -( 53381, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Righteous Vengeance (Rank 2) -( 53382, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Righteous Vengeance (Rank 3) +( 53380, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- Righteous Vengeance (Rank 1) +( 53381, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- Righteous Vengeance (Rank 2) +( 53382, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- Righteous Vengeance (Rank 3) ( 53397, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Invigoration (Rank 1) -( 53486, 0x00, 10, 0x00800000, 0x00028000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- The Art of War (Rank 1) -( 53488, 0x00, 10, 0x00800000, 0x00028000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- The Art of War (Rank 2) +( 53486, 0x00, 10, 0x00800000, 0x00028000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- The Art of War (Rank 1) +( 53488, 0x00, 10, 0x00800000, 0x00028000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- The Art of War (Rank 2) ( 53501, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Sheath of Light (Rank 1) ( 53502, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Sheath of Light (Rank 2) ( 53503, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Sheath of Light (Rank 3) @@ -1282,18 +1282,18 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 53576, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light (Rank 2) ( 53601, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 6), -- Sacred Shield (Rank 1) ( 53646, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Demonic Pact (Rank 1) -( 53671, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Pure (Rank 1) +( 53671, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 1) ( 53672, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light -( 53673, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Pure (Rank 2) +( 53673, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 2) ( 53709, 0x02, 10, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Shield of the templar ( 53710, 0x02, 10, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Shield of the templar ( 53711, 0x02, 10, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Shield of the templar ( 53754, 0x00, 5, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0x00006000, 0, 0, 0), -- Improved Fear (Rank 1) ( 53759, 0x00, 5, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0x00006000, 0, 0, 0), -- Improved Fear (Rank 2) ( 54149, 0x00, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Infusion of Light (Rank 2) -( 54151, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Pure (Rank 3) -( 54154, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Pure (Rank 4) -( 54155, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Judgements of the Pure (Rank 5) +( 54151, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 3) +( 54154, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 4) +( 54155, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Pure (Rank 5) ( 54278, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Empowered Imp ( 54486, 0x00, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Missile Barrage (Rank 2) ( 54488, 0x00, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Missile Barrage (Rank 3) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 4ec9ff516d1..b6bbf322b95 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1356,7 +1356,9 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0) return false; hasFamilyMask = true; - active = true; + // Some spells are not considered as active even with have spellfamilyflags + if (!(procEvent_procEx & PROC_EX_ONLY_ACTIVE_SPELL)) + active = true; } } } @@ -1378,16 +1380,22 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr { if (procExtra & AURA_SPELL_PROC_EX_MASK) { + // if spell marked as procing only from not active spells + if (active && procEvent_procEx & PROC_EX_NOT_ACTIVE_SPELL) + return false; + // if spell marked as procing only from active spells + if (!active && procEvent_procEx & PROC_EX_ONLY_ACTIVE_SPELL) + return false; // Exist req for PROC_EX_EX_TRIGGER_ALWAYS if (procEvent_procEx & PROC_EX_EX_TRIGGER_ALWAYS) return true; // Check Extra Requirement like (hit/crit/miss/resist/parry/dodge/block/immune/reflect/absorb and other) if (procEvent_procEx & procExtra) return true; + // PROC_EX_NOT_ACTIVE_SPELL and PROC_EX_ONLY_ACTIVE_SPELL flags handle: if passed checks before + if ((procExtra & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) && ((procEvent_procEx & (AURA_SPELL_PROC_EX_MASK | AURA_REMOVE_PROC_EX_MASK)) == 0)) + return true; } - // if spell marked as procing from not active spells it can proc from normal or critical hit - if (procEvent_procEx & PROC_EX_NOT_ACTIVE_SPELL && (procExtra & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT))) - return true; } return false; } diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index f61a503fcba..19ec48bea68 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -454,11 +454,12 @@ enum ProcFlagsEx PROC_EX_ABSORB = 0x0000400, PROC_EX_REFLECT = 0x0000800, PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used) - PROC_EX_AURA_REMOVE_DESTROY = 0x0002000, // aura absorb destroy or dispel - PROC_EX_AURA_REMOVE_EXPIRE = 0x0004000, // aura remove by default and by cancel - PROC_EX_NOT_ACTIVE_SPELL = 0x0008000, // to mark spells which can proc without damage, but not specified with spellfamilyflags - PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges - PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000, // If set trigger always but only one time (not used) + PROC_EX_AURA_REMOVE_DESTROY = 0x0002000, // Aura absorb destroy or dispel + PROC_EX_AURA_REMOVE_EXPIRE = 0x0004000, // Aura remove by default and by cancel + PROC_EX_NOT_ACTIVE_SPELL = 0x0008000, // Spell mustn't do damage/heal to proc + PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always no matter of hit result + PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000, // If set trigger always but only one time (not implemented yet) + PROC_EX_ONLY_ACTIVE_SPELL = 0x0040000, // Spell has to do damage/heal to proc // Flags for internal use - do not use these in db! PROC_EX_INTERNAL_CANT_PROC = 0x0800000, diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0ba74f3b5e3..e3c7eae83d9 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14137,7 +14137,7 @@ void Unit::RemoveCharmedBy(Unit *charmer) if(!charmer) charmer = GetCharmer(); - else if(charmer != GetCharmer()) // one aura overrides another? + if(charmer != GetCharmer()) // one aura overrides another? { // sLog.outCrash("Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD, // GetGUID(), GetCharmerGUID(), charmer->GetGUID()); |