diff options
author | megamage <none@none> | 2009-05-25 12:51:14 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-25 12:51:14 -0500 |
commit | 00f50798d365c0318b10a012c8985edb3c1f87c7 (patch) | |
tree | c26543841923604c6bc4ea382a99127d971327fd /src/game/SpellEffects.cpp | |
parent | dfd041dd578df2a7d431831aa00676ab6b543b97 (diff) | |
parent | fcbcf595113bb9b2c256fd5652adafa79ba89b78 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 12008b94ddb..29d06ba4d20 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5746,7 +5746,20 @@ void Spell::EffectAddExtraAttacks(uint32 /*i*/) if( unitTarget->m_extraAttacks ) return; + Unit *victim = unitTarget->getVictim(); + + // attack prevented + // fixme, some attacks may not target current victim, this is right now not handled + if (!victim || !unitTarget->IsWithinMeleeRange(victim) || !unitTarget->HasInArc( 2*M_PI/3, victim )) + return; + + // Only for proc/log informations unitTarget->m_extraAttacks = damage; + // Need to send log before attack is made + SendLogExecute(); + m_needSpellLog = false; + + unitTarget->AttackerStateUpdate(victim, BASE_ATTACK, true); } void Spell::EffectParry(uint32 /*i*/) |