[9456] Fixed spell proc code for mixed proc event cases.

* Allow spells with multiple procEx flags to trigger also with 0 dmg, if current
procExtra is no normal hit (e.g. block and normal hit as flags -> all dmg blocked).

* Also allow proc at hit as result partly block. This fix case from unknown author
  prepered by KAPATEJIb.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
pasdVn 2010-02-26 02:44:38 +03:00 committed by VladimirMangos
parent 62726741d6
commit 1e05a737bd
3 changed files with 6 additions and 3 deletions

View file

@ -1154,8 +1154,8 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
// Exist req for PROC_EX_EX_TRIGGER_ALWAYS // Exist req for PROC_EX_EX_TRIGGER_ALWAYS
if (procEvent_procEx & PROC_EX_EX_TRIGGER_ALWAYS) if (procEvent_procEx & PROC_EX_EX_TRIGGER_ALWAYS)
return true; return true;
// Passive spells can`t trigger if need hit // Passive spells can`t trigger if need hit (exclude cases when procExtra include non-active flags)
if ((procEvent_procEx & PROC_EX_NORMAL_HIT) && !active) ((procEvent_procEx & PROC_EX_NORMAL_HIT & procExtra) && !active)
return false; return false;
// Check Extra Requirement like (hit/crit/miss/resist/parry/dodge/block/immune/reflect/absorb and other) // Check Extra Requirement like (hit/crit/miss/resist/parry/dodge/block/immune/reflect/absorb and other)
if (procEvent_procEx & procExtra) if (procEvent_procEx & procExtra)

View file

@ -1494,6 +1494,9 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
damageInfo->blocked_amount = damageInfo->damage; damageInfo->blocked_amount = damageInfo->damage;
damageInfo->procEx |= PROC_EX_FULL_BLOCK; damageInfo->procEx |= PROC_EX_FULL_BLOCK;
} }
else
damageInfo->procEx |= PROC_EX_NORMAL_HIT; // Partial blocks can still cause attacker procs
damageInfo->damage -= damageInfo->blocked_amount; damageInfo->damage -= damageInfo->blocked_amount;
damageInfo->cleanDamage += damageInfo->blocked_amount; damageInfo->cleanDamage += damageInfo->blocked_amount;
break; break;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9455" #define REVISION_NR "9456"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__