diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellMgr.cpp | 16 | ||||
-rw-r--r-- | src/game/SpellMgr.h | 11 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
3 files changed, 19 insertions, 10 deletions
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()); |