diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 12fa9e4f5..5a8b6fd15 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6748,8 +6748,6 @@ void Aura::PeriodicTick() DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health (absorbed %u) inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, absorbHeal, GetId()); - - int32 gain = target->ModifyHealth(pdamage); SpellPeriodicAuraLogInfo pInfo(this, pdamage, (pdamage - uint32(gain)), absorbHeal, 0, 0.0f, isCrit); target->SendPeriodicAuraLog(&pInfo); @@ -6757,7 +6755,8 @@ void Aura::PeriodicTick() // Set trigger flag uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC; uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC; - pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, gain, BASE_ATTACK, spellProto); + uint32 procEx = PROC_EX_NORMAL_HIT | PROC_EX_PERIODIC_POSITIVE; + pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, procEx, gain, BASE_ATTACK, spellProto); // add HoTs to amount healed in bgs if( pCaster->GetTypeId() == TYPEID_PLAYER ) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 4f8441a33..970fe5ba0 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1527,6 +1527,10 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP // Check for extra req (if none) and hit/crit if (procEvent_procEx == PROC_EX_NONE) { + // Don't allow proc from periodic heal if no extra requirement is defined + if (EventProcFlag & (PROC_FLAG_ON_DO_PERIODIC | PROC_FLAG_ON_TAKE_PERIODIC) && (procExtra & PROC_EX_PERIODIC_POSITIVE)) + return false; + // No extra req, so can trigger for (damage/healing present) and hit/crit if(procExtra & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) return true; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index d58acd6ee..cae2fbcd8 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -549,8 +549,8 @@ enum ProcFlags PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT = 0x00010000, // 16 Successful negative spell cast (by default only on damage) PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT = 0x00020000, // 17 Taken negative spell (by default only on damage) - PROC_FLAG_ON_DO_PERIODIC = 0x00040000, // 18 Successful do periodic (damage / healing, determined from 14-17 flags) - PROC_FLAG_ON_TAKE_PERIODIC = 0x00080000, // 19 Taken spell periodic (damage / healing, determined from 14-17 flags) + PROC_FLAG_ON_DO_PERIODIC = 0x00040000, // 18 Successful do periodic (damage / healing, determined by PROC_EX_PERIODIC_POSITIVE or negative if no procEx) + PROC_FLAG_ON_TAKE_PERIODIC = 0x00080000, // 19 Taken spell periodic (damage / healing, determined by PROC_EX_PERIODIC_POSITIVE or negative if no procEx) PROC_FLAG_TAKEN_ANY_DAMAGE = 0x00100000, // 20 Taken any damage PROC_FLAG_ON_TRAP_ACTIVATION = 0x00200000, // 21 On trap activation @@ -594,7 +594,8 @@ enum ProcFlagsEx PROC_EX_RESERVED2 = 0x0004000, PROC_EX_RESERVED3 = 0x0008000, 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_EX_ONE_TIME_TRIGGER = 0x0020000, // If set trigger always but only one time (not used) + PROC_EX_PERIODIC_POSITIVE = 0x0040000 // For periodic heal }; struct SpellProcEventEntry diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1cb1dc5ac..76617767e 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 "10521" + #define REVISION_NR "10522" #endif // __REVISION_NR_H__