mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Correct behavior of Add Extra Attact spelleffect.
Correctly send attack gain in spell log. Attack right after processing effect Ignore effect if target not in melee range/angle --HG-- branch : trunk
This commit is contained in:
@@ -5441,7 +5441,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*/)
|
||||
|
||||
Reference in New Issue
Block a user