diff options
author | QAston <none@none> | 2009-03-16 23:15:38 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-16 23:15:38 +0100 |
commit | 94fe96298212d75b7d484efe32d4ddfcccd26a6b (patch) | |
tree | 6515e1e5dda8fc8c1ce82e6b75f70219fdf45dba /src/game/Unit.cpp | |
parent | 0213ad8a1f21de1a76c63e67f35b1f2061f6e7d4 (diff) |
*Fix dead-loop crash.
*Fix damage shield.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e369c322277..022fb462e28 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2376,7 +2376,9 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex CalculateMeleeDamage(pVictim, 0, &damageInfo, attType); // Send log damage message to client SendAttackStateUpdate(&damageInfo); - ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, damageInfo.damage, damageInfo.attackType); + // Send blocked amount to spell_proc event if proc can be only from block (Damage Shield) + uint32 ProcAmount = damageInfo.procEx == PROC_EX_BLOCK ? damageInfo.blocked_amount : damageInfo.damage; + ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, ProcAmount, damageInfo.attackType); DealMeleeDamage(&damageInfo,true); if (GetTypeId() == TYPEID_PLAYER) @@ -5550,7 +5552,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu if (dummySpell->SpellIconID == 3214) { triggered_spell_id = 59653; - basepoints0 = GetShieldBlockValue() * triggerAmount / 100; + // % of amount blocked + basepoints0 = damage * triggerAmount / 100; break; } break; |